From: Bernhard Rosenkraenzer <bero@arklinux.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PARTIAL PATCH] snd-hda-intel on Medion WIM2160
Date: Wed, 19 Sep 2007 20:26:27 +0200 [thread overview]
Message-ID: <200709192026.28082.bero@arklinux.org> (raw)
In-Reply-To: <s5hwsuupw9h.wl%tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]
On Thursday 13 September 2007, Takashi Iwai wrote:
> > The patch below fixes it, but unfortunately, Medion MD2 uses the same PCI
> > (and subvendor/subdevice) ID -- so the patch quite likely breaks Medion
> > MD2 support.
>
> In that case, try to reset board_config after
> snd_hda_check_board_config() but before setup_preset(). See
> patch_alc885() for example (appeariny in the latest ALSA tree, also in
> mm tree).
Will do...
> Otherwise it looks OK to me. But, what is the primary difference in
> the setup between MD2 and WIM2160?
I don't know -- I made it work by trial and error (I don't have access to any
hardware specs or the likes). By some more trial and error, I could minimize
the patch some more - it's down to editing the init_verbs and mixers.
In the mixers, this one seems to be the key:
HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT)
Maybe we can get it to work with both MD2 and WIM2160 by using the MD2 mixers
with this one added.
I'm not familiar enough with sound drivers in general to fiddle with the verbs
and be reasonably sure I'm not breaking the MD2.
[-- Attachment #2: medion-wim2160-sound-try2.patch --]
[-- Type: text/x-diff, Size: 3146 bytes --]
--- linux-2.6.22/sound/pci/hda/patch_realtek.c.wim2160snd~ 2007-09-14 15:51:28.000000000 +0200
+++ linux-2.6.22/sound/pci/hda/patch_realtek.c 2007-09-14 15:53:21.000000000 +0200
@@ -169,6 +169,7 @@
ALC883_ACER,
ALC883_MEDION,
ALC883_MEDION_MD2,
+ ALC883_MEDION_WIM2160,
ALC883_LAPTOP_EAPD,
ALC883_LENOVO_101E_2ch,
ALC883_LENOVO_NB0763,
@@ -6235,6 +6236,32 @@
{ } /* end */
};
+static struct snd_kcontrol_new alc883_medion_wim2160_mixer[] = {
+ HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
+ HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT),
+ HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
+ HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
+ HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
+ HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
+ HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
+ HDA_CODEC_VOLUME("iMic Playback Volume", 0x0b, 0x1, HDA_INPUT),
+ HDA_CODEC_MUTE("iMic Playback Switch", 0x0b, 0x1, HDA_INPUT),
+ HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
+ HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
+ HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
+ HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
+ {
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ /* .name = "Capture Source", */
+ .name = "Input Source",
+ .count = 2,
+ .info = alc883_mux_enum_info,
+ .get = alc883_mux_enum_get,
+ .put = alc883_mux_enum_put,
+ },
+ { } /* end */
+};
+
static struct snd_kcontrol_new alc883_chmode_mixer[] = {
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -6640,6 +6667,7 @@
[ALC883_ACER] = "acer",
[ALC883_MEDION] = "medion",
[ALC883_MEDION_MD2] = "medion-md2",
+ [ALC883_MEDION_WIM2160] = "medion-wim2160",
[ALC883_LAPTOP_EAPD] = "laptop-eapd",
[ALC883_LENOVO_101E_2ch] = "lenovo-101e",
[ALC883_LENOVO_NB0763] = "lenovo-nb0763",
@@ -6684,7 +6712,8 @@
SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC888_6ST_HP),
SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP),
SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP),
- SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
+ //SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
+ SND_PCI_QUIRK(0x17c0, 0x4071, "Medion WIM2160", ALC883_MEDION_WIM2160),
{}
};
@@ -6814,6 +6843,20 @@
.unsol_event = alc883_medion_md2_unsol_event,
.init_hook = alc883_medion_md2_automute,
},
+ [ALC883_MEDION_WIM2160] = {
+ .mixers = { alc883_medion_wim2160_mixer },
+ .init_verbs = { alc883_init_verbs, alc883_lenovo_nb0763_verbs},
+ .num_dacs = ARRAY_SIZE(alc883_dac_nids),
+ .dac_nids = alc883_dac_nids,
+ .dig_out_nid = ALC883_DIGOUT_NID,
+ .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
+ .adc_nids = alc883_adc_nids,
+ .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
+ .channel_mode = alc883_3ST_2ch_modes,
+ .input_mux = &alc883_capture_source,
+ .unsol_event = alc883_medion_md2_unsol_event,
+ .init_hook = alc883_medion_md2_automute,
+ },
[ALC883_LAPTOP_EAPD] = {
.mixers = { alc883_base_mixer,
alc883_chmode_mixer },
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
WARNING: multiple messages have this Message-ID (diff)
From: Bernhard Rosenkraenzer <bero@arklinux.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [alsa-devel] [PARTIAL PATCH] snd-hda-intel on Medion WIM2160
Date: Wed, 19 Sep 2007 20:26:27 +0200 [thread overview]
Message-ID: <200709192026.28082.bero@arklinux.org> (raw)
In-Reply-To: <s5hwsuupw9h.wl%tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]
On Thursday 13 September 2007, Takashi Iwai wrote:
> > The patch below fixes it, but unfortunately, Medion MD2 uses the same PCI
> > (and subvendor/subdevice) ID -- so the patch quite likely breaks Medion
> > MD2 support.
>
> In that case, try to reset board_config after
> snd_hda_check_board_config() but before setup_preset(). See
> patch_alc885() for example (appeariny in the latest ALSA tree, also in
> mm tree).
Will do...
> Otherwise it looks OK to me. But, what is the primary difference in
> the setup between MD2 and WIM2160?
I don't know -- I made it work by trial and error (I don't have access to any
hardware specs or the likes). By some more trial and error, I could minimize
the patch some more - it's down to editing the init_verbs and mixers.
In the mixers, this one seems to be the key:
HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT)
Maybe we can get it to work with both MD2 and WIM2160 by using the MD2 mixers
with this one added.
I'm not familiar enough with sound drivers in general to fiddle with the verbs
and be reasonably sure I'm not breaking the MD2.
[-- Attachment #2: medion-wim2160-sound-try2.patch --]
[-- Type: text/x-diff, Size: 3146 bytes --]
--- linux-2.6.22/sound/pci/hda/patch_realtek.c.wim2160snd~ 2007-09-14 15:51:28.000000000 +0200
+++ linux-2.6.22/sound/pci/hda/patch_realtek.c 2007-09-14 15:53:21.000000000 +0200
@@ -169,6 +169,7 @@
ALC883_ACER,
ALC883_MEDION,
ALC883_MEDION_MD2,
+ ALC883_MEDION_WIM2160,
ALC883_LAPTOP_EAPD,
ALC883_LENOVO_101E_2ch,
ALC883_LENOVO_NB0763,
@@ -6235,6 +6236,32 @@
{ } /* end */
};
+static struct snd_kcontrol_new alc883_medion_wim2160_mixer[] = {
+ HDA_CODEC_VOLUME("Master Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
+ HDA_BIND_MUTE("Master Playback Switch", 0x0c, 2, HDA_INPUT),
+ HDA_CODEC_MUTE("Headphone Playback Switch", 0x14, 0x0, HDA_OUTPUT),
+ HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
+ HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
+ HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
+ HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
+ HDA_CODEC_VOLUME("iMic Playback Volume", 0x0b, 0x1, HDA_INPUT),
+ HDA_CODEC_MUTE("iMic Playback Switch", 0x0b, 0x1, HDA_INPUT),
+ HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
+ HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
+ HDA_CODEC_VOLUME_IDX("Capture Volume", 1, 0x09, 0x0, HDA_INPUT),
+ HDA_CODEC_MUTE_IDX("Capture Switch", 1, 0x09, 0x0, HDA_INPUT),
+ {
+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+ /* .name = "Capture Source", */
+ .name = "Input Source",
+ .count = 2,
+ .info = alc883_mux_enum_info,
+ .get = alc883_mux_enum_get,
+ .put = alc883_mux_enum_put,
+ },
+ { } /* end */
+};
+
static struct snd_kcontrol_new alc883_chmode_mixer[] = {
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
@@ -6640,6 +6667,7 @@
[ALC883_ACER] = "acer",
[ALC883_MEDION] = "medion",
[ALC883_MEDION_MD2] = "medion-md2",
+ [ALC883_MEDION_WIM2160] = "medion-wim2160",
[ALC883_LAPTOP_EAPD] = "laptop-eapd",
[ALC883_LENOVO_101E_2ch] = "lenovo-101e",
[ALC883_LENOVO_NB0763] = "lenovo-nb0763",
@@ -6684,7 +6712,8 @@
SND_PCI_QUIRK(0x103c, 0x2a61, "HP Nettle", ALC888_6ST_HP),
SND_PCI_QUIRK(0x103c, 0x2a60, "HP Lucknow", ALC888_3ST_HP),
SND_PCI_QUIRK(0x103c, 0x2a4f, "HP Samba", ALC888_3ST_HP),
- SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
+ //SND_PCI_QUIRK(0x17c0, 0x4071, "MEDION MD2", ALC883_MEDION_MD2),
+ SND_PCI_QUIRK(0x17c0, 0x4071, "Medion WIM2160", ALC883_MEDION_WIM2160),
{}
};
@@ -6814,6 +6843,20 @@
.unsol_event = alc883_medion_md2_unsol_event,
.init_hook = alc883_medion_md2_automute,
},
+ [ALC883_MEDION_WIM2160] = {
+ .mixers = { alc883_medion_wim2160_mixer },
+ .init_verbs = { alc883_init_verbs, alc883_lenovo_nb0763_verbs},
+ .num_dacs = ARRAY_SIZE(alc883_dac_nids),
+ .dac_nids = alc883_dac_nids,
+ .dig_out_nid = ALC883_DIGOUT_NID,
+ .num_adc_nids = ARRAY_SIZE(alc883_adc_nids),
+ .adc_nids = alc883_adc_nids,
+ .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes),
+ .channel_mode = alc883_3ST_2ch_modes,
+ .input_mux = &alc883_capture_source,
+ .unsol_event = alc883_medion_md2_unsol_event,
+ .init_hook = alc883_medion_md2_automute,
+ },
[ALC883_LAPTOP_EAPD] = {
.mixers = { alc883_base_mixer,
alc883_chmode_mixer },
next prev parent reply other threads:[~2007-09-19 18:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-11 12:16 [PARTIAL PATCH] snd-hda-intel on Medion WIM2160 Bernhard Rosenkraenzer
2007-09-13 12:47 ` Takashi Iwai
2007-09-13 12:47 ` [alsa-devel] " Takashi Iwai
2007-09-19 18:26 ` Bernhard Rosenkraenzer [this message]
2007-09-19 18:26 ` Bernhard Rosenkraenzer
2007-09-20 11:05 ` Takashi Iwai
2007-09-20 11:05 ` [alsa-devel] " 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=200709192026.28082.bero@arklinux.org \
--to=bero@arklinux.org \
--cc=alsa-devel@alsa-project.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.