Re: [PATCH] snd-hda-intel: Jack Mode changes for Sigmatel boards

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

 



At Mon, 25 May 2009 19:18:44 +0000,
Nickolas Lloyd wrote:
> 
> +	nid = cfg->input_pins[AUTO_PIN_MIC];
> +	idx = 0;
> +
> +again:
> +	if (nid) {
> +		err = stac92xx_add_mic_jack_control(codec, nid, idx);
>  		if (err < 0)
>  			return err;
> +		else if (!err)
> +			idx++;
> +	}
> +
> +	if (nid == cfg->input_pins[AUTO_PIN_MIC]) {
> +		nid = cfg->input_pins[AUTO_PIN_FRONT_MIC];
> +		goto again;
>  	}

Well, a goto loop is old-fashioned as a code in 21st century :)

Also, it might be better to use auto_pin_cfg_labels[] to each unique
control name instead of index. 
It's often more intuitive.


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