This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: No soundcards found

Part Number: AM5728
Other Parts Discussed in Thread: TLV320AIC3104, , BEAGLEBOARD-X15

Tool/software: Linux

Hello,

We have a custom board based on AM5728 and we are using Audio codec TLV320AIC3104 with McAsp2 over i2c4.

We are not able to play wav file and getting error "aplay: pcm_write:1940: write error: Input/output error" .

I get "ALSA devices list - No soundcards detected" error during bootup.

The relevant parts of the device tree are:

sound0: sound@0 {

compatible = "simple-audio-card";

simple-audio-card,name = "BeagleBoard-X15";

simple-audio-card,widgets =

"Line", "Line Out",

"Line", "Line In";

simple-audio-card,routing =

"Line Out", "LLOUT",

"Line Out", "RLOUT",

"MIC2L", "Line In",

"MIC2R", "Line In";

simple-audio-card,format = "dsp_b";

simple-audio-card,bitclock-master = <&sound0_master>;

simple-audio-card,frame-master = <&sound0_master>;

simple-audio-card,bitclock-inversion;

simple-audio-card,cpu {

sound-dai = <&mcasp2>;

};

sound0_master: simple-audio-card,codec {

sound-dai = <&tlv320aic3104>;

clocks = <&mcasp2_ahclkx_mux>;

};

};

&i2c4 {

status = "okay";

clock-frequency = <400000>;

tlv320aic3104: tlv320aic3104@18 {

#sound-dai-cells = <0>;

compatible = "ti,tlv320aic3104";

reg = <0x18>;

assigned-clocks = <&sys_clkin2>;

adc-settle-ms = <40>;

AVDD-supply = <&vdd_3v3>;

IOVDD-supply = <&vdd_3v3>;

DRVDD-supply = <&vdd_3v3>;

DVDD-supply = <&aic_dvdd>;

status = "okay";

};

};

&mcasp2 {

#sound-dai-cells = <0>;

assigned-clocks = <&mcasp2_ahclkx_mux>;

assigned-clock-parents = <&sys_clkin2>;

status = "okay";

op-mode = <0>; /* MCASP_IIS_MODE */

tdm-slots = <2>;

/* 4 serializers */

serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */

1 2 0 0

>;

tx-num-evt = <32>;

rx-num-evt = <32>;

};

root@am57xx-evm:~# lsmod

Module Size Used by

cbc 2324 

jitterentropy_rng 6449 0

drbg 13425 1

xfrm_user 23228 2

xfrm4_tunnel 2040 0

ipcomp 2473 0

xfrm_ipcomp 4695 1 ipcomp

esp4 6465 0

ah4 5665 0

af_key 27563 0

xfrm_algo 6970 5 ah4,esp4,af_key,xfrm_user,xfrm_ipcomp

bluetooth 325678 2

xhci_plat_hcd 5247 0

xhci_hcd 109138 1 xhci_plat_hcd

usbcore 194665 2 xhci_plat_hcd,xhci_hcd

rpmsg_proto 7597 0

rpmsg_rpc 19668 0

rpmsg_pru 4962 0

dwc3 64055 0

udc_core 12063 1 dwc3

virtio_rpmsg_bus 13080 3 rpmsg_pru,rpmsg_rpc,rpmsg_proto

snd_soc_simple_card 8099 0

snd_soc_omap_hdmi_audio 4737 0

pvrsrvkm 412372 0

pru_rproc 11732 4

pruss_intc 7227 5 pru_rproc

ecb 1909 0

sha512_generic 9903 0

sha512_arm 12079 0

sha256_generic 9503 1

hmac 2735 1

ahci_platform 3218 0

libahci_platform 8821 1 ahci_platform

libahci 27891 2 libahci_platform,ahci_platform

omap_aes_driver 19230 0

md5 1897 0

libata 196388 3 libahci,libahci_platform,ahci_platform

sha1_generic 2621 0

pruss 11186 1 pru_rproc

scsi_mod 129717 1 libata

sha1_arm_neon 6261 0

sha1_arm 3862 1 sha1_arm_neon

omap_wdt 4570 0

omap_sham 21089 0

extcon_palmas 6347 0

ti_vpe 19292 0

ti_sc 24714 1 ti_vpe

dwc3_omap 5054 0

ti_csc 2313 1 ti_vpe

ti_vpdma 15166 1 ti_vpe

rtc_omap 8272 0

snd_soc_tlv320aic3x 48933 1

extcon 13943 3 dwc3,extcon_palmas,dwc3_omap

omap_des 11446 0

omap_rng 4835 0

rng_core 8011 1 omap_rng

rtc_ds1307 11278 0

rtc_palmas 5187 0

debugss_kmodule 6848 0

omap_remoteproc 12389 4

remoteproc 27121 5 omap_remoteproc,pruss,pru_rproc,rpmsg_rpc,rpmsg_proto

virtio 7580 2 remoteproc,virtio_rpmsg_bus

virtio_ring 12291 2 remoteproc,virtio_rpmsg_bus

sch_fq_codel 8251 3

uio_module_drv 7353 0

uio 9329 1 uio_module_drv

gdbserverproxy 4671 0

cryptodev 37405 1

cmemk 35174 2

While booting I am getting logs like:

[ 2.478797] No soundcards found.

[ 8.008647] of_get_named_gpiod_flags: can't parse 'simple-audio-card,hp-det-gpio' property of node '/sound@0[0]'

[ 8.008656] of_get_named_gpiod_flags: can't parse 'simple-audio-card,mic-det-gpio' property of node '/sound@0[0]'

[ 8.112773] asoc-simple-card sound@0: tlv320aic3x-hifi <-> 48464000.mcasp mapping ok

But I get the following message, after using the aplay command:

root@am57xx-evm:~# aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: BeagleBoardX15 [BeagleBoard-X15], device 0: davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0 []

Subdevices: 1/1

Subdevice #0: subdevice #0

card 1: H58040000encode [HDMI 58040000.encoder], device 0: HDMI 58040000.encoder snd-soc-dummy-dai-0 []

Subdevices: 1/1

Subdevice #0: subdevice #0

when I play Audio using aplay :

root@am57xx-evm:~# aplay Classical-Artists.wav

Playing WAVE 'Classical-Artists.wav' : Signed 16 bit Little Endian, [ 1746.484168] tlv320aic3x-codec 3-0018: Unable to sync registers 0x1-0x1. -121 Rate 44100 Hz, Stereo

aplay: pcm_write:1940: write error: Input/output error

Please suggest us some solution/ debug approach on this one.

Regards,