[alsa-devel] [PATCH] snd-hda-intel: Jack Mode changes for Sigmatel boards
Takashi Iwai
tiwai at suse.de
Wed May 27 09:20:59 CEST 2009
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
More information about the Alsa-devel
mailing list