From patchwork Mon Jun 2 12:05:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 4281681 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0518F9F1D6 for ; Mon, 2 Jun 2014 12:58:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 145812024D for ; Mon, 2 Jun 2014 12:58:02 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id AEE292021B for ; Mon, 2 Jun 2014 12:58:00 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5FA1F2658B4; Mon, 2 Jun 2014 14:57:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id D92C52655C9; Mon, 2 Jun 2014 14:19:56 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 070F12655CA; Mon, 2 Jun 2014 14:19:54 +0200 (CEST) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 349A62655CA for ; Mon, 2 Jun 2014 14:06:00 +0200 (CEST) Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 054C3AD03; Mon, 2 Jun 2014 12:06:00 +0000 (UTC) Date: Mon, 02 Jun 2014 14:05:59 +0200 Message-ID: From: Takashi Iwai To: Alex Fedora In-Reply-To: <538C489C.1030508@gmail.com> References: <538ACE22.9020306@gmail.com> <538C3BF4.2000706@gmail.com> <538C489C.1030508@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] PROBLEM: [Lenovo ThinkPad X61s] Speaker volume mutes itself in random intervals after upgrading from 3.11 to 3.15. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP At Mon, 02 Jun 2014 02:49:16 -0700, Alex Fedora wrote: > > On 06/02/2014 02:15 AM, Takashi Iwai wrote: > > At Mon, 02 Jun 2014 01:55:16 -0700, > > Alex Fedora wrote: > >> On 06/02/2014 01:03 AM, Takashi Iwai wrote: > >>> At Sat, 31 May 2014 23:54:26 -0700, > >>> Alex Fedora wrote: > >>>> Hi, > >>>> > >>>> Please see problem description below. I've captured alsa info output for > >>>> the latest kernel. Kernel just before the regression. And info from the > >>>> kernel with the offending commit. But I had to calculate diff from first > >>>> one to fit to 100K limit. If you want, I can send all 3 files as an > >>>> attachments. Also the latest version of the kernel was took from > >>>> http://kernel.ubuntu.com/~kernel-ppa/mainline/daily/current/linux-image-3.15.0-999-generic_3.15.0-999.201405310205_amd64.deb > >>>> . > >>>> > >>>> Thank you, > >>>> Alex > >>>> > >>>> [1.] One line summary of the problem: [Lenovo ThinkPad X61s] Speaker > >>>> volume mutes itself in random intervals after upgrade to latest kernel > >>>> [2.] Full description of the problem/report: > >>>> > >>>> Speaker mutes itself in random intervals. Headphones are working fine at > >>>> that moment. I can see what volume of the Speaker drops to 0% and then > >>>> back to 100% using alsamixer. It seems like Internal Mic Boost also > >>>> jumps from 100% to 0% and back. It is regression from > >>>> 5ccc618fee67f0f0b2122dd4b32a02fd2b6a1569 (ALSA: hda - Remove static > >>>> quirks for AD1884/1984 & variants). I've tested previous commit > >>>> aa95d61b43e0fcb0b2ce68e5efa37174fd9e5cd3 (ALSA: hda - Remove static > >>>> quirks for AD1882) and audio works as expected. > >>>> > >>>> New kernel shows two controls "Headphone Playback Volume" and "Speaker > >>>> Playback Volume". But old one shows single control "PCM Playback > >>>> Volume". "Speaker Playback Volume" is the one which gets muted randomly. > >>> Are you using PulseAudio? If yes, does the problem happen without PA? > >>> This kind of random mute/unmute tends to be an issue of bogus > >>> headphone or mic jack detection. > >>> > >>> > >>> Takashi > >>> > >> Hi Takashi, > >> > >> Yes, I'm using PulseAudio. I've removed it and issue gone away. It > >> returned back after reinstalling it. This is still driver bug, right? > > Yes. So PA seems confused by some bogus information by the driver. > > > > Try to run "alsactl monitor 0", maybe better without PA at first. > > Do you see occasional events about the jack detection even if you > > don't plug/unplug? And, try it also with PA. > > > > > > Takashi > > > Yes, I can see a lot of events even if I don't plug/unplug anything. > Even more if I'm using PA. > > No pulseaudio: > > card 0, #22 (0,0,0,Mic Jack,0) VALUE > card 0, #23 (0,0,0,Headphone Jack,0) VALUE > card 0, #23 (0,0,0,Headphone Jack,0) VALUE Thanks. These are definitely bogus events. No wonder that PA gets screwed up. Could you try the patch below? Takashi diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 06275f8807a8..fa626648d746 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -191,7 +191,6 @@ static int ad198x_parse_auto_config(struct hda_codec *codec, bool indep_hp) int err; codec->spdif_status_reset = 1; - codec->no_trigger_sense = 1; codec->no_sticky_stream = 1; spec->gen.indep_hp = indep_hp; @@ -377,6 +376,8 @@ static int patch_ad1986a(struct hda_codec *codec) /* AD1986A has the inverted EAPD implementation */ codec->inv_eapd = 1; + codec->no_trigger_sense = 1; + spec->gen.mixer_nid = 0x07; spec->gen.beep_nid = 0x19; set_beep_amp(spec, 0x18, 0, HDA_OUTPUT); @@ -500,6 +501,8 @@ static int patch_ad1983(struct hda_codec *codec) return err; spec = codec->spec; + codec->no_trigger_sense = 1; + spec->gen.mixer_nid = 0x0e; spec->gen.beep_nid = 0x10; set_beep_amp(spec, 0x10, 0, HDA_OUTPUT); @@ -588,6 +591,8 @@ static int patch_ad1981(struct hda_codec *codec) return -ENOMEM; spec = codec->spec; + codec->no_trigger_sense = 1; + spec->gen.mixer_nid = 0x0e; spec->gen.beep_nid = 0x10; set_beep_amp(spec, 0x0d, 0, HDA_OUTPUT); @@ -913,6 +918,8 @@ static int patch_ad1988(struct hda_codec *codec) return err; spec = codec->spec; + codec->no_trigger_sense = 1; + spec->gen.mixer_nid = 0x20; spec->gen.mixer_merge_nid = 0x21; spec->gen.beep_nid = 0x10; @@ -1140,6 +1147,8 @@ static int patch_ad1882(struct hda_codec *codec) return err; spec = codec->spec; + codec->no_trigger_sense = 1; + spec->gen.mixer_nid = 0x20; spec->gen.mixer_merge_nid = 0x21; spec->gen.beep_nid = 0x10;