All of lore.kernel.org
 help / color / mirror / Atom feed
* IMX WM8740 I2S support
@ 2013-09-25 13:08 stéphane cerveau
  2013-09-25 13:12 ` Fabio Estevam
  0 siblings, 1 reply; 11+ messages in thread
From: stéphane cerveau @ 2013-09-25 13:08 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
  2013-09-25 13:08 IMX WM8740 I2S support stéphane cerveau
@ 2013-09-25 13:12 ` Fabio Estevam
  2013-09-25 13:54   ` stéphane cerveau
  2013-09-25 13:56   ` stéphane cerveau
  0 siblings, 2 replies; 11+ messages in thread
From: Fabio Estevam @ 2013-09-25 13:12 UTC (permalink / raw)
  To: stéphane cerveau; +Cc: alsa-devel@alsa-project.org

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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
  2013-09-25 13:12 ` Fabio Estevam
@ 2013-09-25 13:54   ` stéphane cerveau
  2013-09-25 13:56   ` stéphane cerveau
  1 sibling, 0 replies; 11+ messages in thread
From: stéphane cerveau @ 2013-09-25 13:54 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel@alsa-project.org

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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
  2013-09-25 13:12 ` Fabio Estevam
  2013-09-25 13:54   ` stéphane cerveau
@ 2013-09-25 13:56   ` stéphane cerveau
  2013-09-25 16:37     ` Fabio Estevam
  1 sibling, 1 reply; 11+ messages in thread
From: stéphane cerveau @ 2013-09-25 13:56 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel@alsa-project.org

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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
  2013-09-25 13:56   ` stéphane cerveau
@ 2013-09-25 16:37     ` Fabio Estevam
  2013-09-25 16:42       ` stéphane cerveau
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2013-09-25 16:37 UTC (permalink / raw)
  To: stéphane cerveau; +Cc: alsa-devel@alsa-project.org

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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
  2013-09-25 16:37     ` Fabio Estevam
@ 2013-09-25 16:42       ` stéphane cerveau
  2013-09-25 16:53         ` Fabio Estevam
  0 siblings, 1 reply; 11+ messages in thread
From: stéphane cerveau @ 2013-09-25 16:42 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel@alsa-project.org

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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
  2013-09-25 16:42       ` stéphane cerveau
@ 2013-09-25 16:53         ` Fabio Estevam
  2013-09-25 16:58           ` stéphane cerveau
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2013-09-25 16:53 UTC (permalink / raw)
  To: stéphane cerveau; +Cc: alsa-devel@alsa-project.org

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.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
  2013-09-25 16:53         ` Fabio Estevam
@ 2013-09-25 16:58           ` stéphane cerveau
  2013-09-25 17:02             ` Fabio Estevam
  0 siblings, 1 reply; 11+ messages in thread
From: stéphane cerveau @ 2013-09-25 16:58 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel@alsa-project.org

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.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
  2013-09-25 16:58           ` stéphane cerveau
@ 2013-09-25 17:02             ` Fabio Estevam
       [not found]               ` <524317D4.7020701@gmail.com>
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2013-09-25 17:02 UTC (permalink / raw)
  To: stéphane cerveau; +Cc: alsa-devel@alsa-project.org

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/arm/boot/dts/imx6q-sabrelite.dts?id=refs/tags/v3.12-rc2

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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
       [not found]               ` <524317D4.7020701@gmail.com>
@ 2013-09-25 17:07                 ` Fabio Estevam
  2013-09-25 17:09                   ` stéphane cerveau
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Estevam @ 2013-09-25 17:07 UTC (permalink / raw)
  To: stéphane cerveau, alsa-devel@alsa-project.org

[Please always Cc the mailing list]

On Wed, Sep 25, 2013 at 2:05 PM, stéphane cerveau <scerveau@gmail.com> wrote:
> I'm using an old kernel from a BSP provided by a retailer.

This list is about mainline kernel. If you would like to use mainline
kernel we could help you here.

If you decide to stay with the vendor BSP, then this is not the
appropriate place for support.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: IMX WM8740 I2S support
  2013-09-25 17:07                 ` Fabio Estevam
@ 2013-09-25 17:09                   ` stéphane cerveau
  0 siblings, 0 replies; 11+ messages in thread
From: stéphane cerveau @ 2013-09-25 17:09 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel@alsa-project.org

Oki I understand your concern.
I'm planning to provide my source code on the main line but for now i 
need to work with my bsp.
I would appreciate some advises.
Best regards.

Stephane
On 09/25/2013 07:07 PM, Fabio Estevam wrote:
> [Please always Cc the mailing list]
>
> On Wed, Sep 25, 2013 at 2:05 PM, stéphane cerveau <scerveau@gmail.com> wrote:
>> I'm using an old kernel from a BSP provided by a retailer.
> This list is about mainline kernel. If you would like to use mainline
> kernel we could help you here.
>
> If you decide to stay with the vendor BSP, then this is not the
> appropriate place for support.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-09-25 17:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-25 13:08 IMX WM8740 I2S support stéphane cerveau
2013-09-25 13:12 ` Fabio Estevam
2013-09-25 13:54   ` stéphane cerveau
2013-09-25 13:56   ` stéphane cerveau
2013-09-25 16:37     ` Fabio Estevam
2013-09-25 16:42       ` stéphane cerveau
2013-09-25 16:53         ` Fabio Estevam
2013-09-25 16:58           ` stéphane cerveau
2013-09-25 17:02             ` Fabio Estevam
     [not found]               ` <524317D4.7020701@gmail.com>
2013-09-25 17:07                 ` Fabio Estevam
2013-09-25 17:09                   ` stéphane cerveau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.