public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Marek Vasut <marek.vasut@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>,
	alsa-devel@alsa-project.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] Allow passing platform_data to devices attached to AC97 bus
Date: Tue, 21 Jul 2009 17:11:03 +0200	[thread overview]
Message-ID: <87ocre2hrs.fsf@free.fr> (raw)
In-Reply-To: <200907211633.14388.marek.vasut@gmail.com> (Marek Vasut's message of "Tue\, 21 Jul 2009 16\:33\:14 +0200")

Marek Vasut <marek.vasut@gmail.com> writes:

> diff --git a/arch/arm/mach-pxa/include/mach/audio.h b/arch/arm/mach-pxa/include/mach/audio.h
> index 16eb025..8825b18 100644
> --- a/arch/arm/mach-pxa/include/mach/audio.h
> +++ b/arch/arm/mach-pxa/include/mach/audio.h
> @@ -20,6 +20,7 @@ typedef struct {
>  	void (*resume)(void *);
>  	void *priv;
>  	int reset_gpio;
> +	void *codec_pdata[4];
I don't understand where that '4' comes from. Would you explain ?

> diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
> index c570ebd..cfab74e 100644
> --- a/sound/arm/pxa2xx-ac97.c
> +++ b/sound/arm/pxa2xx-ac97.c
> @@ -170,6 +170,8 @@ static int __devinit pxa2xx_ac97_probe(struct platform_device *dev)
>  	struct snd_ac97_bus *ac97_bus;
>  	struct snd_ac97_template ac97_template;
>  	int ret;
> +	pxa2xx_audio_ops_t *pdata = dev->dev.platform_data;
> +	int id = dev->id < 0 ? 0 : dev->id;
>  
>  	ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
>  			      THIS_MODULE, 0, &card);
> @@ -200,6 +202,7 @@ static int __devinit pxa2xx_ac97_probe(struct platform_device *dev)
>  	snprintf(card->longname, sizeof(card->longname),
>  		 "%s (%s)", dev->dev.driver->name, card->mixername);
>  
> +	snd_ac97_dev_add_pdata(ac97_bus->codec[id], pdata->codec_pdata[id]);
Is there something that grants that dev->id is lesser than 4 ?

Cheers.

-- 
Robert

  parent reply	other threads:[~2009-07-21 15:11 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 14:33 [PATCH] Allow passing platform_data to devices attached to AC97 bus Marek Vasut
2009-07-21 14:50 ` Takashi Iwai
2009-07-21 14:53   ` Mark Brown
2009-07-21 15:16     ` Takashi Iwai
2009-07-21 15:40       ` Marek Vasut
2009-07-21 18:30         ` Mark Brown
2009-07-21 19:51           ` Marek Vasut
2009-07-22 10:40             ` Mark Brown
2009-07-22 10:59               ` [PATCH 1/4] " Marek Vasut
2009-07-23 10:16                 ` Mark Brown
2009-07-23 10:28                   ` Takashi Iwai
2009-07-23 10:31                     ` Mark Brown
2009-07-21 20:24           ` [PATCH] " Marek Vasut
2009-07-21 20:59             ` Takashi Iwai
2009-07-21 21:53               ` Marek Vasut
2009-07-21 22:13                 ` Marek Vasut
2009-07-21 22:33                   ` Russell King - ARM Linux
2009-07-21 22:39                     ` Marek Vasut
2009-07-21 22:40                       ` Marek Vasut
2009-07-21 22:34                   ` Anton Vorontsov
2009-07-21 22:43                     ` Marek Vasut
2009-07-22 11:01                     ` [PATCH 1/4] " Marek Vasut
2009-07-22 11:02                       ` [PATCH 2/4] Allow passing platform_data for pxa2xx-ac97 Marek Vasut
2009-07-23 10:27                         ` Mark Brown
2009-07-23 14:16                           ` Marek Vasut
2009-07-23 15:14                             ` Mark Brown
2009-07-23 18:39                             ` Marek Vasut
2009-07-28  5:28                               ` Marek Vasut
2009-07-30  0:55                                 ` Marek Vasut
2009-08-13 20:40                                   ` Mark Brown
2009-08-13 23:34                                     ` Marek Vasut
2009-08-13 23:42                                       ` Anton Vorontsov
2009-08-14  8:57                                       ` Mark Brown
2009-07-22 11:04                       ` [PATCH 3/4] Convert WM97xx driver to use platform_data Marek Vasut
2009-07-23 11:49                         ` Mark Brown
2009-07-24 19:44                         ` Robert Jarzmik
2009-07-24 21:03                           ` Marek Vasut
2009-07-22 11:05                       ` [PATCH 4/4] Convert all platforms to pass platform_data to wm97xx battery Marek Vasut
2009-07-22 18:09                         ` Robert Jarzmik
2009-07-22 18:30                           ` Marek Vasut
2009-07-25 20:55                             ` Robert Jarzmik
2009-07-27  0:06                             ` Marek Vasut
2009-07-21 20:25           ` [PATCH] Allow passing platform_data to devices attached to AC97 bus Marek Vasut
2009-07-21 15:41       ` Marek Vasut
2009-07-21 17:40       ` Marek Vasut
2009-07-21 18:27         ` Mark Brown
2009-07-21 18:38           ` Mark Brown
2009-07-21 17:42       ` Marek Vasut
2009-07-21 18:18       ` Marek Vasut
2009-07-21 15:11 ` Robert Jarzmik [this message]
2009-07-21 15:17   ` Takashi Iwai
2009-07-25 20:56   ` Robert Jarzmik

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=87ocre2hrs.fsf@free.fr \
    --to=robert.jarzmik@free.fr \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=marek.vasut@gmail.com \
    --cc=tiwai@suse.de \
    /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