Dmic and dspk not able to record and play on TX2

Hello!

OK probably because it is not connected to any sink (ie. DSPK). Maybe you have changed something because this was not the case before. However, may this does not matter because now I see it is playing fine to the DSPK with hw:tegrasndt186ref,0 from the trace. Do you see the DSPK clk and data being driven?

Regards,
Jon

We have captured the traces similar to your sequence again, please review

root@localhost:/home/ubuntu# sudo cat /sys/kernel/debug/tracing/trace

       aplay-7953  [000] ....   320.326870: snd_soc_dapm_widget_power: widget=Playback 1 val=1
       aplay-7953  [000] ....   320.326878: snd_soc_dapm_widget_power: widget=ADMAIF1 Receive val=1
       aplay-7953  [000] ....   320.326881: snd_soc_dapm_widget_power: widget=ADMAIF1 RX val=1
       aplay-7953  [000] ....   320.326892: snd_soc_dapm_widget_power: widget=DSPK1 Mux val=1
       aplay-7953  [000] ....   320.326895: snd_soc_dapm_widget_power: widget=DSPK1 TX val=1
       aplay-7953  [000] ....   320.326897: snd_soc_dapm_widget_power: widget=DSPK1 Transmit val=1
       aplay-7953  [000] ....   320.326898: snd_soc_dapm_widget_power: widget=DSPK1 Transmit-DSPK1 CIF Receive val=1
       aplay-7953  [000] ....   320.326900: snd_soc_dapm_widget_power: widget=DSPK1 CIF Receive val=1
       aplay-7953  [000] ....   320.326902: snd_soc_dapm_widget_power: widget=DSPK1 DAP TX val=1
       aplay-7953  [000] ....   320.326904: snd_soc_dapm_widget_power: widget=DSPK1 DAP Transmit val=1
       aplay-7953  [000] ....   320.326905: snd_soc_dapm_widget_power: widget=DSPK1 DAP Transmit-d3 Playback val=1
       aplay-7953  [000] ....   320.326907: snd_soc_dapm_widget_power: widget=d3 Playback val=1
       aplay-7953  [000] ....   320.326909: snd_soc_dapm_widget_power: widget=d3 OUT val=1
       aplay-7953  [000] ....   320.326911: snd_soc_dapm_widget_power: widget=d3 Headphone val=1
       aplay-7953  [000] ....   338.934686: snd_soc_dapm_widget_power: widget=Playback 1 val=0
       aplay-7953  [000] ....   338.934770: snd_soc_dapm_widget_power: widget=ADMAIF1 Receive val=0
       aplay-7953  [000] ....   338.934778: snd_soc_dapm_widget_power: widget=ADMAIF1 RX val=0
       aplay-7953  [000] ....   338.935226: snd_soc_dapm_widget_power: widget=DSPK1 Mux val=0
       aplay-7953  [000] ....   338.935243: snd_soc_dapm_widget_power: widget=DSPK1 TX val=0
       aplay-7953  [000] ....   338.935254: snd_soc_dapm_widget_power: widget=DSPK1 Transmit val=0
       aplay-7953  [000] ....   338.935261: snd_soc_dapm_widget_power: widget=DSPK1 Transmit-DSPK1 CIF Receive val=0
       aplay-7953  [000] ....   338.935268: snd_soc_dapm_widget_power: widget=DSPK1 CIF Receive val=0
       aplay-7953  [000] ....   338.935275: snd_soc_dapm_widget_power: widget=DSPK1 DAP TX val=0
       aplay-7953  [000] ....   338.935283: snd_soc_dapm_widget_power: widget=DSPK1 DAP Transmit val=0
       aplay-7953  [000] ....   338.935290: snd_soc_dapm_widget_power: widget=DSPK1 DAP Transmit-d3 Playback val=0
       aplay-7953  [000] ....   338.935298: snd_soc_dapm_widget_power: widget=d3 Playback val=0
       aplay-7953  [000] ....   338.935309: snd_soc_dapm_widget_power: widget=d3 OUT val=0
       aplay-7953  [000] ....   338.935323: snd_soc_dapm_widget_power: widget=d3 Headphone val=0

Do you see the DSPK clk and data being driven? →
we are not seeing any activity on the clk and data. :(

Hello!

What does the following show …

$ sudo grep "gpio_aud[23]" /sys/kernel/debug/tegra_pinctrl_reg                                                                                                                                
Bank: 0 Reg: 0x02431000 Val: 0x00000401 -> gpio_aud3_pk0
Bank: 0 Reg: 0x02431008 Val: 0x00000401 -> gpio_aud2_pj7

What L4T release are you using?

Regards,
Jon

we are using SDK 32.4.3…

below is the response of your command:
root@linux:/home/ubuntu# sudo grep “gpio_aud[23]” /sys/kernel/debug/tegra_pinctrl_reg
Bank: 0 Reg: 0x02431000 Val: 0x00000401 → gpio_aud3_pk0
Bank: 0 Reg: 0x02431008 Val: 0x00000401 → gpio_aud2_pj7

And we are using L4T R32.4.3 sdk version.

Hello!

That looks good and means that the pins are muxed correctly. So what pins are on the board you are probing?

Regards,
Jon

we are probing data line DSPK_OUT_DATA but we are not getting anything on this?

Hello,

Thanks, but can you tell me what header and what pin on the header? I assume that you are using the TX2 devkit board. Please let me know if that is the case.

Jon

yes i am using TX2 devkit,do you require header and pin on header also?

Hello,

Yes that would be great!

Jon

DSPK_OUT_CLK - J26.27 - G4 (TX2 Module pin number) DSPK_OUT_DAT - J26.29 - H4 (TX2 Module pin number)

we are probing below header and pin number
header number 26
pin number 27 clock and 29 data

is this correct?

Hello!

Yes that is correct. OK, so that all looks good. Surprising that it is not working. I need to take a closer look.

Regards,
Jon

for checking hardware connection we write 1 on data line and same was observed on oscilloscope by probing.

what further we can check on this

Hi jonathanah,
can you please take closer look in this,why it is not working,do we require any other configuration.

can we get some update on this

Hi Jon,

in our design we are connecting speaker to DSPK2, so i tried below mixer setting and aplay command:

amixer -c tegrasndt186ref cset name=“DSPK2 Mux” ADMAIF1
aplay -D hw:tegrasndt186ref,0 pinao2.wav

With this setting, i am getting clock and data on the oscilloscope but still not able to hear any sound from the speaker. Can you please suggest further what we can check for resolving this.

Hello!

Yes in fact it is DSPK2 that is available on J26 pins 27 and 29 and not DSPK1. If the DSPK is outputing data, but you still cannot hear anything, then the problem is most likely on the amplifier side. I would check that the amplifier is powered and connected appropriately.

Regards
Jon

we are able to play amixer -c tegrasndt186ref cset name=“DSPK2 Mux” ADMAIF1
aplay -D hw:tegrasndt186ref,0 pinao2.wav

its working,thanks for your support

Hi,can we get some information about Tx2 speaker

  1. how we can set/get speaker volume through api or command.

2.speaker is getting noisy after each reboot,how we can disable this noise at uboot