mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org
Cc: stable-review@kernel.org, torvalds@linux-foundation.org,
	akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
	Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>,
	Takashi Iwai <tiwai@suse.de>
Subject: [20/44] ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
Date: Mon, 21 Mar 2011 16:10:00 -0700	[thread overview]
Message-ID: <20110321231052.804625596@clark.kroah.org> (raw)
In-Reply-To: <20110321231105.GA1744@kroah.com>

2.6.32-longterm review patch.  If anyone has any objections, please let us know.

------------------

From: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>

commit 094a42452abd5564429045e210281c6d22e67fca upstream.

When the mux for digital mic is different from the mux for other mics,
the current auto-parser doesn't handle them in a right way but provides
only one mic.  This patch fixes the issue.

Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 sound/pci/hda/patch_sigmatel.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -727,7 +727,7 @@ static int stac92xx_mux_enum_put(struct
 	struct sigmatel_spec *spec = codec->spec;
 	unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
 	const struct hda_input_mux *imux = spec->input_mux;
-	unsigned int idx, prev_idx;
+	unsigned int idx, prev_idx, didx;
 
 	idx = ucontrol->value.enumerated.item[0];
 	if (idx >= imux->num_items)
@@ -739,7 +739,8 @@ static int stac92xx_mux_enum_put(struct
 		snd_hda_codec_write_cache(codec, spec->mux_nids[adc_idx], 0,
 					  AC_VERB_SET_CONNECT_SEL,
 					  imux->items[idx].index);
-		if (prev_idx >= spec->num_analog_muxes) {
+		if (prev_idx >= spec->num_analog_muxes &&
+		    spec->mux_nids[adc_idx] != spec->dmux_nids[adc_idx]) {
 			imux = spec->dinput_mux;
 			/* 0 = analog */
 			snd_hda_codec_write_cache(codec,
@@ -749,9 +750,13 @@ static int stac92xx_mux_enum_put(struct
 		}
 	} else {
 		imux = spec->dinput_mux;
+		/* first dimux item is hardcoded to select analog imux,
+		 * so lets skip it
+		 */
+		didx = idx - spec->num_analog_muxes + 1;
 		snd_hda_codec_write_cache(codec, spec->dmux_nids[adc_idx], 0,
 					  AC_VERB_SET_CONNECT_SEL,
-					  imux->items[idx - 1].index);
+					  imux->items[didx].index);
 	}
 	spec->cur_mux[adc_idx] = idx;
 	return 1;



  parent reply	other threads:[~2011-03-21 23:59 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 23:11 [00/44] 2.6.32.34-longterm review Greg KH
2011-03-21 23:09 ` [01/44] hwmon/f71882fg: Set platform drvdata to NULL later Greg KH
2011-03-21 23:09 ` [02/44] mtd: jedec_probe: Change variable name from cfi_p to cfi Greg KH
2011-03-22  1:58   ` [Stable-review] " Ben Hutchings
2011-03-22 22:25     ` Greg KH
2011-03-21 23:09 ` [03/44] mtd: add "platform:" prefix for platform modalias Greg KH
2011-03-21 23:09 ` [04/44] libata: no special completion processing for EH commands Greg KH
2011-03-21 23:09 ` [05/44] MIPS: MTX-1: Make au1000_eth probe all PHY addresses Greg KH
2011-03-21 23:09 ` [06/44] x86/mm: Handle mm_fault_error() in kernel space Greg KH
2011-03-21 23:09 ` [07/44] ftrace: Fix memory leak with function graph and cpu hotplug Greg KH
2011-03-21 23:09 ` [08/44] x86: Fix panic when handling "mem={invalid}" param Greg KH
2011-03-21 23:09 ` [09/44] x86: Emit "mem=nopentium ignored" warning when not supported Greg KH
2011-03-21 23:09 ` [10/44] ahci: AHCI and RAID mode SATA patch for Intel Patsburg DeviceIDs Greg KH
2011-03-21 23:09 ` [11/44] ahci: AHCI mode SATA patch for Intel DH89xxCC DeviceIDs Greg KH
2011-03-21 23:09 ` [12/44] ahci: AHCI mode SATA patch for Intel Patsburg SATA RAID controller Greg KH
2011-03-21 23:09 ` [13/44] RDMA/cma: Fix crash in request handlers Greg KH
2011-03-21 23:09 ` [14/44] IB/cm: Bump reference count on cm_id before invoking callback Greg KH
2011-03-21 23:09 ` [15/44] x86, quirk: Fix SB600 revision check Greg KH
2011-03-21 23:09 ` [16/44] ath9k_hw: Fix incorrect macversion and macrev checks Greg KH
2011-03-21 23:09 ` [17/44] USB: serial/kobil_sct, fix potential tty NULL dereference Greg KH
2011-03-21 23:09 ` [18/44] USB: serial: ch341: add new id Greg KH
2011-03-21 23:09 ` [19/44] xhci: Fix cycle bit calculation during stall handling Greg KH
2011-03-21 23:10 ` Greg KH [this message]
2011-03-21 23:10 ` [21/44] PCI: remove quirk for pre-production systems Greg KH
2011-03-21 23:10 ` [22/44] PCI: add more checking to ICH region quirks Greg KH
2011-03-21 23:10 ` [23/44] PCI: do not create quirk I/O regions below PCIBIOS_MIN_IO for ICH Greg KH
2011-03-21 23:10 ` [24/44] PCI: sysfs: Fix failure path for addition of "vpd" attribute Greg KH
2011-03-21 23:10 ` [25/44] ALSA: ctxfi - Fix incorrect SPDIF status bit mask Greg KH
2011-03-21 23:10 ` [26/44] ALSA: ctxfi - Fix SPDIF status retrieval Greg KH
2011-03-21 23:10 ` [27/44] ALSA: ctxfi - Clear input settings before initialization Greg KH
2011-03-21 23:10 ` [28/44] SUNRPC: Ensure we always run the tk_callback before tk_action Greg KH
2011-03-21 23:10 ` [29/44] perf: Handle stopped state with tracepoints Greg KH
2011-03-21 23:10 ` [30/44] perf, powerpc: Handle events that raise an exception without overflowing Greg KH
2011-03-21 23:10 ` [31/44] ext3: Always set dx_nodes fake_dirent explicitly Greg KH
2011-03-21 23:10 ` [32/44] call_function_many: fix list delete vs add race Greg KH
2011-03-21 23:10 ` [33/44] call_function_many: add missing ordering Greg KH
2011-03-21 23:10 ` [34/44] x86: Flush TLB if PGD entry is changed in i386 PAE mode Greg KH
2011-03-21 23:10 ` [35/44] isdn: avoid calling tty_ldisc_flush() in atomic context Greg KH
2011-03-21 23:10 ` [36/44] smp_call_function_many: handle concurrent clearing of mask Greg KH
2011-03-21 23:10 ` [37/44] [PARISC] fix per-cpu flag problem in the cpu affinity checkers Greg KH
2011-03-21 23:10 ` [38/44] i2c: Fix typo in instantiating-devices document Greg KH
2011-03-21 23:10 ` [39/44] mmc: sdio: remember new card RCA when redetecting card Greg KH
2011-03-21 23:10 ` [40/44] powerpc/kexec: Fix race in kexec shutdown Greg KH
2011-03-21 23:10 ` [41/44] powerpc/kdump: Fix race in kdump shutdown Greg KH
2011-03-21 23:10 ` [42/44] powerpc: rtas_flash needs to use rtas_data_buf Greg KH
2011-03-21 23:10 ` [43/44] x86, binutils, xen: Fix another wrong size directive Greg KH
2011-03-21 23:10 ` [44/44] hwmon: (sht15) Fix integer overflow in humidity calculation Greg KH

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=20110321231052.804625596@clark.kroah.org \
    --to=gregkh@suse.de \
    --cc=Vitaliy.Kulikov@idt.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable-review@kernel.org \
    --cc=stable@kernel.org \
    --cc=tiwai@suse.de \
    --cc=torvalds@linux-foundation.org \
    /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®