[alsa-devel] audio mcbsp1 broken for beagleboard-xm -OMAP
Hello,
I am trying to integrate max98090 codec with $subject board. I am running the mcBSP in slave mode as i have not changed the hw_parms for omap-twl4030.c file. With below changes i see wait_for_avail is getting stuck i.e. mcbsp is not getting any interrupt and nothing is playing.
Kernel version: VERSION = 3 PATCHLEVEL = 19 SUBLEVEL = 0 EXTRAVERSION = NAME = Diseased Newt
Setup information: Using beagle board -xm and connected max98090 codec to mcbsp1 pins. Connected only 4 pins.
Changed the omap-twl4030.c machine file as below to disable the twl4030: static struct snd_soc_dai_link omap_twl4030_dai_links[] = { { + .name = "max98090", + .stream_name = "max98090", .cpu_dai_name = "omap-mcbsp.1", + .codec_dai_name = "HiFi", .platform_name = "omap-mcbsp.1", + .codec_name = "max98090.1-0010", .ops = &omap_twl4030_ops, },
DTSI file change:arch/arm/boot/dts/omap3-beagle-xm.dts
&i2c2 { clock-frequency = <400000>; + + max98090: max98090@10 { + compatible = "maxim,max98090"; + reg = <0x10>; + }; };
omap/omap-twl4030.c added in hw_params below function to set internal oscillator for 98090 for generating PLL for master clock. snd_soc_dai_set_sysclk(codec_dai, 26000000, 0, SND_SOC_CLOCK_IN);
I am able to see that the cpu_dai is mapped with codec_dai and configuration is ok. kernel logs at https://ideone.com/oezNSj
I think i don't need to configure the mcbsp1 pins right as it uses default.
Please guide me.I have tried IRC channel also but not getting the right folks.
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_...
Thanks,
Hi,
On 02/20/2015 08:45 AM, noman pouigt wrote:
Hello,
I am trying to integrate max98090 codec with $subject board. I am running the mcBSP in slave mode as i have not changed the hw_parms for omap-twl4030.c file. With below changes i see wait_for_avail is getting stuck i.e. mcbsp is not getting any interrupt and nothing is playing.
I have tested the XM with twl4030 on linux-next and McBSP is working fine as slave and master (I have a patch to add the McBSP master support for testing) also.
Kernel version: VERSION = 3 PATCHLEVEL = 19 SUBLEVEL = 0 EXTRAVERSION = NAME = Diseased Newt
Setup information: Using beagle board -xm and connected max98090 codec to mcbsp1 pins. Connected only 4 pins.
Changed the omap-twl4030.c machine file as below to disable the twl4030: static struct snd_soc_dai_link omap_twl4030_dai_links[] = { {
.name = "max98090",
.stream_name = "max98090", .cpu_dai_name = "omap-mcbsp.1",
Hrm, mcbsp.1 is not in use by default on the board, 2 and 3 are the one which is used by the omap-twl4030 driver.
.codec_dai_name = "HiFi", .platform_name = "omap-mcbsp.1",
.codec_name = "max98090.1-0010", .ops = &omap_twl4030_ops, },
DTSI file change:arch/arm/boot/dts/omap3-beagle-xm.dts
&i2c2 { clock-frequency = <400000>;
max98090: max98090@10 {
compatible = "maxim,max98090";
reg = <0x10>;
};
};
omap/omap-twl4030.c added in hw_params below function to set internal oscillator for 98090 for generating PLL for master clock. snd_soc_dai_set_sysclk(codec_dai, 26000000, 0, SND_SOC_CLOCK_IN);
I am able to see that the cpu_dai is mapped with codec_dai and configuration is ok. kernel logs at https://ideone.com/oezNSj
I think i don't need to configure the mcbsp1 pins right as it uses default.
I think you should check the pin mux for the McBSP1 pins. They might not set to correct mode.
Please guide me.I have tried IRC channel also but not getting the right folks.
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_...
Thanks,
On Fri, Feb 20, 2015 at 8:24 AM, Peter Ujfalusi peter.ujfalusi@ti.com wrote:
Hi,
On 02/20/2015 08:45 AM, noman pouigt wrote:
Hello,
I am trying to integrate max98090 codec with $subject board. I am running the mcBSP in slave mode as i have not changed the hw_parms for omap-twl4030.c file. With below changes i see wait_for_avail is getting stuck i.e. mcbsp is not getting any interrupt and nothing is playing.
I have tested the XM with twl4030 on linux-next and McBSP is working fine as slave and master (I have a patch to add the McBSP master support for testing) also.
Kernel version: VERSION = 3 PATCHLEVEL = 19 SUBLEVEL = 0 EXTRAVERSION = NAME = Diseased Newt
Setup information: Using beagle board -xm and connected max98090 codec to mcbsp1 pins. Connected only 4 pins.
Changed the omap-twl4030.c machine file as below to disable the twl4030: static struct snd_soc_dai_link omap_twl4030_dai_links[] = { {
.name = "max98090",
.stream_name = "max98090", .cpu_dai_name = "omap-mcbsp.1",
Hrm, mcbsp.1 is not in use by default on the board, 2 and 3 are the one which is used by the omap-twl4030 driver.
I have used the mcbsp3 also as below where i am running codec in master and mcbsp3 in slave mode. Configuration for that is below:
compatible = "ti,omap-twl4030"; ti,model = "omap3beagle"; - ti,mcbsp = <&mcbsp2>; - ti,codec = <&twl_audio>; + ti,mcbsp = <&mcbsp3>; + ti,codec = <&max98090>;
&omap3_pmx_core {
+ mcbsp3_pins: pinmux_mcbsp3_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x216c, PIN_OUTPUT | MUX_MODE1) /* mcbsp3_dx.uart2_cts */ + OMAP3_CORE1_IOPAD(0x216e, PIN_INPUT | MUX_MODE1) /* mcbsp3_dr.uart2_rts */ + OMAP3_CORE1_IOPAD(0x2170, PIN_INPUT | MUX_MODE1) /* mcbsp3_clk.uart2_tx */ + OMAP3_CORE1_IOPAD(0x2172, PIN_INPUT | MUX_MODE0) /* mcbsp3_fsx.uart2_rx */ + >; + }; }
&mcbsp3 { pinctrl-names = "default"; pinctrl-0 = <&mcbsp3_pins>;
status = "okay"; };
However still the interrupts doesn't get generated. Can you please guide in right direction? I have checked the mcbsp1_fsx and mcbsp1_clkx and both the clocks generated are right i.e. one is 8k and other is multiple of it.
On the data line i can see only zeroes. Probably dsp is filling it with zeroes as generally done by Qualcomm dsp.
.codec_dai_name = "HiFi", .platform_name = "omap-mcbsp.1",
.codec_name = "max98090.1-0010", .ops = &omap_twl4030_ops, },
DTSI file change:arch/arm/boot/dts/omap3-beagle-xm.dts
&i2c2 { clock-frequency = <400000>;
max98090: max98090@10 {
compatible = "maxim,max98090";
reg = <0x10>;
};
};
omap/omap-twl4030.c added in hw_params below function to set internal oscillator for 98090 for generating PLL for master clock. snd_soc_dai_set_sysclk(codec_dai, 26000000, 0, SND_SOC_CLOCK_IN);
I am able to see that the cpu_dai is mapped with codec_dai and configuration is ok. kernel logs at https://ideone.com/oezNSj
I think i don't need to configure the mcbsp1 pins right as it uses default.
I think you should check the pin mux for the McBSP1 pins. They might not set to correct mode.
Please guide me.I have tried IRC channel also but not getting the right folks.
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_...
Thanks,
-- Péter
On 02/20/2015 08:45 AM, noman pouigt wrote:
Hello,
I am trying to integrate max98090 codec with $subject board. I am running the mcBSP in slave mode as i have not changed the hw_parms for omap-twl4030.c file. With below changes i see wait_for_avail is getting stuck i.e. mcbsp is not getting any interrupt and nothing is playing.
Kernel version: VERSION = 3 PATCHLEVEL = 19 SUBLEVEL = 0 EXTRAVERSION = NAME = Diseased Newt
Setup information: Using beagle board -xm and connected max98090 codec to mcbsp1 pins. Connected only 4 pins.
Changed the omap-twl4030.c machine file as below to disable the twl4030: static struct snd_soc_dai_link omap_twl4030_dai_links[] = { {
.name = "max98090",
.stream_name = "max98090", .cpu_dai_name = "omap-mcbsp.1",
.codec_dai_name = "HiFi", .platform_name = "omap-mcbsp.1",
.codec_name = "max98090.1-0010", .ops = &omap_twl4030_ops, },
DTSI file change:arch/arm/boot/dts/omap3-beagle-xm.dts
&i2c2 { clock-frequency = <400000>;
max98090: max98090@10 {
compatible = "maxim,max98090";
reg = <0x10>;
};
};
You also need to change the dts file's sound node, enable mcbsp1, set the pinctrl entries, etc if you boot with DT.
omap/omap-twl4030.c added in hw_params below function to set internal oscillator for 98090 for generating PLL for master clock. snd_soc_dai_set_sysclk(codec_dai, 26000000, 0, SND_SOC_CLOCK_IN);
I am able to see that the cpu_dai is mapped with codec_dai and configuration is ok. kernel logs at https://ideone.com/oezNSj
I think i don't need to configure the mcbsp1 pins right as it uses default.
Please guide me.I have tried IRC channel also but not getting the right folks.
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_...
Thanks,
On Fri, Feb 20, 2015 at 8:27 AM, Peter Ujfalusi peter.ujfalusi@ti.com wrote:
On 02/20/2015 08:45 AM, noman pouigt wrote:
Hello,
I am trying to integrate max98090 codec with $subject board. I am running the mcBSP in slave mode as i have not changed the hw_parms for omap-twl4030.c file. With below changes i see wait_for_avail is getting stuck i.e. mcbsp is not getting any interrupt and nothing is playing.
Kernel version: VERSION = 3 PATCHLEVEL = 19 SUBLEVEL = 0 EXTRAVERSION = NAME = Diseased Newt
Setup information: Using beagle board -xm and connected max98090 codec to mcbsp1 pins. Connected only 4 pins.
Changed the omap-twl4030.c machine file as below to disable the twl4030: static struct snd_soc_dai_link omap_twl4030_dai_links[] = { {
.name = "max98090",
.stream_name = "max98090", .cpu_dai_name = "omap-mcbsp.1",
.codec_dai_name = "HiFi", .platform_name = "omap-mcbsp.1",
.codec_name = "max98090.1-0010", .ops = &omap_twl4030_ops, },
DTSI file change:arch/arm/boot/dts/omap3-beagle-xm.dts
&i2c2 { clock-frequency = <400000>;
max98090: max98090@10 {
compatible = "maxim,max98090";
reg = <0x10>;
};
};
You also need to change the dts file's sound node, enable mcbsp1, set the pinctrl entries, etc if you boot with DT.
Yes and it is done as below:
&omap3_pmx_core { mcbsp1_pins: pinmux_mcbsp1_pins { pinctrl-single,pins = < OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT | MUX_MODE0) OMAP3_CORE1_IOPAD(0x2190, PIN_INPUT | MUX_MODE0) OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0) >; }; }
sound { - ti,mcbsp = <&mcbsp2>; - ti,codec = <&twl_audio>; + ti,mcbsp = <&mcbsp1>; + ti,codec = <&max98090>; }
&mcbsp1 { pinctrl-names = "default"; pinctrl-0 = <&mcbsp1_pins>;
status = "okay"; };
&i2c2 { clock-frequency = <400000>;
max98090: max98090@10 { compatible = "maxim,max98090"; reg = <0x10>; }; };
all other changes remain the same. Have i done muxing wrong? I am still stuck with mcbsp not getting interrupt. please find the dts file here http://ideone.com/TPFkBv
I connected digital output of 98090 to mcbsp1_dr and digital receive to mcbsp1_dx. I can see the bit clock and lrclk is coming fine from 98090. As already mentioned i have connected lrclk, bit clock, DR and DX only.
Kernel logs here: http://ideone.com/hDHq2l
omap/omap-twl4030.c added in hw_params below function to set internal oscillator for 98090 for generating PLL for master clock. snd_soc_dai_set_sysclk(codec_dai, 26000000, 0, SND_SOC_CLOCK_IN);
I am able to see that the cpu_dai is mapped with codec_dai and configuration is ok. kernel logs at https://ideone.com/oezNSj
I think i don't need to configure the mcbsp1 pins right as it uses default.
Please guide me.I have tried IRC channel also but not getting the right folks.
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_...
Thanks,
-- Péter
On 02/21/2015 04:36 AM, noman pouigt wrote:
On Fri, Feb 20, 2015 at 8:27 AM, Peter Ujfalusi peter.ujfalusi@ti.com wrote:
On 02/20/2015 08:45 AM, noman pouigt wrote:
Hello,
I am trying to integrate max98090 codec with $subject board. I am running the mcBSP in slave mode as i have not changed the hw_parms for omap-twl4030.c file. With below changes i see wait_for_avail is getting stuck i.e. mcbsp is not getting any interrupt and nothing is playing.
Kernel version: VERSION = 3 PATCHLEVEL = 19 SUBLEVEL = 0 EXTRAVERSION = NAME = Diseased Newt
Setup information: Using beagle board -xm and connected max98090 codec to mcbsp1 pins. Connected only 4 pins.
Changed the omap-twl4030.c machine file as below to disable the twl4030: static struct snd_soc_dai_link omap_twl4030_dai_links[] = { {
.name = "max98090",
.stream_name = "max98090", .cpu_dai_name = "omap-mcbsp.1",
.codec_dai_name = "HiFi", .platform_name = "omap-mcbsp.1",
.codec_name = "max98090.1-0010", .ops = &omap_twl4030_ops, },
DTSI file change:arch/arm/boot/dts/omap3-beagle-xm.dts
&i2c2 { clock-frequency = <400000>;
max98090: max98090@10 {
compatible = "maxim,max98090";
reg = <0x10>;
};
};
You also need to change the dts file's sound node, enable mcbsp1, set the pinctrl entries, etc if you boot with DT.
Yes and it is done as below:
&omap3_pmx_core { mcbsp1_pins: pinmux_mcbsp1_pins { pinctrl-single,pins = < OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT | MUX_MODE0) OMAP3_CORE1_IOPAD(0x2190, PIN_INPUT | MUX_MODE0) OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0)
Should be: OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) /* CLKX */ OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0) /* FSX */ OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0) /* DR */ OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0) /* DX */
And make sure to connect lrclk/bclk to FSX/CLKX (not to FSR/CLKR) of McBSP1.
I have tested on on my xM that McBSP1 in master mode works, DMA is running (I do not have anything connected to pins).
>; };
}
sound {
ti,mcbsp = <&mcbsp2>;
ti,codec = <&twl_audio>;
ti,mcbsp = <&mcbsp1>;
ti,codec = <&max98090>; }
&mcbsp1 { pinctrl-names = "default"; pinctrl-0 = <&mcbsp1_pins>;
status = "okay";
};
&i2c2 { clock-frequency = <400000>;
max98090: max98090@10 { compatible = "maxim,max98090"; reg = <0x10>; };
};
all other changes remain the same. Have i done muxing wrong? I am still stuck with mcbsp not getting interrupt. please find the dts file here http://ideone.com/TPFkBv
I connected digital output of 98090 to mcbsp1_dr and digital receive to mcbsp1_dx. I can see the bit clock and lrclk is coming fine from 98090. As already mentioned i have connected lrclk, bit clock, DR and DX only.
Kernel logs here: http://ideone.com/hDHq2l
omap/omap-twl4030.c added in hw_params below function to set internal oscillator for 98090 for generating PLL for master clock. snd_soc_dai_set_sysclk(codec_dai, 26000000, 0, SND_SOC_CLOCK_IN);
I am able to see that the cpu_dai is mapped with codec_dai and configuration is ok. kernel logs at https://ideone.com/oezNSj
I think i don't need to configure the mcbsp1 pins right as it uses default.
Please guide me.I have tried IRC channel also but not getting the right folks.
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_...
Thanks,
-- Péter
On Wed, Feb 25, 2015 at 1:40 AM, Peter Ujfalusi peter.ujfalusi@ti.com wrote:
On 02/21/2015 04:36 AM, noman pouigt wrote:
On Fri, Feb 20, 2015 at 8:27 AM, Peter Ujfalusi peter.ujfalusi@ti.com wrote:
On 02/20/2015 08:45 AM, noman pouigt wrote:
Hello,
I am trying to integrate max98090 codec with $subject board. I am running the mcBSP in slave mode as i have not changed the hw_parms for omap-twl4030.c file. With below changes i see wait_for_avail is getting stuck i.e. mcbsp is not getting any interrupt and nothing is playing.
Kernel version: VERSION = 3 PATCHLEVEL = 19 SUBLEVEL = 0 EXTRAVERSION = NAME = Diseased Newt
Setup information: Using beagle board -xm and connected max98090 codec to mcbsp1 pins. Connected only 4 pins.
Changed the omap-twl4030.c machine file as below to disable the twl4030: static struct snd_soc_dai_link omap_twl4030_dai_links[] = { {
.name = "max98090",
.stream_name = "max98090", .cpu_dai_name = "omap-mcbsp.1",
.codec_dai_name = "HiFi", .platform_name = "omap-mcbsp.1",
.codec_name = "max98090.1-0010", .ops = &omap_twl4030_ops, },
DTSI file change:arch/arm/boot/dts/omap3-beagle-xm.dts
&i2c2 { clock-frequency = <400000>;
max98090: max98090@10 {
compatible = "maxim,max98090";
reg = <0x10>;
};
};
You also need to change the dts file's sound node, enable mcbsp1, set the pinctrl entries, etc if you boot with DT.
Yes and it is done as below:
&omap3_pmx_core { mcbsp1_pins: pinmux_mcbsp1_pins { pinctrl-single,pins = < OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) OMAP3_CORE1_IOPAD(0x2194, PIN_INPUT | MUX_MODE0) OMAP3_CORE1_IOPAD(0x2190, PIN_INPUT | MUX_MODE0) OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0)
Should be: OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) /* CLKX */ OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0) /* FSX */ OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0) /* DR */ OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0) /* DX */
And make sure to connect lrclk/bclk to FSX/CLKX (not to FSR/CLKR) of McBSP1.
I have tested on on my xM that McBSP1 in master mode works, DMA is running (I do not have anything connected to pins).
Thanks for this. Thomas Niederprüm was kind enough to provide also the same details. So summarizing it as below:
Inorder to use mcbsp1 pins connected to the auxillary header in beagleboard-xm we have to do the configure the below pins as output/input depending on what is who is running as master or slave.
As stated in the DM3730 TRM the register offsets for the mcbsp1 pins are: 0x218C -> mcbsp1_clkr 0x218E -> mcbsp1_fsr 0x2190 -> mcbsp1_dx 0x2192 -> mcbsp1_dr 0x2194 -> mcbsp1_clks (not exposed) 0x2196 -> mcbsp1_fsx 0x2198 -> mcbsp1_clkx
Also note that the pins mcbsp1_clkr, mcbsp1_dx, mcbsp1_dr and mcbsp1_fsx interfere with the mcspi4 pins. So if you use those pins it might be worth to disable mcspi4:
&mcspi4 { status = "disabled"; };
In my case i was running as mcbsp as slave and my codec as master.For this configuration i did muxing as below in device tree file.
+ mcbsp1_pins: pinmux_mcbsp1_pins { + pinctrl-single,pins = < + OMAP3_CORE1_IOPAD(0x2196, PIN_INPUT | MUX_MODE0) + OMAP3_CORE1_IOPAD(0x2198, PIN_INPUT | MUX_MODE0) + OMAP3_CORE1_IOPAD(0x2190, PIN_OUTPUT | MUX_MODE0) + OMAP3_CORE1_IOPAD(0x2192, PIN_INPUT | MUX_MODE0) + >; + };
>; };
}
sound {
ti,mcbsp = <&mcbsp2>;
ti,codec = <&twl_audio>;
ti,mcbsp = <&mcbsp1>;
ti,codec = <&max98090>; }
&mcbsp1 { pinctrl-names = "default"; pinctrl-0 = <&mcbsp1_pins>;
status = "okay";
};
&i2c2 { clock-frequency = <400000>;
max98090: max98090@10 { compatible = "maxim,max98090"; reg = <0x10>; };
};
all other changes remain the same. Have i done muxing wrong? I am still stuck with mcbsp not getting interrupt. please find the dts file here http://ideone.com/TPFkBv
I connected digital output of 98090 to mcbsp1_dr and digital receive to mcbsp1_dx. I can see the bit clock and lrclk is coming fine from 98090. As already mentioned i have connected lrclk, bit clock, DR and DX only.
Kernel logs here: http://ideone.com/hDHq2l
omap/omap-twl4030.c added in hw_params below function to set internal oscillator for 98090 for generating PLL for master clock. snd_soc_dai_set_sysclk(codec_dai, 26000000, 0, SND_SOC_CLOCK_IN);
I am able to see that the cpu_dai is mapped with codec_dai and configuration is ok. kernel logs at https://ideone.com/oezNSj
I think i don't need to configure the mcbsp1 pins right as it uses default.
Please guide me.I have tried IRC channel also but not getting the right folks.
https://github.com/CircuitCo/BeagleBoard-xM-RevC/blob/master/BeagleBoard-xM_...
Thanks,
-- Péter
-- Péter
participants (2)
-
noman pouigt
-
Peter Ujfalusi