In article , Richard
Robinson wrote:
Jim Lesurf said:
In article ,
Richard Robinson wrote:
The DAC has a little row of lights showing the incoming sample rate.
I just set something playing and had a look ... none of them are lit
up. Helpful, no ? :-/
Afraid I've forgotten what kind of DAC you're using, so can only guess.
I think I probably didn't mention it ?
However it is possible that the DAC is fussy about the rate. So if the
playout is running too fast or too slow (or is too erratic) the LED
doesn't light up.
You can read a 'file' for each device and - when audio is playing -
the relevant one will state the rate, etc, being sent out to hardware.
My memory being what it is I can't immediately recall the 'file' names
for this. But if no-one else can say I'll find out and let you know
later on. [ Edit: see below :-) ]
Thanks, yes
$ cat /proc/asound/C1/pcm0p/sub0/hw_params access: RW_INTERLEAVED
format: S24_3LE subformat: STD channels: 2 rate: 44100 (44100/1)
period_size: 5513 buffer_size: 22050
OK. That shows that what is being sent is 44/1k stereo, 24bit carried as 3
bytes per sample in LE order (like Wave files). That may mean it is Audio
Class 1. Class 2 tends to use four bytes per transferred value. It *should*
be lighting any rate leds on the device for 44.1k. If it doesn't there may
be a timing problem or something else.
If you're using -aplay you can use this to probe what works
get a list of devices from 'aplay -l'
then try 'aplay -D hw:one of them file.wav' to see if that will play
the file and give you a coconut. Using 'hw:' tells -aplay to *not*
provide any conversions. So it will only play when the device can
accept the rate and bit-depth of the wave file.
I'm confused about the names :- aplay -l gives card 1: C1 [Cambridge
Audio DAC100 USB 1], device 0: USB Audio [USB Audio] Subdevices: 0/1
Subdevice #0: subdevice #0 but none of the obvious (to me, anyway)
names from that produce anything audible. What should I be using for a
name ?
Try
aplay -L
i.e. upper case 'L' as that gives more info than lower case 'l'.
It's usually easier when experimenting to use the ALSA numbers. So use
aplay with something like
aplay -D hw:1,0,0 filename.wav
Note that when using "hw" the file may need to be 24bit to match the
harware requirement. To check with other files you can use
aplay -D plughw:1,0,0 filename.wav
Note that
aplay -D hw:1
means the same as assuming the same as hw:1,0,0, so you may find you only
need hw:1 rather than filling in the following zeros.
If plughw: plays a file when hw: doesn't it tells you the numbers after the
"hw:" are correct, but that the file isn't a format that the device can
accept without changes.
catting the hw_params file will tell you what is actually being accepted
when plughw: plays.
There are alternative syntaxes like
-D hw:B20
or
-D hw:CARD=USB,DEV=0
which may work for particular devices as these are their name strings or
are recognised. However the strings I've quoted above are for devices I
have.
In your case I guess it might be that
-D hw:C1
works. But you'd need to experiment.
The card/device/subdevice numbers are assigned by ALSA at bootup. So may
change if you alter the hardware arrangements. But they are easier to find
and use if you aren't changing anything. The name strings will 'follow the
device' if you re-arrange the hardware, but a different device may have a
different name string.
Jim
--
Please use the address on the audiomisc page if you wish to email me.
Electronics
http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio
http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc
http://www.audiomisc.co.uk/index.html