Dual audio codec issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dual audio codec issue

991 Views
devikar
Contributor II

Hi,


We have setup Yocto project 4.9.11_1.0.0 on a imx6qpsabresd based custom board which has two of wm8962 audio codecs.

We have customized device tree file imx6qdl-sabresd.dtsi for dual audio codec configuration.
We are seeing both the audio codecs are getting detected, but both the sound cards are failing to record the sound.

When we execute the arecord command it is able to output the recorded file but there will be no content in that.We have used following commands to record the sound.

For primary codec
    arecord -D plughw:0,0 -d 10 -r 44100 -f S16_LE file1.wav

For secondary codec
    arecord -D plughw:1,0 -d 10 -r 44100 -f S16_LE file2.wav


We have tested each sound card interface by separately enabling them in device tree. It worked fine. However, we are seeing this issue when both the sound card interfaces are enabled.
We can confirm that there are no issues with the hardware interfaces. Based on our observations & debugging, there seems to be issue with the SSI mapping.
 
We would like to know if anyone has faced same issue and resolved.
We are getting "Unsupported sysclk ratio 544" error for secondary audio codec.

Please find the attached files for Dual sound card configuration and dmesg log
Please let us know if we are missing something in dts file.

Note:We have not modified Machine driver, Platform driver and codec driver.We are using same drivers for both the audio codecs.

Regards,

Devika R

Tags (2)
0 Kudos
4 Replies

920 Views
igorpadykov
NXP Employee
NXP Employee

Hi Devika

in you sound2 configuration you disabled (commented) asrc while

left uncommented  "ASRC-Playback","ASRC-Capture",

so this produced error:

[    3.428902] imx-wm8962 sound2: ASoC: Failed to add route ASRC-Playback 

In general one can test such configuration without linux, with sdk:

rt-thread/bsp/imx6sx/iMX6_Platform_SDK/sdk/drivers/audio at master · RT-Thread/rt-thread · GitHub 

then check dividers and ssi configs, compare with linux using AN4553

Using Open Source Debugging Tools for Linux on i.MX Processors

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

920 Views
devikar
Contributor II

Hi igor,

As we have never used SDK, we need to check on that.

We have commented ASRC as we cannot use it for both the codecs.

We would like to know if we are missing any configuration in device tree or board files.

Regards,

Devika R

0 Kudos

920 Views
igorpadykov
NXP Employee
NXP Employee

Hi Devika 

one can look at dual audio-sgtl5000, audio-tc358743 example without asrc:

linux-imx6/imx6qdl-nitrogen6x.dtsi at boundary-imx_5.4.x_2.1.0 · boundarydevices/linux-imx6 · GitHub 

Best regards
igor

0 Kudos

920 Views
devikar
Contributor II

Hi,

For dual audio codec configuration, we have enabled wm8962 audio codec as built in(*) module in kernel configuration.

As it is not working we wanted to check by enabling it as module(M) in kernel configuration.

If we enable it as module, it is giving compilation error.It seems to have some dependencies.

Can you please let us know how to enable the audio codec as module.

Thanks,

Devika R

0 Kudos