From: Takashi Iwai Subject: Re: 1.0.15rc3 patch_analog.s bug + fix Date: Tue, 16 Oct 2007 13:32:23 +0200 Message-ID: References: <20071015025303.GA17664@jay.phy.queensu.ca> <20071015203421.GA6047@jay.phy.queensu.ca> <200710161058.19929.anarsoul@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 mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id A7EE224629 for ; Tue, 16 Oct 2007 14:06:37 +0200 (CEST) In-Reply-To: <200710161058.19929.anarsoul@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: Vasily Khoruzhick Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Tue, 16 Oct 2007 10:58:19 +0300, Vasily Khoruzhick wrote: > > > > Hmm, the code logic looks correct to me. If HP jack is present, the > > > internal speaker should be muted. Otherwise it follows the state of > > > HP jack (muted/unmuted, that acts as a master switch). > > Original patch: > present = snd_hda_codec_read(codec, 0x1a, 0, > AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; > > Code in alsa (patch-analog.c line 614): > > present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0); > spec->jack_present = (present & 0x80000000) != 0; > > Seems to have quite different logic, don't it? I don't see your point. It's the same logic: If present has bit 0x80000000, spec->jack_present = 1, Otherwise, spec->jack_present = 0. The problem is that the jack detection of this codec (or specific to the laptop) seems inverse from the standard. > Should be: > > present = snd_hda_codec_read(codec, 0x1a, 0, AC_VERB_GET_PIN_SENSE, 0); > spec->jack_present = (present & 0x80000000) == 0; > > P.S. It's very sad that you've released 1.0.15 with that bug :( Yes, it's sad. Too late recognized. We'll likely have 1.0.15a release soon later, though. Takashi