At Mon, 16 Nov 2009 19:34:45 +0100, Wael Nasreddine (a.k.a eMxyzptlk) wrote:
[1 <text/plain; UTF-8 (quoted-printable)>] On Mon, Nov 16, 2009 at 18:36, Takashi Iwai tiwai@suse.de wrote:
At Mon, 16 Nov 2009 18:22:56 +0100, Wael Nasreddine (a.k.a eMxyzptlk) wrote:
On Mon, Nov 16, 2009 at 18:15, Takashi Iwai tiwai@suse.de wrote:
At Mon, 16 Nov 2009 18:07:40 +0100, Wael Nasreddine (a.k.a eMxyzptlk) wrote:
Thank you that actually worked, I have now both Front Left and LFE working, but it's very hard to tell coz the LFE is louder than both front speakers I even put my ear directly on the speaker and it still can't be 100% sure, but I think that for now what is working is 'Front Left + LFE', I can't hear anything from the right speaker.. but it's already an improvement to what I had.
Hm, if it's *so* loud, we should have a mixer control for this, I guess.
It's not *so* loud, but yea I appreciate a mixer for it yes! at least I can tell which speaker is working and also I can listen to Music without bothering someone else because with LFE the base is loud..
OK, how about the patch below?
Do you have any suggestion on how to enable the right speaker?
No, already out of idea... I wonder whether any other people suffering from the same problem?
Julien has the same PC, same OS, same Kernel, same BIOS Version, but the weird thing is that he is not suffering from this problem, which obviously led me to beleive a hardware defect, but it's working on Windows!
This is really weird...
Takashi
Because the patch is not attached, I can't quite copy it correctly from Gmail,
You have a pull-down menu at the top-right corner of each mail in gmail. There you can choose "Show original". This will show the raw texts so that you can save it from the browser.
Possibly this menu item appears only in English language mode, though.
so I did it by hand (attached), I applied it but I don't see the mixer anywhere in alsamixer. I double checked the patch though...
I revised the patch. Attached below. Try it instead. You'll have "Bass Speaker" mixer switch, maybe at the most right side.
Takashi --- diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 7f76a97..6a2a501 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -5280,6 +5280,54 @@ static int stac92hd71bxx_connected_smuxes(struct hda_codec *codec, return 0; }
+/* HP dv7 bass switch - GPIO5 */ +#define stac_hp_bass_gpio_info snd_ctl_boolean_mono_info +static int stac_hp_bass_gpio_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + struct sigmatel_spec *spec = codec->spec; + ucontrol->value.integer.value[0] = !!(spec->gpio_data & 0x20); + return 0; +} + +static int stac_hp_bass_gpio_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *ucontrol) +{ + struct hda_codec *codec = snd_kcontrol_chip(kcontrol); + struct sigmatel_spec *spec = codec->spec; + unsigned int gpio_data; + + gpio_data = (spec->gpio_data & ~0x20) | + (ucontrol->value.integer.value[0] ? 0x20 : 0); + if (gpio_data == spec->gpio_data) + return 0; + spec->gpio_data = gpio_data; + stac_gpio_set(codec, spec->gpio_mask, spec->gpio_dir, spec->gpio_data); + return 1; +} + +static struct snd_kcontrol_new stac_hp_bass_sw_ctrl = { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .info = stac_hp_bass_gpio_info, + .get = stac_hp_bass_gpio_get, + .put = stac_hp_bass_gpio_put, +}; + +static int stac_add_hp_bass_switch(struct hda_codec *codec) +{ + struct sigmatel_spec *spec = codec->spec; + + if (!stac_control_new(spec, &stac_hp_bass_sw_ctrl, + "Bass Speaker Playback Switch", 0)) + return -ENOMEM; + + spec->gpio_mask |= 0x20; + spec->gpio_dir |= 0x20; + spec->gpio_data |= 0x20; + return 0; +} + static int patch_stac92hd71bxx(struct hda_codec *codec) { struct sigmatel_spec *spec; @@ -5536,6 +5584,15 @@ again: return err; }
+ /* enable bass on HP dv7 */ + if (spec->board_config == STAC_HP_DV5) { + unsigned int cap; + cap = snd_hda_param_read(codec, 0x1, AC_PAR_GPIO_CAP); + cap &= AC_GPIO_IO_COUNT; + if (cap >= 6) + stac_add_hp_bass_switch(codec); + } + codec->proc_widget_hook = stac92hd7x_proc_hook;
return 0;