alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Stuart Longland <redhatter@gentoo.org>
To: gnutoo <GNUtoo@no-log.org>, Liam Girdwood <lrg@slimlogic.co.uk>
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: Hooking a TI CODEC to a i.MX27 MCU
Date: Wed, 26 May 2010 23:21:36 +1000	[thread overview]
Message-ID: <20100526132129.GA13644@www.longlandclan.yi.org> (raw)
In-Reply-To: <1274806007.4728.3.camel@gnutoo-desktop>

On Tue, May 25, 2010 at 06:46:47PM +0200, gnutoo wrote:
> On Tue, 2010-05-25 at 12:26 +1000, Stuart Longland wrote:
> > If there's any interest, I can format that as a patch and submit it...
> I'm very interested...
> I've an I.MX31 and a tlv320aic3x
> 
> I've tried to import your driver in our 2.6.30 tree
> ( http://gitorious.org/bug/bug-1x-linux-2-6-30/commits/bug1x-2.6.30 )
> and I have now the following issue:
> 
> # modprobe bugsound
> No device for DAI tlv320aic3x
> bug1x_soc_init: hello...
> bug1x_soc_init: bug1x_snd_device = c79240c0
> bug1x_soc_init: calling platform_set_drvdata( c79240c0, bf07b66c)
> bug1x_soc_init: calling platform_device_add(c79240c0)
> bug1x_soc_init: platform_device_add(c79240c0) = 0
> bug1x_soc_init = 0 (success)
> 
> I'll re-read the mails and try harder...
> Thanks a lot!!!!

Well, the "No device for DAI" message seems to be related to what's
registered for your board's I²C bus... e.g. I have in a file;
arch/arm/mach-mx2/mach-tx27.c (this isn't in tree yet; but I hope to
contribute it someday):

static struct i2c_board_info tx27_i2c0_devices[] __initdata = {
        {
                I2C_BOARD_INFO("24c16", 0x50),
                .platform_data = &tx27_eeprom,
                .type = "24c16",
        },
        {
                I2C_BOARD_INFO("tlv320aic3204", 0x18),
                .type = "tlv320aic3204",
        },
#if defined(CONFIG_RTC_DRV_DS1307) ||
defined(CONFIG_RTC_DRV_DS1307_MODULE)
        {
                I2C_BOARD_INFO("ds1339", 0x68/*DS1339_CHIP_ID*/),
                .type = "ds1339",
        },
#endif
};

That seems to help with getting the CODEC initialised and probed
correctly.  Likewise; similar is needed for the i.MX I²S bus, simply
having the driver in-kernel isn't enough:

in my board_init function:
        mxc_register_device(&imx_ssi_device0, &tx27_ssi_pdata[0]);
        /*mxc_register_device(&imx_ssi_device1, &tx27_ssi_pdata[1]);*/

Note the second one is commented out; I cannot seem to register both,
the second one always fails.  The tx27_ssi_pdata is straightforward:

static struct imx_ssi_platform_data tx27_ssi_pdata[] = {
        /* SSI1 */
        {
                .flags                  = 0,
        },
        /* SSI2 */
        {
                .flags                  = 0,
        },
};

I'm not sure if this is right; but it seems to work.  On this project,
my issue now is getting data out of the I²S bus.  The CODEC is
generating the bit clock and frame sync; I *think* I have AUDMUX set up
correctly -- HPCR1 is set to output receive data, frame sync & clock all
sourced from HPCR3; HPCR3 is set to receive data from HPCR1, and take
its frame sync & clock from the external port... I'll provide my debugfs
patch for audmux-v1.c and its output tomorrow.

At the moment, when I go to play audio; I see the CODEC being set up ...
but despite the clocks being present -- I see no audio data, and the DMA
transfer eventually times out with the message "playback write error
(DMA or IRQ trouble?)" after 10 seconds.  Would anyone know where I'd
look for that?  Is there something else needed in the configuration of
the SSI driver for this to work?

Thanks for the assistance thus far.
Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)      .'''.
Gentoo Linux/MIPS Cobalt and Docs Developer  '.'` :
. . . . . . . . . . . . . . . . . . . . . .   .'.'
http://dev.gentoo.org/~redhatter             :.'

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

  reply	other threads:[~2010-05-26 13:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24  7:49 ASoC: Hooking a TI CODEC to a i.MX27 MCU Stuart Longland
2010-05-24 10:49 ` Liam Girdwood
2010-05-25  0:41   ` Stuart Longland
2010-05-25  2:26     ` Stuart Longland
2010-05-25  3:26       ` Stuart Longland
2010-05-25 16:46       ` gnutoo
2010-05-26 13:21         ` Stuart Longland [this message]
2010-05-27  0:47           ` Mark Brown
2010-05-28  2:06             ` Stuart Longland
2010-05-28  5:55               ` Eric Bénard
2010-05-28 11:08                 ` Mark Brown
2010-05-28 13:10                   ` Eric Bénard
2010-06-01  3:30                 ` Stuart Longland
2010-06-01  5:07                   ` Stuart Longland
2010-06-01 11:32                     ` Stuart Longland
2010-06-03 11:14                       ` Mark Brown
2010-06-03 11:43                         ` Stuart Longland
2010-06-03 11:57                           ` Mark Brown
2010-05-28 12:27               ` Mark Brown
2010-05-29  8:59                 ` Stuart Longland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100526132129.GA13644@www.longlandclan.yi.org \
    --to=redhatter@gentoo.org \
    --cc=GNUtoo@no-log.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=lrg@slimlogic.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).