[alsa-devel] IMX WM8740 I2S support
Dear all,
I'm currently working on supporting WM8740 device software configured with imx6q system. For now my driver seems to be configured correctly. The playback is launched but i get: ALSA sound/core/pcm_lib.c:1822 playback write error (DMA or IRQ trouble? write error: Input/output error
The imx ssi is not sending me any data on I2S bus( nothing can be seen on the oscillo).
I would like to know how do I have to configure my master clock in order to launch the I2S. My master clock is for now 24MHz. Sorry to be confused a bit but i'm quite newbie with this device. Best regards.
Stéphane
On Wed, Sep 25, 2013 at 10:08 AM, stéphane cerveau scerveau@gmail.com wrote:
Dear all,
I'm currently working on supporting WM8740 device software configured with imx6q system. For now my driver seems to be configured correctly. The playback is launched but i get: ALSA sound/core/pcm_lib.c:1822 playback write error (DMA or IRQ trouble? write error: Input/output error
This may indicate that you are missing the SDMA firmware for the mx6. (linux/firmware/sdma/sdma-imx6q.bin)
Starting on 3.12-rc1 you don't need the SDMA firmware for audio playback anymore.
So I would suggest one of the above methods.
Regards,
Fabio Estevam
Thx for your answer. I checked in the folder linux/firmware/imx/sdma/ and there is these files:
1928 Sep 19 11:13 sdma-imx25-to1.bin.ihex 10340 Sep 19 11:13 sdma-imx31-to1.bin.ihex 10368 Sep 19 11:13 sdma-imx31-to2.bin.ihex 5544 Sep 19 11:13 sdma-imx35-to1.bin.ihex 4824 Sep 19 11:13 sdma-imx35-to2.bin.ihex 1532 Sep 19 11:13 sdma-imx50-to1.bin.ihex 2248 Sep 19 11:13 sdma-imx51-to3.bin.ihex 3880 Sep 19 11:13 sdma-imx53-to1.bin.ihex 1838 Sep 19 11:17 sdma-imx6q-to1.bin 2868 Sep 19 11:17 sdma-imx6q-to1.bin.gen.o 1482 Sep 19 11:17 .sdma-imx6q-to1.bin.gen.o.cmd 510 Sep 19 11:17 sdma-imx6q-to1.bin.gen.S 5068 Sep 19 11:13 sdma-imx6q-to1.bin.ihex
As you can see the sdma-imx6q-to1.bin.gen.o is correctly built. How can i check that the firmware is correctly loaded? What is the purpose of this firmware seen that wm8962 is working fine in SND_SOC_DAIFMT_DSP_B. My point is using AUD_MUX4 with I2S protocol. Best regards.
Stephane
On 09/25/2013 03:12 PM, Fabio Estevam wrote:
On Wed, Sep 25, 2013 at 10:08 AM, stéphane cerveau scerveau@gmail.com wrote:
Dear all,
I'm currently working on supporting WM8740 device software configured with imx6q system. For now my driver seems to be configured correctly. The playback is launched but i get: ALSA sound/core/pcm_lib.c:1822 playback write error (DMA or IRQ trouble? write error: Input/output error
This may indicate that you are missing the SDMA firmware for the mx6. (linux/firmware/sdma/sdma-imx6q.bin)
Starting on 3.12-rc1 you don't need the SDMA firmware for audio playback anymore.
So I would suggest one of the above methods.
Regards,
Fabio Estevam
Here is a log from the kernel:
imx-sdma imx-sdma: loaded firmware 1.1 imx-sdma imx-sdma: initialized
Best regards.
Stéphane
On 09/25/2013 03:12 PM, Fabio Estevam wrote:
On Wed, Sep 25, 2013 at 10:08 AM, stéphane cerveau scerveau@gmail.com wrote:
Dear all,
I'm currently working on supporting WM8740 device software configured with imx6q system. For now my driver seems to be configured correctly. The playback is launched but i get: ALSA sound/core/pcm_lib.c:1822 playback write error (DMA or IRQ trouble? write error: Input/output error
This may indicate that you are missing the SDMA firmware for the mx6. (linux/firmware/sdma/sdma-imx6q.bin)
Starting on 3.12-rc1 you don't need the SDMA firmware for audio playback anymore.
So I would suggest one of the above methods.
Regards,
Fabio Estevam
On Wed, Sep 25, 2013 at 10:56 AM, stéphane cerveau scerveau@gmail.com wrote:
Here is a log from the kernel:
imx-sdma imx-sdma: loaded firmware 1.1 imx-sdma imx-sdma: initialized
Ok, then you have the sdma firmware loaded and your issue is a different one.
Maybe you could post your code here so that people could look at it.
Regards,
Fabio Estevam
Dear all,
I succeeded to make AUDMUX4 output I2S data and clock. I needed to define this in board setup: MX6Q_PAD_DISP0_DAT20__AUDMUX_AUD4_TXC, MX6Q_PAD_DISP0_DAT21__AUDMUX_AUD4_TXD, MX6Q_PAD_DISP0_DAT22__AUDMUX_AUD4_TXFS, MX6Q_PAD_DISP0_DAT23__AUDMUX_AUD4_RXD, Now i need to define my clock as a compatible clock with the wm8740 I guess i have to set a sys clock and then divide it with ssi help function according to the sample rate, right ? I need to cleanup my code which is full of logs for now before sending it.
Steph
On 09/25/2013 06:37 PM, Fabio Estevam wrote:
On Wed, Sep 25, 2013 at 10:56 AM, stéphane cerveau scerveau@gmail.com wrote:
Here is a log from the kernel:
imx-sdma imx-sdma: loaded firmware 1.1 imx-sdma imx-sdma: initialized
Ok, then you have the sdma firmware loaded and your issue is a different one.
Maybe you could post your code here so that people could look at it.
Regards,
Fabio Estevam
On Wed, Sep 25, 2013 at 1:42 PM, stéphane cerveau scerveau@gmail.com wrote:
Dear all,
I succeeded to make AUDMUX4 output I2S data and clock. I needed to define this in board setup: MX6Q_PAD_DISP0_DAT20__AUDMUX_AUD4_TXC, MX6Q_PAD_DISP0_DAT21__AUDMUX_AUD4_TXD, MX6Q_PAD_DISP0_DAT22__AUDMUX_AUD4_TXFS, MX6Q_PAD_DISP0_DAT23__AUDMUX_AUD4_RXD,
Keep in mind, that we setup the iomux in device tree now.
Could please enlight me concerning the device tree, i'm not sure to understand ? BR
Stephane On 09/25/2013 06:53 PM, Fabio Estevam wrote:
On Wed, Sep 25, 2013 at 1:42 PM, stéphane cerveau scerveau@gmail.com wrote:
Dear all,
I succeeded to make AUDMUX4 output I2S data and clock. I needed to define this in board setup: MX6Q_PAD_DISP0_DAT20__AUDMUX_AUD4_TXC, MX6Q_PAD_DISP0_DAT21__AUDMUX_AUD4_TXD, MX6Q_PAD_DISP0_DAT22__AUDMUX_AUD4_TXFS, MX6Q_PAD_DISP0_DAT23__AUDMUX_AUD4_RXD,
Keep in mind, that we setup the iomux in device tree now.
On Wed, Sep 25, 2013 at 1:58 PM, stéphane cerveau scerveau@gmail.com wrote:
Could please enlight me concerning the device tree, i'm not sure to understand ?
In mainline kernel we no longer use board files to describe the hardware.
We use device tree instead. For an example of a mx6 board device tree: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/ar...
So I would suggest you that you first add device tree support to your board in mainline kernel and then you add audio support.
Regards,
Fabio Estevam
participants (2)
-
Fabio Estevam
-
stéphane cerveau