[alsa-devel] [patch 2/9] JIVE: Add ASoC audio support

Mark Brown broonie at sirena.org.uk
Wed Mar 4 15:57:02 CET 2009


On Wed, Mar 04, 2009 at 12:49:27AM +0000, Ben Dooks wrote:

> +static int jive_startup(struct snd_pcm_substream *substream)
> +{
> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> +	struct snd_soc_codec *codec = rtd->socdev->codec;
> +
> +	snd_soc_dapm_enable_pin(codec, "Headphone Jack");
> +	snd_soc_dapm_enable_pin(codec, "Internal Speaker");
> +	snd_soc_dapm_enable_pin(codec, "Line In");
> +
> +	snd_soc_dapm_sync(codec);
> +
> +	return 0;
> +}

As previously mentioned this function should be removed: the default
state of pins is that they're enabled and you never disable these pins
so there will be no effect.

> +	/* These endpoints are not being used. */
> +	snd_soc_dapm_disable_pin(codec, "LINPUT2");
> +	snd_soc_dapm_disable_pin(codec, "RINPUT2");
> +	snd_soc_dapm_disable_pin(codec, "LINPUT3");
> +	snd_soc_dapm_disable_pin(codec, "RINPUT3");
> +	snd_soc_dapm_disable_pin(codec, "OUT3");
> +	snd_soc_dapm_disable_pin(codec, "MONO");

Should be snd_soc_dapm_nc_pin().

> +	printk("JIVE WM8750 Audio support\n");

Should have KERN_INFO or use pr_info().


More information about the Alsa-devel mailing list