mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Adrian Bunk <bunk@stusta.de>
Cc: Kailang Yang <kailang@realtek.com.tw>,
	Jaroslav Kysela <perex@suse.cz>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC: 2.6 patch] sound/pci/hda/patch_realtek.c: remove dead code
Date: Tue, 19 Jun 2007 12:20:36 +0200	[thread overview]
Message-ID: <s5hejk8i6tn.wl%tiwai@suse.de> (raw)
In-Reply-To: <20070615214531.GO3588@stusta.de>

At Fri, 15 Jun 2007 23:45:31 +0200,
Adrian Bunk wrote:
> 
> This patch removes dead code spotted by the Coverity checker.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

This appears to be a copy-and-paste error from other
auto-configuration code.  I fixed it on ALSA tree now so that it'll be
merged to the next mm...


thanks,

Takashi

> 
> ---
> 
>  sound/pci/hda/patch_realtek.c |    7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> --- linux-2.6.22-rc4-mm2/sound/pci/hda/patch_realtek.c.old	2007-06-15 21:48:12.000000000 +0200
> +++ linux-2.6.22-rc4-mm2/sound/pci/hda/patch_realtek.c	2007-06-15 23:12:40.000000000 +0200
> @@ -10704,30 +10704,31 @@ static struct hda_verb alc662_init_verbs
>  	/* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
>  	/* Input mixer */
>  	{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
>  	{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
>  	{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
>  	{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
>  	{ }
>  };
>  
>  static struct hda_verb alc662_sue_init_verbs[] = {
>  	{0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC880_FRONT_EVENT},
>  	{0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC880_HP_EVENT},
>          {}
>  };
>  
> +#if 0
>  /*
>   * generic initialization of ADC, input mixers and output mixers
>   */
>  static struct hda_verb alc662_auto_init_verbs[] = {
>  	/*
>  	 * Unmute ADC and set the default input to mic-in
>  	 */
>  	{0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
>  	{0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
>  
>  	/* Unmute input amps (CD, Line In, Mic 1 & Mic 2) of the analog-loopback
>  	 * mixer widget
>  	 * Note: PASD motherboards uses the Line In 2 as the input for front
>  	 * panel mic (mic 2)
>  	 */
> @@ -10755,30 +10756,31 @@ static struct hda_verb alc662_auto_init_
>  	{0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
>  	{0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
>  
>  
>  	/* FIXME: use matrix-type input source selection */
>  	/* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
>  	/* Input mixer */
>  	{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
>  	{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
>  	{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(2)},
>  	/*{0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(3)},*/
>  	{0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(4)},
>  
>  	{ }
>  };
> +#endif  /*  0  */
>  
>  /* capture mixer elements */
>  static struct snd_kcontrol_new alc662_capture_mixer[] = {
>  	HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
>  	HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
>  	{
>  		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
>  		/* The multiple "Capture Source" controls confuse alsamixer
>  		 * So call somewhat different..
>  		 * FIXME: the controls appear in the "playback" view!
>  		 */
>  		/* .name = "Capture Source", */
>  		.name = "Input Source",
>  		.count = 1,
>  		.info = alc882_mux_enum_info,
> @@ -11152,35 +11154,30 @@ static int alc662_parse_auto_config(stru
>  	err = alc662_auto_create_analog_input_ctls(spec, &spec->autocfg);
>  	if (err < 0)
>  		return err;
>  
>  	spec->multiout.max_channels = spec->multiout.num_dacs * 2;
>  
>  	if (spec->autocfg.dig_out_pin)
>  		spec->multiout.dig_out_nid = ALC880_DIGOUT_NID;
>  
>  	if (spec->kctl_alloc)
>  		spec->mixers[spec->num_mixers++] = spec->kctl_alloc;
>  
>  	spec->num_mux_defs = 1;
>  	spec->input_mux = &spec->private_imux;
>  	
> -	if (err < 0)
> -		return err;
> -	else if (err > 0)
> -		/* hack - override the init verbs */
> -		spec->init_verbs[0] = alc662_auto_init_verbs;
>  	spec->mixers[spec->num_mixers] = alc662_capture_mixer;
>  	spec->num_mixers++;
>  	return err;
>  }
>  
>  /* additional initialization for auto-configuration model */
>  static void alc662_auto_init(struct hda_codec *codec)
>  {
>  	alc662_auto_init_multi_out(codec);
>  	alc662_auto_init_hp_out(codec);
>  	alc662_auto_init_analog_input(codec);
>  }
>  
>  static int patch_alc662(struct hda_codec *codec)
>  {
> 

  reply	other threads:[~2007-06-19 10:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-15 21:45 Adrian Bunk
2007-06-19 10:20 ` Takashi Iwai [this message]
2007-07-01 20:21   ` [2.6 " Adrian Bunk
2007-07-02 14:26     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hejk8i6tn.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=bunk@stusta.de \
    --cc=kailang@realtek.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®