From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [ALSA] HDA: no sound in headphone-out caused by commit f889fa91ad47e (2.6.25-rc1 regression) Date: Wed, 13 Feb 2008 11:59:58 +0100 Message-ID: References: <200802112158.41989.strohel@gmail.com> <200802121924.35232.strohel@gmail.com> <200802122357.46309.strohel@gmail.com> 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 mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 85173103905 for ; Wed, 13 Feb 2008 11:59:58 +0100 (CET) In-Reply-To: <200802122357.46309.strohel@gmail.com> 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: Matej Laitl Cc: alsa-devel , LKML List-Id: alsa-devel@alsa-project.org At Tue, 12 Feb 2008 23:57:46 +0100, Matej Laitl wrote: > > On Tuesday 12 of February 2008 19:24:35 Matej Laitl wrote: > > > > Yes, this "slightly better" patch applied on top of your first patch > > > > against hda_codec.c did the trick, but with some side-effects: > > > > (...) > > Now I just found that the new "Speaker" switch forgets it's value from time to > time, ie. it's muted, you go and have lunch, and when you get back and start > the music, it's unmuted. It is probably related to aggressive hda-codec > powersaving, which I have enabled and set to 20 secs. Hm, does the patch below have any influence? If the problem still persists, please take alsa-info.sh snapshots before and after power-saving. Takashi --- diff -r f4f3c5e8931a sound/pci/hda/patch_realtek.c --- a/sound/pci/hda/patch_realtek.c Tue Feb 12 18:37:26 2008 +0100 +++ b/sound/pci/hda/patch_realtek.c Wed Feb 13 12:01:09 2008 +0100 @@ -2306,6 +2306,23 @@ static int alc_init(struct hda_codec *co return 0; } +#ifdef CONFIG_PM +static int alc_resume(struct hda_codec *codec) +{ + struct alc_spec *spec = codec->spec; + unsigned int i; + + for (i = 0; i < spec->num_init_verbs; i++) + snd_hda_sequence_write(codec, spec->init_verbs[i]); + snd_hda_codec_resume_amp(codec); + snd_hda_codec_resume_cache(codec); + /* call init hook at last */ + if (spec->init_hook) + spec->init_hook(codec); + return 0; +} +#endif + static void alc_unsol_event(struct hda_codec *codec, unsigned int res) { struct alc_spec *spec = codec->spec; @@ -2584,6 +2601,9 @@ static struct hda_codec_ops alc_patch_op .init = alc_init, .free = alc_free, .unsol_event = alc_unsol_event, +#ifdef CONFIG_PM + .resume = alc_resume, +#endif #ifdef CONFIG_SND_HDA_POWER_SAVE .check_power_status = alc_check_power_status, #endif