AM3352: pcm0p/sub0/hw_params closed

Part Number: AM3352

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:

  1. 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).
  2. Fill the parameters with the full configuration space for a PCM (snd_pcm_hw_params_any).
  3. Restrict the configuration space using snd_pcm_hw_params_set_* functions.
  4. “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);

 

  • Hi,

    Yes you would need these in order to configure the PCM device( format, rate, channel etc.,)

    root@beagletest:~# cat /proc/asound/WzlE3ipAout/pcm0p/sub0/hw_params
    closed

    You may not be playing anything yet and so the hw_params shows closed. When the actual playback begins you would see the details that you configured with period  and buffer sizes.

    Hope this helps.

    Best Regards,

    Suren