Tool/software:
How to solve
root@beagletest:~# cat /proc/asound/WzlE3ipAout/pcm0p/sub0/hw_params
closed
root@beagletest:~# cat /proc/asound/cards
0 [WzlE3ipAout ]: WzlE3ipAout - WzlE3ipAout
WzlE3ipAout
root@beagletest:~# cat /proc/asound/WzlE3ipAout/pcm0p/info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: E3IP-TAS5508C-Stream tas5508c-pwm-0
name: E3IP-TAS5508C-Stream tas5508c-pwm-0
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
Is something like following needed?
To specify the hardware parameters, we need to:
- Allocate a variable of type snd_pcm_hw_params_t either on the stack (snd_pcm_hw_params_alloca), like we will do, or on the heap (snd_pcm_hw_params_malloc).
- Fill the parameters with the full configuration space for a PCM (snd_pcm_hw_params_any).
- Restrict the configuration space using snd_pcm_hw_params_set_* functions.
- “Install” or set the parameters for the device (snd_pcm_hw_params).
snd_pcm_hw_params_t *hw_params;
snd_pcm_hw_params_alloca(&hw_params);
snd_pcm_hw_params_any(pcm, hw_params);
snd_pcm_hw_params_set_access(pcm, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
snd_pcm_hw_params_set_format(pcm, hw_params, SND_PCM_FORMAT_S16_LE);
snd_pcm_hw_params_set_channels(pcm, hw_params, 1);
snd_pcm_hw_params_set_rate(pcm, hw_params, 48000, 0);
snd_pcm_hw_params_set_periods(pcm, hw_params, 10, 0);
snd_pcm_hw_params_set_period_time(pcm, hw_params, 100000, 0); // 0.1 seconds
snd_pcm_hw_params(pcm, hw_params);