Re: [PATCH 1/2] ALSA: Add jack reporting API

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

 



At Mon, 28 Jul 2008 17:50:35 +0100,
Mark Brown wrote:
> 
> +/**
> + * Jack types which can be reported.  These values are used as a
> + * bitmask.
> + */
> +enum snd_jack_types {
> +	SND_JACK_HEADPHONE	= 0x0001,
> +	SND_JACK_MICROPHONE	= 0x0002,
> +	SND_JACK_HEADSET	= 0x0003,  /* Both microphone and headphone */

They are bitmask, so HEADSET should be better defined as
SND_JACK_HEADPHONE | SND_JACK_MICROPHONE ?

> +void snd_jack_set_parent(struct snd_jack *jack, struct device *parent)
> +{
> +	BUG_ON(jack->registered);

I'm afraid BUG_ON() is brutal for this kind of check.


Takashi
_______________________________________________
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