Trouble getting ALSA layer work with PCM5102A codec - Card not listed in aplay soundcards

Hi @silver2row ,

My BBB has the part. num. AM3358BZCZ100 on it… as far as I understand from your question, I believe I have the ZCZ model.

Thanks Seth, I’ll search more about the PRU… I found this document, I’ll read it out and seek if something catch my attention.


I know very little on PRU stuff in general. I think you have the ZCZ too. This is good news (I think).

The above datasheet documentation I found is showing Mode 3 for setting up the pins.

For instance for Ball #D13, McASP0_AXR1 is the pin that corresponds to the mcasp1_axr0 muxing (P9_41).

I think this should help a bit when typing up the overlay. So, P9_42/27/41 all need to be in Mode 3.

So, Frame Sync is McASP0_FSR which is mcasp1_fsx (P9_27)

And, Bit Clock is McASP0_ACLKR which is mcasp1_aclkx (P9_42)

And then, I2S Data is McASP0_AXR1 which is __________ (P9_41) + THIS MAY BE THE ISSUE

So, P9_27 is a McASP GPIO?

/* P9_27 (ZCZ ball C13) gpio3_19 */
	P9_27_default_pin: pinmux_P9_27_default_pin { pinctrl-single,pins = <
		P9_27( PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE7) >; };	/* mcasp0_fsr.gpio3_19 */
	P9_27_gpio_pin: pinmux_P9_27_gpio_pin { pinctrl-single,pins = <
		P9_27( PIN_OUTPUT | INPUT_EN | MUX_MODE7) >; };			/* mcasp0_fsr.gpio3_19 */
	P9_27_gpio_pu_pin: pinmux_P9_27_gpio_pu_pin { pinctrl-single,pins = <
		P9_27( PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) >; };		/* mcasp0_fsr.gpio3_19 */
	P9_27_gpio_pd_pin: pinmux_P9_27_gpio_pd_pin { pinctrl-single,pins = <
		P9_27( PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE7) >; };	/* mcasp0_fsr.gpio3_19 */
	P9_27_eqep_pin: pinmux_P9_27_eqep_pin { pinctrl-single,pins = <
		P9_27( PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE1) >; };		/* mcasp0_fsr.eqep0b_in */
	P9_27_pruout_pin: pinmux_P9_27_pruout_pin { pinctrl-single,pins = <
		P9_27( PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE5) >; };	/* mcasp0_fsr.pru0_out5 */
	P9_27_pruin_pin: pinmux_P9_27_pruin_pin { pinctrl-single,pins = <
		P9_27( PIN_INPUT | MUX_MODE6) >; };				/* mcasp0_fsr.pru0_in5 */
	P9_27_mcasp_pin: pinmux_P9_27_mcasp_pin { pinctrl-single,pins = <
		P9_27( PIN_INPUT_PULLDOWN | MUX_MODE0) >; };			/* mcasp0_fsr.mcasp0_fsr */

and…P9_41 is P9_91 which is available as P9.41.1?

	/* P9_41.1 */
	/* P9_91 (ZCZ ball D13) gpio3_20 */
	P9_91_default_pin: pinmux_P9_91_default_pin { pinctrl-single,pins = <
		P9_91( PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE7) >; };	/* mcasp0_axr1.gpio3_20 */
	P9_91_gpio_pin: pinmux_P9_91_gpio_pin { pinctrl-single,pins = <
		P9_91( PIN_OUTPUT | INPUT_EN | MUX_MODE7) >; };			/* mcasp0_axr1.gpio3_20 */
	P9_91_gpio_pu_pin: pinmux_P9_91_gpio_pu_pin { pinctrl-single,pins = <
		P9_91( PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) >; };		/* mcasp0_axr1.gpio3_20 */
	P9_91_gpio_pd_pin: pinmux_P9_91_gpio_pd_pin { pinctrl-single,pins = <
		P9_91( PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE7) >; };	/* mcasp0_axr1.gpio3_20 */
	P9_91_eqep_pin: pinmux_P9_91_eqep_pin { pinctrl-single,pins = <
		P9_91( PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE1) >; };		/* mcasp0_axr1.eqep0_index */
	P9_91_pruout_pin: pinmux_P9_91_pruout_pin { pinctrl-single,pins = <
		P9_91( PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE5) >; };	/* mcasp0_axr1.pru0_out6 */
	P9_91_pruin_pin: pinmux_P9_91_pruin_pin { pinctrl-single,pins = <
		P9_91( PIN_INPUT | MUX_MODE6) >; };				/* mcasp0_axr1.pru0_in6 */

and then P9.42, which I called the issue may be done but as P9_42.1 as listed below:

	/* P9_42.1 */
	/* P9_92 (ZCZ ball B12) gpio3_18 */
	P9_92_default_pin: pinmux_P9_92_default_pin { pinctrl-single,pins = <
		P9_92( PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE7) >; };	/* mcasp0_aclkr.gpio3_18 */
	P9_92_gpio_pin: pinmux_P9_92_gpio_pin { pinctrl-single,pins = <
		P9_92( PIN_OUTPUT | INPUT_EN | MUX_MODE7) >; };			/* mcasp0_aclkr.gpio3_18 */
	P9_92_gpio_pu_pin: pinmux_P9_92_gpio_pu_pin { pinctrl-single,pins = <
		P9_92( PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE7) >; };		/* mcasp0_aclkr.gpio3_18 */
	P9_92_gpio_pd_pin: pinmux_P9_92_gpio_pd_pin { pinctrl-single,pins = <
		P9_92( PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE7) >; };	/* mcasp0_aclkr.gpio3_18 */
	P9_92_eqep_pin: pinmux_P9_92_eqep_pin { pinctrl-single,pins = <
		P9_92( PIN_OUTPUT_PULLUP | INPUT_EN | MUX_MODE1) >; };		/* mcasp0_aclkr.eqep0a_in */
	P9_92_pruout_pin: pinmux_P9_92_pruout_pin { pinctrl-single,pins = <
		P9_92( PIN_OUTPUT_PULLDOWN | INPUT_EN | MUX_MODE5) >; };	/* mcasp0_aclkr.pru0_out4 */
	P9_92_pruin_pin: pinmux_P9_92_pruin_pin { pinctrl-single,pins = <
		P9_92( PIN_INPUT | MUX_MODE6) >; };				/* mcasp0_aclkr.pru0_in4 */

I know this may be short or not to the point. I think this is done for a reason. The reason is out of my control.


P.S. I do not know the difference between P9_THE_PIN and P9_THE_PIN.1 and so I am lost. I will keep researching.


The ZCZ and ZCE package is a bit awkward… I say that b/c in the datasheet, one can use straight ZCZ or the ZCZ/ZCE package which is more complicated but can be noted down and done…

Another Update:

P9_27 has the incorrect ball allocated to it these days (I think) for i2s use:

# P9_27 for Kernel 4.19.x at am335x-bone-common-univ.dtsi

	/* P9_27 (ZCZ ball C13) */
	P9_27_pinmux {
		compatible = "bone-pinmux-helper";
		status = "okay";
		pinctrl-names = "default", "gpio", "gpio_pu", "gpio_pd", "eqep", "pruout", "pruin";
		pinctrl-0 = <&P9_27_default_pin>;
		pinctrl-1 = <&P9_27_gpio_pin>;
		pinctrl-2 = <&P9_27_gpio_pu_pin>;
		pinctrl-3 = <&P9_27_gpio_pd_pin>;
		pinctrl-4 = <&P9_27_eqep_pin>;
		pinctrl-5 = <&P9_27_pruout_pin>;
		pinctrl-6 = <&P9_27_pruin_pin>;
		pinctrl-7 = <&P9_27_mcasp_pin>;

I looked up the McASP1 definitions at ZCZ and ZCE/ZCZ pins but have not come across the what is pinctrl-0-8.

I will check kernel 5.10.x soon.

But okay about your conclusion: I guess using HDMI and McASP0 may be the only way w/out getting some of the people involved. I am a community person trying only and dually noted, by myself here. So, some things are a bit convoluted.


p. 208 in sprs717l is a start w/ McASP in general. I think I may be out for the night. Good luck until next time. Okay.

And more ideas…

p. 208 provides me nothing. I think looking at the balls, BGA on the am335x, to see what exactly is available and if it is muxed will provide a better solution, e.g. whether to contact the people to try to make your system function or keep dealing w/ guess work from me. No offense and I am sorry if I cornered you, in a sense, into thinking I could provide a 100% solution.

So, please forgive me. I cannot provide the exact solution but only clues is all I can offer. The beagleboard people are fully in charge of their own OS and what they will accept to be a part to their organization. I am sort of like a lamprey on a shark (just some user that enjoys computing).

Update and this may help?

  CC [M]  sound/core/oss/snd-mixer-oss.mod.o
  LD [M]  sound/core/oss/snd-mixer-oss.ko
  CC [M]  sound/core/oss/snd-pcm-oss.mod.o
  LD [M]  sound/core/oss/snd-pcm-oss.ko
  CC [M]  sound/core/snd-hwdep.mod.o
  LD [M]  sound/core/snd-hwdep.ko
  CC [M]  sound/core/snd-pcm-dmaengine.mod.o
  LD [M]  sound/core/snd-pcm-dmaengine.ko
  CC [M]  sound/core/snd-pcm.mod.o
  LD [M]  sound/core/snd-pcm.ko
  CC [M]  sound/core/snd-rawmidi.mod.o
  LD [M]  sound/core/snd-rawmidi.ko
  CC [M]  sound/core/snd-timer.mod.o
  LD [M]  sound/core/snd-timer.ko
  CC [M]  sound/core/snd.mod.o
  LD [M]  sound/core/snd.ko
  CC [M]  sound/soc/codecs/snd-soc-cpcap.mod.o
  LD [M]  sound/soc/codecs/snd-soc-cpcap.ko
  CC [M]  sound/soc/codecs/snd-soc-hdmi-codec.mod.o
  LD [M]  sound/soc/codecs/snd-soc-hdmi-codec.ko
  CC [M]  sound/soc/codecs/snd-soc-tlv320aic23-i2c.mod.o
  LD [M]  sound/soc/codecs/snd-soc-tlv320aic23-i2c.ko
  CC [M]  sound/soc/codecs/snd-soc-tlv320aic23.mod.o
  LD [M]  sound/soc/codecs/snd-soc-tlv320aic23.ko
  CC [M]  sound/soc/codecs/snd-soc-tlv320aic3x.mod.o
  LD [M]  sound/soc/codecs/snd-soc-tlv320aic3x.ko
  CC [M]  sound/soc/codecs/snd-soc-tpa6130a2.mod.o
  LD [M]  sound/soc/codecs/snd-soc-tpa6130a2.ko
  CC [M]  sound/soc/codecs/snd-soc-twl4030.mod.o
  LD [M]  sound/soc/codecs/snd-soc-twl4030.ko
  CC [M]  sound/soc/codecs/snd-soc-twl6040.mod.o
  LD [M]  sound/soc/codecs/snd-soc-twl6040.ko
  CC [M]  sound/soc/generic/snd-soc-audio-graph-card.mod.o
  LD [M]  sound/soc/generic/snd-soc-audio-graph-card.ko
  CC [M]  sound/soc/generic/snd-soc-simple-card-utils.mod.o
  LD [M]  sound/soc/generic/snd-soc-simple-card-utils.ko
  CC [M]  sound/soc/generic/snd-soc-simple-card.mod.o
  LD [M]  sound/soc/generic/snd-soc-simple-card.ko
  CC [M]  sound/soc/snd-soc-core.mod.o
  LD [M]  sound/soc/snd-soc-core.ko
  CC [M]  sound/soc/ti/snd-soc-davinci-mcasp.mod.o
  LD [M]  sound/soc/ti/snd-soc-davinci-mcasp.ko
  CC [M]  sound/soc/ti/snd-soc-omap-abe-twl6040.mod.o
  LD [M]  sound/soc/ti/snd-soc-omap-abe-twl6040.ko
  CC [M]  sound/soc/ti/snd-soc-omap-dmic.mod.o
  LD [M]  sound/soc/ti/snd-soc-omap-dmic.ko
  CC [M]  sound/soc/ti/snd-soc-omap-hdmi.mod.o
  LD [M]  sound/soc/ti/snd-soc-omap-hdmi.ko
  CC [M]  sound/soc/ti/snd-soc-omap-mcbsp.mod.o
  LD [M]  sound/soc/ti/snd-soc-omap-mcbsp.ko
  CC [M]  sound/soc/ti/snd-soc-omap-mcpdm.mod.o
  LD [M]  sound/soc/ti/snd-soc-omap-mcpdm.ko
  CC [M]  sound/soc/ti/snd-soc-omap-twl4030.mod.o
  LD [M]  sound/soc/ti/snd-soc-omap-twl4030.ko
  CC [M]  sound/soc/ti/snd-soc-omap3pandora.mod.o
  LD [M]  sound/soc/ti/snd-soc-omap3pandora.ko
  CC [M]  sound/soc/ti/snd-soc-rx51.mod.o
  LD [M]  sound/soc/ti/snd-soc-rx51.ko
  CC [M]  sound/soc/ti/snd-soc-ti-edma.mod.o
  LD [M]  sound/soc/ti/snd-soc-ti-edma.ko
  CC [M]  sound/soc/ti/snd-soc-ti-sdma.mod.o
  LD [M]  sound/soc/ti/snd-soc-ti-sdma.ko
  CC [M]  sound/soc/ti/snd-soc-ti-udma.mod.o
  LD [M]  sound/soc/ti/snd-soc-ti-udma.ko
  CC [M]  sound/soundcore.mod.o
  LD [M]  sound/soundcore.ko
  CC [M]  sound/usb/snd-usb-audio.mod.o
  LD [M]  sound/usb/snd-usb-audio.ko
  CC [M]  sound/usb/snd-usbmidi-lib.mod.o
  LD [M]  sound/usb/snd-usbmidi-lib.ko

Do any of those files look like winners?