Re: [RFC PATCH] ASoC AC97/I2S for SH7760

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 08, 2007 at 07:40:27PM +0200, Manuel Lauss wrote:
> diff --git a/sound/soc/sh/hac.c b/sound/soc/sh/hac.c
> new file mode 100644
> index 0000000..157268c
> --- /dev/null
> +++ b/sound/soc/sh/hac.c
[snip]
> + * dont forget to set IPSEL/OMSEL register bits (in your board code) to
> + * enable HAC output pins!
> + */
Yuck.. I suppose this is a good argument for a demux API..

> +struct hac_priv {
> +	unsigned long mmio;	/* HAC base address */
> +} hac_cpu_data[] = {
> +#if defined(CONFIG_CPU_SUBTYPE_SH7760)
> +	{
> +		.mmio	= 0xFE240000,
> +	},
> +	{
> +		.mmio	= 0xFE250000,
> +	},
> +#elif defined(CONFIG_CPU_SUBTYPE_SH7780)
> +	{
> +		.mmio	= 0xFFE40000,
> +	},
> +#else
> +#error "Unsupported SuperH SoC"
> +#endif
> +};

Platform device resources, please.

> diff --git a/sound/soc/sh/ssi.c b/sound/soc/sh/ssi.c
> new file mode 100644
> index 0000000..79642e0
> --- /dev/null
> +#ifdef SSI_DEBUG
> +#define MSG(x...)	printk(KERN_INFO "sh4-i2s: " x)
> +#else
> +#define MSG(x...)	do {} while (0)
> +#endif
> +
pr_debug()?

> +struct ssi_priv {
> +	unsigned long mmio;
> +	unsigned long sysclk;
> +	int inuse;
> +} ssi_cpu_data[] = {
> +#if defined(CONFIG_CPU_SUBTYPE_SH7760)
> +	{
> +		.mmio	= 0xFE680000,
> +	},
> +	{
> +		.mmio	= 0xFE690000,
> +	},
> +#elif defined(CONFIG_CPU_SUBTYPE_SH7780)
> +	{
> +		.mmio	= 0xFFE70000,
> +	},
> +#else
> +#error "Unsupported SuperH SoC"
> +#endif
> +};
> +
This can also go in to a platform device resource. You'll want the
private data there anyways in case you decide to do something more
interesting with the clock.
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux