From: Peter Gregory <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Saturday, October 25, 2014 at 8:03 PM To: "[email protected]" <[email protected]> Subject: Re: [beagleboard] Re: BBB and ADS InstantFM Music
> I think you are on to something here. > The radio device records at 96000. It won't record at any other rate. > The playback device only plays back at 48000. It won't play at 96000. > It looks like the player down-converts the sample rate. > > If I record and pipe it to aplay with -v on, it plays a pop each second or so > with no music, just the pop and silence, I get: > > debian@beaglebone:~$ arecord -D hw:1,0 -c2 -fS16_LE -r96000 | aplay -c2 > -fS16_LE -r96000 -v > > Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo > > Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo > > Plug PCM: Rate conversion PCM (48000, sformat=S16_LE) > > Converter: libspeex (builtin) > > Protocol version: 10002 > > Its setup is: > > stream : PLAYBACK > > access : RW_INTERLEAVED > > format : S16_LE > > subformat : STD > > channels : 2 > > rate : 96000 > > exact rate : 96000 (96000/1) > > msbits : 16 > > buffer_size : 32768 > > period_size : 2048 > > period_time : 21333 > > tstamp_mode : NONE > > period_step : 1 > > avail_min : 2048 > > period_event : 0 > > start_threshold : 32768 > > stop_threshold : 32768 > > silence_threshold: 0 > > silence_size : 0 > > boundary : 1073741824 > > Slave: Direct Stream Mixing PCM > > Its setup is: > > stream : PLAYBACK > > access : MMAP_INTERLEAVED > > format : S16_LE > > subformat : STD > > channels : 2 > > rate : 48000 > > exact rate : 48000 (48000/1) > > msbits : 16 > > buffer_size : 16384 > > period_size : 1024 > > period_time : 21333 > > tstamp_mode : NONE > > period_step : 1 > > avail_min : 1024 > > period_event : 0 > > start_threshold : 16384 > > stop_threshold : 16384 > > silence_threshold: 0 > > silence_size : 0 > > boundary : 1073741824 > > Hardware PCM card 0 'C-Media USB Headphone Set' device 0 subdevice 0 > > Its setup is: > > stream : PLAYBACK > > access : MMAP_INTERLEAVED > > format : S16_LE > > subformat : STD > > channels : 2 > > rate : 48000 > > exact rate : 48000 (48000/1) > > msbits : 16 > > buffer_size : 16384 > > period_size : 1024 > > period_time : 21333 > > tstamp_mode : ENABLE > > period_step : 1 > > avail_min : 1024 > > period_event : 0 > > start_threshold : 1 > > stop_threshold : 1073741824 > > silence_threshold: 0 > > silence_size : 1073741824 > > boundary : 1073741824 > > appl_ptr : 0 > > hw_ptr : 0 > > > But the interesting part is when I record to a file, then play back the file > successfully, I get: > > debian@beaglebone:~$ aplay radio.wav -v > > Playing WAVE 'radio.wav' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo > > Plug PCM: Rate conversion PCM (48000, sformat=S16_LE) > > Converter: libspeex (builtin) > > Protocol version: 10002 > > Its setup is: > > stream : PLAYBACK > > access : RW_INTERLEAVED > > format : S16_LE > > subformat : STD > > channels : 2 > > rate : 96000 > > exact rate : 96000 (96000/1) > > msbits : 16 > > buffer_size : 32768 > > period_size : 2048 > > period_time : 21333 > > tstamp_mode : NONE > > period_step : 1 > > avail_min : 2048 > > period_event : 0 > > start_threshold : 32768 > > stop_threshold : 32768 > > silence_threshold: 0 > > silence_size : 0 > > boundary : 1073741824 > > Slave: Direct Stream Mixing PCM > > Its setup is: > > stream : PLAYBACK > > access : MMAP_INTERLEAVED > > format : S16_LE > > subformat : STD > > channels : 2 > > rate : 48000 > > exact rate : 48000 (48000/1) > > msbits : 16 > > buffer_size : 16384 > > period_size : 1024 > > period_time : 21333 > > tstamp_mode : NONE > > period_step : 1 > > avail_min : 1024 > > period_event : 0 > > start_threshold : 16384 > > stop_threshold : 16384 > > silence_threshold: 0 > > silence_size : 0 > > boundary : 1073741824 > > Hardware PCM card 0 'C-Media USB Headphone Set' device 0 subdevice 0 > > Its setup is: > > stream : PLAYBACK > > access : MMAP_INTERLEAVED > > format : S16_LE > > subformat : STD > > channels : 2 > > rate : 48000 > > exact rate : 48000 (48000/1) > > msbits : 16 > > buffer_size : 16384 > > period_size : 1024 > > period_time : 21333 > > tstamp_mode : ENABLE > > period_step : 1 > > avail_min : 1024 > > period_event : 0 > > start_threshold : 1 > > stop_threshold : 1073741824 > > silence_threshold: 0 > > silence_size : 1073741824 > > boundary : 1073741824 > > appl_ptr : 0 > > hw_ptr : 0 > > > It does the down-convert both times, but fails when using the pipe. > > Any clue why it does this? When you record, use ‹disable-resample and ‹disable-format, and then try to play that file, also with ‹disable-resample and ‹disable-format and you will probably get the same popping sound. Regards, John > > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
