[alsa-devel] [PATCH v4 2/3] ASoC: Add HP iPAQ RX1950 support

Vasily Khoruzhick anarsoul at gmail.com
Sun Aug 29 20:15:26 CEST 2010


В сообщении от 29 августа 2010 20:39:39 автор Marek Vasut написал:

> > +static int rx1950_spk_power(struct snd_soc_dapm_widget *w,
> > +				struct snd_kcontrol *kcontrol, int event)
> > +{
> > +	if (SND_SOC_DAPM_EVENT_ON(event))
> > +		gpio_direction_output(S3C2410_GPA(1), 1);
> > +	else
> > +		gpio_direction_output(S3C2410_GPA(1), 0);
> 
> gpio_set_value()

Ok

> > +static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd)
> > +{
> > +	struct snd_soc_codec *codec = rtd->codec;
> > +	int err;
> > +
> > +	/* Add rx1950 specific widgets */
> > +	snd_soc_dapm_new_controls(codec, uda1380_dapm_widgets,
> > +				  ARRAY_SIZE(uda1380_dapm_widgets));
> > +
> > +	/* Set up rx1950 specific audio path audio_mapnects */
> > +	err = snd_soc_dapm_add_routes(codec, audio_map,
> > +				      ARRAY_SIZE(audio_map));
> > +
> 
> Handle return values

Ok
 
> > +	gpio_direction_output(S3C2410_GPA(1), 0);
> 
> Again, use gpio_set_value() after this and handle return value of
> gpio_direction_output().

Second arg is value, gpio_set_value is not required.
 
Regards
Vasily
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20100829/b9721f44/attachment.sig 


More information about the Alsa-devel mailing list