Thread: Audio over wifi
View Single Post
  #20 (permalink)  
Old July 7th 16, 10:25 PM posted to uk.rec.audio
Richard Robinson
external usenet poster
 
Posts: 102
Default Audio over wifi

Jim Lesurf said:
In article , Richard
Robinson wrote:
...
$ 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 I play a 48k wav, the indicator lights up on the DAC. For a 44.1k file,
it doesn't.

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.


Yes.

pi@raspberrypi:~ $ aplay -Dhw:1,0,0 xxx.wav
Playing WAVE 'xxx.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1233: Sample format non available
Available formats:
- S24_3LE

plughw plays

catting the hw_params file will tell you what is actually being accepted
when plughw: plays.


pi@raspberrypi:~ $ cat /proc/asound/C1/pcm0p/sub0/hw_params
access: MMAP_INTERLEAVED
format: S24_3LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 5513
buffer_size: 22050


It's being read as 2-byte samples and they're padded out to 3 bytes before
sending ? It needs a 16bit format ? Or am I barking, and up the wrong tree ?


--
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem

My email address is at http://www.qualmograph.org.uk/contact.html