[ntp:questions] Problem with CHU Audio Driver on FreeBSD

David Mills mills at udel.edu
Wed Sep 9 23:47:58 UTC 2009


Steve,

The last four lines of your configuration file are unknown to me. In 
FreeBSD I don't use any of them. As for hardcoded gain, that is only the 
initial setting. The AGC is controlled by the audio_gain() routine 
called by the driver. If you see the gain ramp up to 255, the level 
setting is too low. I have often screwed up using mismatched 
connector/device settings. My radios have a recorder connector which is 
at mic level. There is often not enough signal directly from a speaker 
jack to line in level, so I have to use the mic level and disable the 
mic boost.

Dave

Steve Kostecke wrote:

>The AGC in my CHU Audio Refclock has never worked correctly for me.
>
>The problem is that when ntpd is started the AGC level (as shown in the
>output generated by -dd, as well as in the clockstats file) ramps up to
>255 (i.e. 100%) and stays there.
>
>I have watched the -dd output with the volume at 100%, 50%, and 0% (the
>radio volume is controlled by the radio initialization routine in ntpd
>and the level is hardcoded and I have to recompile ntpd to change the
>volume).
>
>I've tried all manner of configuration varients and none of them make a
>difference.
>
>My radio is connected to the mic input on my sound card.
>
>I am able to receive CHU during periods when the reception is good.
>
>The kit is:
>
>* Soekris net4801
>* Commell MP-878S Mini-PCI Audio Adapter
>* TenTec RX-320D Receiver
>* FreeBSD 5.3 Release
>* ntp-dev-4.2.5p188
>
>audio-pcm from the ./utils directory shows:
>
>input:   </dev/audio0> 3
>control: </dev/mixer0> 4
>devmask: 0x31ff recmask: 0x1c8 recsrc: 0x80
>Devmask: vol, bass, treble, synth, pcm, speaker, line, mic, cd, igain,
>ogain
>Recmask: synth, line, mic, cd
>RecSrc:  mic
>play_size 128, rec_size 128
>play_rate 8000, rec_rate 8000, play_format 0x1, rec_format 0x1
>Play format: MU_LAW 
>Rec format:  MU_LAW 
>
>The sound card is recognized by the kernel:
>
>$ dmesg | grep pcm
>pcm0: <Avance Logic ALS4000> port 0xe400-0xe47f irq 11 at device 14.0 on pci0
>pcm0: [GIANT-LOCKED]
>
>In /dev I have:
>
>crw-rw-rw-   1 root  wheel      30,   4 Jul 30 12:30 audio0.0
>wrw-rw-rw-   1 root  wheel      30, 0x00010004 Jul 30 12:30 audio0.1
>lrwxr-xr-x   1 root  wheel            8 Sep  9 17:29 chu_audio -> audio0.0
>crw-rw-rw-   1 root  wheel      30,   0 Jul 30 12:30 mixer0
>cr--r--r--  1 root  wheel      30,   6 Jul 30 12:30 sndstat
>
>'cat /dev/sndstat' shows:
>
>FreeBSD Audio Driver (newpcm)
>Installed devices:
>pcm0: <Avance Logic ALS4000> at io 0xe400 irq 11  (1p/1r/0v channels
>duplex default)
>
>/etc/ntp.conf:
>
>driftfile /var/db/ntp.drift
>statsdir  /var/log/ntpstats/
>logfile   /var/log/messages
>
>statistics loopstats peerstats clockstats
>filegen loopstats file loopstats type day enable
>filegen peerstats file peerstats type day enable
>filegen clockstats file clockstats type day enable
>
># CHU Audio
>server 127.127.7.0 mode 2 prefer
>fudge  127.127.7.0 time1 0.0044592 flag4 1
>
>/etc/ntp.audio.0:
>
>idev /dev/audio0.0
>cdev /dev/mixer0
>agc mic
>monitor vol
>
>




More information about the questions mailing list