At Tue, 18 Nov 2008 19:21:45 +0800, Petry Vincent wrote:
Hello,
I would like to contribute a patch that adds a model entry for the Acer Aspire 4930G laptop. Its chipset is a Realtek ALC888S-VC. The new model is based on the "acer" model and fixes the following bugs missing features:
stereo (invalid report, please close it)
jack sense
- https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4225 Internal mic
- channel mode (it was missing from the base acer model)
The model name is "acer-aspire-4930g" but could be renamed to something more general, if necessary.
See attached patch file. It has been made against alsa-driver-1.0.18a.
Thanks for the patch.
You need a patch only for the kernel tree, i.e. at best, create a diff against my sound git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6.git
Or you can get a snapshot of alsa-driver in ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-snapshot.tar.gz and create a patch against alsa-kernel directory only.
Regarding your changes: please run checkpatch.pl in $LINUX/scripts once. You'll see some coding-style issues there. Please fix them.
Also, you don't need to change the mux_enum_put function. I applied the patch below right now to my git tree.
thanks,
Takashi
From cd896c331dd442c43cd9e23de3f1a4f3c111c292 Mon Sep 17 00:00:00 2001 From: Takashi Iwai tiwai@suse.de Date: Tue, 18 Nov 2008 12:36:33 +0100 Subject: [PATCH] ALSA: hda - Allow multiple imux for matrix-type mixers of ALC codecs
Allow the multiple imux instances for matrix-type mixers like ALC882. So far, only ALC260 used this feature, but other codecs may need a similar stuff.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/hda/patch_realtek.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 04e153a..b7d3439 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -382,11 +382,15 @@ static int alc_mux_enum_put(struct snd_kcontrol *kcontrol, { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct alc_spec *spec = codec->spec; - const struct hda_input_mux *imux = spec->input_mux; + const struct hda_input_mux *imux; unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); + unsigned int mux_idx; hda_nid_t nid = spec->capsrc_nids ? spec->capsrc_nids[adc_idx] : spec->adc_nids[adc_idx];
+ mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; + imux = &spec->input_mux[mux_idx]; + if (spec->is_mix_capture) { /* Matrix-mixer style (e.g. ALC882) */ unsigned int *cur_val = &spec->cur_mux[adc_idx]; @@ -407,10 +411,7 @@ static int alc_mux_enum_put(struct snd_kcontrol *kcontrol, return 1; } else { /* MUX style (e.g. ALC880) */ - unsigned int mux_idx; - mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; - return snd_hda_input_mux_put(codec, &spec->input_mux[mux_idx], - ucontrol, nid, + return snd_hda_input_mux_put(codec, imux, ucontrol, nid, &spec->cur_mux[adc_idx]); } }