From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Headphone output doesn't work with 3.0.0-rc* anymore Date: Fri, 10 Jun 2011 12:08:03 +0200 Message-ID: References: <20110609090607.GB4207@tiehlicka.suse.cz> <20110609092826.GC4207@tiehlicka.suse.cz> <20110609111401.GA3994@tiehlicka.suse.cz> <20110610075640.GA4832@tiehlicka.suse.cz> <20110610085117.GA4110@tiehlicka.suse.cz> <20110610093019.GC4110@tiehlicka.suse.cz> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 9E631103A5D for ; Fri, 10 Jun 2011 12:08:08 +0200 (CEST) In-Reply-To: <20110610093019.GC4110@tiehlicka.suse.cz> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Michal Hocko Cc: alsa-devel@alsa-project.org, LKML List-Id: alsa-devel@alsa-project.org At Fri, 10 Jun 2011 11:30:19 +0200, Michal Hocko wrote: > > On Fri 10-06-11 11:18:51, Takashi Iwai wrote: > > At Fri, 10 Jun 2011 10:51:17 +0200, > > Michal Hocko wrote: > > > > > > On Fri 10-06-11 10:14:13, Takashi Iwai wrote: > > > > At Fri, 10 Jun 2011 09:56:40 +0200, > > > > Michal Hocko wrote: > > > > > > > > > > On Fri 10-06-11 08:53:01, Takashi Iwai wrote: > > > > > > At Thu, 9 Jun 2011 13:14:01 +0200, > [...] > > > > > OK, I git checkout v2.6.39 -- sound/pci/*.[ch] (see the patch bellow for > > > > > reference). I have kept the earlier patch. > > > > > > > > Gah, sorry, a wrong path. It must be sound/pci/hda/*.[ch]. > > > > Also, please remove my previous patch. It's irrelevant with 2.6.39 > > > > although it should be harmless. > > > > > > OK, I have reverted the whole hda directory to 2.6.39 which means AFAIU > > > that the driver is at the same state as it was in that kernel. And the > > > sound really works. Both outputs are active whem they should be. > > > > Thanks, it's really good to know that we have a good working-base. > > > > Now, can you switch back to 3.0rc2 with my fix patch and retest? > > Sorry, I am confused now. How this would be different from the previous > testing where I had that patch applied on top of rc2? Never mind, I found the possible spot. Could you try the patch below in addition? There was one missing initialization in the transition. The headphone would have been working when you mute/unmute "Master" volume once. thanks, Takashi --- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bef7a77..20f01f8 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1141,6 +1141,13 @@ static void update_speakers(struct hda_codec *codec) struct alc_spec *spec = codec->spec; int on; + /* Control HP pins/amps depending on master_mute state; + * in general, HP pins/amps control should be enabled in all cases, + * but currently set only for master_mute, just to be safe + */ + do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), + spec->autocfg.hp_pins, spec->master_mute, true); + if (!spec->automute) on = 0; else @@ -6202,11 +6209,6 @@ static const struct snd_kcontrol_new alc260_input_mixer[] = { /* update HP, line and mono out pins according to the master switch */ static void alc260_hp_master_update(struct hda_codec *codec) { - struct alc_spec *spec = codec->spec; - - /* change HP pins */ - do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), - spec->autocfg.hp_pins, spec->master_mute, true); update_speakers(codec); } From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755392Ab1FJKIN (ORCPT ); Fri, 10 Jun 2011 06:08:13 -0400 Received: from cantor2.suse.de ([195.135.220.15]:42783 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753445Ab1FJKII (ORCPT ); Fri, 10 Jun 2011 06:08:08 -0400 Date: Fri, 10 Jun 2011 12:08:03 +0200 Message-ID: From: Takashi Iwai To: Michal Hocko Cc: LKML , alsa-devel@alsa-project.org Subject: Re: [alsa-devel] Headphone output doesn't work with 3.0.0-rc* anymore In-Reply-To: <20110610093019.GC4110@tiehlicka.suse.cz> References: <20110609090607.GB4207@tiehlicka.suse.cz> <20110609092826.GC4207@tiehlicka.suse.cz> <20110609111401.GA3994@tiehlicka.suse.cz> <20110610075640.GA4832@tiehlicka.suse.cz> <20110610085117.GA4110@tiehlicka.suse.cz> <20110610093019.GC4110@tiehlicka.suse.cz> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 10 Jun 2011 11:30:19 +0200, Michal Hocko wrote: > > On Fri 10-06-11 11:18:51, Takashi Iwai wrote: > > At Fri, 10 Jun 2011 10:51:17 +0200, > > Michal Hocko wrote: > > > > > > On Fri 10-06-11 10:14:13, Takashi Iwai wrote: > > > > At Fri, 10 Jun 2011 09:56:40 +0200, > > > > Michal Hocko wrote: > > > > > > > > > > On Fri 10-06-11 08:53:01, Takashi Iwai wrote: > > > > > > At Thu, 9 Jun 2011 13:14:01 +0200, > [...] > > > > > OK, I git checkout v2.6.39 -- sound/pci/*.[ch] (see the patch bellow for > > > > > reference). I have kept the earlier patch. > > > > > > > > Gah, sorry, a wrong path. It must be sound/pci/hda/*.[ch]. > > > > Also, please remove my previous patch. It's irrelevant with 2.6.39 > > > > although it should be harmless. > > > > > > OK, I have reverted the whole hda directory to 2.6.39 which means AFAIU > > > that the driver is at the same state as it was in that kernel. And the > > > sound really works. Both outputs are active whem they should be. > > > > Thanks, it's really good to know that we have a good working-base. > > > > Now, can you switch back to 3.0rc2 with my fix patch and retest? > > Sorry, I am confused now. How this would be different from the previous > testing where I had that patch applied on top of rc2? Never mind, I found the possible spot. Could you try the patch below in addition? There was one missing initialization in the transition. The headphone would have been working when you mute/unmute "Master" volume once. thanks, Takashi --- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index bef7a77..20f01f8 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -1141,6 +1141,13 @@ static void update_speakers(struct hda_codec *codec) struct alc_spec *spec = codec->spec; int on; + /* Control HP pins/amps depending on master_mute state; + * in general, HP pins/amps control should be enabled in all cases, + * but currently set only for master_mute, just to be safe + */ + do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), + spec->autocfg.hp_pins, spec->master_mute, true); + if (!spec->automute) on = 0; else @@ -6202,11 +6209,6 @@ static const struct snd_kcontrol_new alc260_input_mixer[] = { /* update HP, line and mono out pins according to the master switch */ static void alc260_hp_master_update(struct hda_codec *codec) { - struct alc_spec *spec = codec->spec; - - /* change HP pins */ - do_automute(codec, ARRAY_SIZE(spec->autocfg.hp_pins), - spec->autocfg.hp_pins, spec->master_mute, true); update_speakers(codec); }