(snd_pcm_hw_open) failed (-22): Invalid argument

Arjav Parikh parikharjav24 at gmail.com
Tue Sep 27 07:29:02 CEST 2022


Hi

I am facing an issue while doing the bring-up of the ZL38050 Audio Card
from Microsemi on the Ambarella ARM platform.

I am able to see the card entry in /proc/asound/cards.
On executing aplay/arecord I get below error:

[image: Screenshot from 2022-09-26 14-44-30.png]

On enabling the LIBASOUND_DEBUG=1 I could see below error line :
ALSA lib ../../../src/pcm/pcm_hw.c:1715:(snd_pcm_hw_open) open
'/dev/snd/pcmC0D0p' failed (-22): Invalid argument

Can anyone guide where the problem could be, is it due to any configuration
mismatch in dtsi or in driver.
Also sharing the dtsi changes made to enable this codec.

sound {

       compatible = "fsl,ms-dac";
       model = "zl380tw";
       //codec-name = "zl380tw @ AMBEVK";
       //codec-name = "ZL380TW0";
       codec-name = "codec";
       cpu-dai = <&i2s0>;
       audio-codec = <&zl380tw>;
       codec-dai-name = "zl380tw0-hifi";
       stream-name = "ZL380TW0-STREAM";
}

Following node added in SPI :
            zl380tw: codec at 1 {
                compatible = "ms,zl380tw";
                spi-max-frequency = <20000000>;
                #sound-dai-cells = <0>;
                spi-cpha;
                spi-cpol;
                reg = <0>;
                status = "ok";
            };
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2022-09-26 14-44-30.png
Type: image/png
Size: 20451 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20220927/c54cec65/attachment-0001.png>


More information about the Alsa-devel mailing list