On Fri, May 14, 2021 6:39 pm, Paul Davis wrote:
while running aplay,
cat /proc/asound/cardN/pcmDp/subS/hw_params
cat /proc/asound/cardN/pcmDp/subS/sw_params
substituting for N, D and S appropriately.
that will show the hw and sw configuration of the device/driver in a
"working" configuration (or non-working one)
Currently playing a 16 bit file (from a CD but converted to 48kHz); the
driver is set for S24_LE but apparently will accept S16_LE without
problem.
$ cat /proc/asound/card4/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 48
buffer_size: 24576
[chris@chubb ~]$ cat /proc/asound/card4/pcm0p/sub0/hw_params/sw_params
cat: /proc/asound/card4/pcm0p/sub0/hw_params/sw_params: Not a directory
[chris@chubb ~]$ cat /proc/asound/card4/pcm0p/sub0/sw_params
tstamp_mode: NONE
period_step: 1
avail_min: 48
start_threshold: 24576
stop_threshold: 24576
silence_threshold: 0
silence_size: 0
boundary: 6917529027641081856
I did not realize that aplay used such huge buffers, but I guess there is
no reason not to for a non-realtime playback application, and probably
advantages in CPU usage and avoiding under-run.
I did have to change the driver to be configured for only 2 channels; the
interface it is connecting to on the other end has 8 output channels, but
when I configured the driver with 8 outputs and told aplay to use 2, the
audio was very distorted.
--
Chris Caudle