[alsa-devel] [PATCH 2/4] Allow passing platform_data for pxa2xx-ac97

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Jul 23 12:27:41 CEST 2009


On Wed, Jul 22, 2009 at 01:02:40PM +0200, Marek Vasut wrote:

>  	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;
>  

dev here is the AC97 controller device - if there's more than one AC97
controller in the system they can each have the four child devices.  On
the other hand, I don't think any of the PXA processors have more than
one AC97 controller so it'll never actually have any impact.

I think the best thing for now is to either warn if anything except the
primary codec has platform data or change the platform data to have a
variable something like primary_audio_pdata.  The driver doesn't appear
to support secondary codecs anyway.


More information about the Alsa-devel mailing list