oshcar wrote: 
> ok bpa
> 
> "Give specific exaplanations of the test "i never get 16bit output
> unless i force with f=16 ( Rpi driver ) " so thatit can be understood."
> 
> just booted up with Rpi driver -- hw:sendrpi output setting
> 
> everything else default
> 
> ALSA setting 80 4 _ 1 _
> 
> dont know if this qualifies as a test or not -- just playing a redbook
> cd flac file
> 
> cat /proc/asound/card0/pcm0p/sub0/hw_params
> access: MMAP_INTERLEAVED
> format: S24_LE
> subformat: STD
> channels: 2
> rate: 44100 (44100/1)
> period_size: 882
> buffer_size: 3528
> 
> maybe ALSA is set to send highest format dac handle ?
"cat" is not really a test. I think this is showing the defautl value.

Use the logging value " -d output=info"  and when squeezelite
opens/reopens the output device, you'll see actual values.
test below using a DAC called "Audio" - alscap shows different
capabilities between "plughw" and "hw"

Code:
--------------------
    
  $ ./alsacap -d plughw:Audio,1
  *** Exploring configuration space of device `plughw:Audio,1' for playback ***
  1..10000 channels
  Sampling rate 4000..4294967295 Hz
  Sample formats: S8, U8, S16_LE, S16_BE, U16_LE, U16_BE, S24_LE, S24_BE, 
U24_LE, U24_BE, S32_LE, S32_BE, U32_LE, U32_BE, FLOAT_LE, FLOAT_BE, FLOAT64_LE, 
FLOAT64_BE, MU_LAW, A_LAW, IMA_ADPCM, S20_LE, S20_BE, U20_LE, U20_BE, S24_3LE, 
S24_3BE, U24_3LE, U24_3BE, S20_3LE, S20_3BE, U20_3LE, U20_3BE, S18_3LE, 
S18_3BE, U18_3LE, U18_3BE
  $ ./alsacap -d hw:Audio,1
  *** Exploring configuration space of device `hw:Audio,1' for playback ***
  2 channels
  Sampling rate 48000 Hz
  Sample formats: S16_LE
  Significant bits: 16
  
--------------------



For example, the ALSA device is opened with 44.1kHz when with nothing
playing.
When I started to play a 48Khz stream - it re-opens with 48Khz setting.

The input stream is a 16bit 2 chan - so Squeezelite has opend DAC with
S32LE by padding out with zeroes as "plughw" supports it

Code:
--------------------
    
  ./squeezelite -o plughw:Audio,1 -d output=info
  16:58:12.376066] output_init_alsa:933 init output
  [16:58:12.376125] output_init_alsa:973 requested alsa_buffer: 40 alsa_period: 
4 format: any mmap: 1
  [16:58:12.380868] output_init_common:432 supported rates: 768000 705600 
384000 352800 192000 176400 96000 88200 48000 44100 32000 24000 22500 16000 
12000 11025 8000 
  [16:58:12.384153] output_init_alsa:999 memory locked
  [16:58:12.384168] output_init_alsa:1005 glibc detected using mallopt
  [16:58:12.384277] output_thread:682 open output device: plughw:Audio,1
  [16:58:12.384320] alsa_open:351 opening device at: 44100
  [16:58:12.385562] alsa_open:422 opened device plughw:Audio,1 using format: 
S32_LE sample rate: 44100 mmap: 1
  [16:58:12.385630] alsa_open:513 buffer: 40 period: 4 -> buffer size: 1764 
period size: 441
  [16:58:12.387386] output_flush:445 flush output buffer
  [16:58:53.032739] output_flush:445 flush output buffer
  [16:58:54.235678] _output_frames:65 start buffer frames: 45056
  [16:58:54.235731] _output_frames:153 track start sample rate: 48000 
replay_gain: 0
  [16:58:54.245809] output_thread:682 open output device: plughw:Audio,1
  [16:58:54.246511] alsa_open:351 opening device at: 48000
  [16:58:54.247705] alsa_open:422 opened device plughw:Audio,1 using format: 
S32_LE sample rate: 48000 mmap: 1
  [16:58:54.247773] alsa_open:513 buffer: 40 period: 4 -> buffer size: 1920 
period size: 480
  [16:59:02.475188] output_flush:445 flush output buffer
  
--------------------


Interesting next log - as it show something I didn't expect.
Same device, similar test (2nd stream is 44.1Khz) only this time using
the "hw" - device is opened with S16_LE but re-oppend with S32_LE later.
I'm not sure why squeezelite has changed device but shows you need to
enable lgging to knwo what is going on.

Code:
--------------------
    
  ./squeezelite -o hw:Audio,1  -d output=info
  [17:08:40.205122] output_init_alsa:933 init output
  [17:08:40.205170] output_init_alsa:973 requested alsa_buffer: 40 alsa_period: 
4 format: any mmap: 1
  [17:08:40.207744] output_init_common:432 supported rates: 48000 
  [17:08:40.209907] output_init_alsa:999 memory locked
  [17:08:40.209918] output_init_alsa:1005 glibc detected using mallopt
  [17:08:40.210011] output_thread:682 open output device: hw:Audio,1
  [17:08:40.210045] alsa_open:351 opening device at: 48000
  [17:08:40.211020] alsa_open:422 opened device hw:Audio,1 using format: S16_LE 
sample rate: 48000 mmap: 1
  [17:08:40.211041] alsa_open:513 buffer: 40 period: 4 -> buffer size: 1920 
period size: 480
  [17:08:40.216404] output_flush:445 flush output buffer
  [17:09:20.976643] output_flush:445 flush output buffer
  [17:09:22.761033] _output_frames:65 start buffer frames: 69743
  [17:09:22.761118] _output_frames:153 track start sample rate: 44100 
replay_gain: 0
  [17:09:22.771192] output_thread:682 open output device: hw:Audio,1
  [17:09:22.777322] alsa_open:351 opening device at: 44100
  [17:09:22.778295] alsa_open:381 reopening device hw:Audio,1 in plug mode as 
plughw:Audio,1 for resampling
  [17:09:22.779398] alsa_open:422 opened device plughw:Audio,1 using format: 
S32_LE sample rate: 44100 mmap: 1
  [17:09:22.779479] alsa_open:513 buffer: 40 period: 4 -> buffer size: 1764 
period size: 441
  [17:09:29.018207] output_flush:445 flush output buffer
  
--------------------


------------------------------------------------------------------------
bpa's Profile: http://forums.slimdevices.com/member.php?userid=1806
View this thread: http://forums.slimdevices.com/showthread.php?t=114947

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to