From: Takashi Iwai Subject: Re: [PATCH] ALSA: hda - Set TLV_DB_SCALE_MUTE bit for cx5051 vmaster Date: Sat, 16 Aug 2014 09:13:03 +0200 Message-ID: References: <1408009543-4789-1-git-send-email-tiwai@suse.de> 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 47CDA2650BD for ; Sat, 16 Aug 2014 09:13:03 +0200 (CEST) In-Reply-To: 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 To: Raymond Yau Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Sat, 16 Aug 2014 10:34:26 +0800, Raymond Yau wrote: > > > Conexnat HD-audio driver has a workaround for cx5051 (aka CX20561) > > chip to add fake mute controls to each amp (commit 3868137e). This > > implies the minimum-as-mute TLV bit in TLV for each corresponding > > control. Meanwhile we build the virtual master from these, but the > > TLV bit is missing, even though the slaves have it. > > > > This patch simply adds the missing TLV_DB_SCALE_MUTE bit for vmaster, > > as already done in patch_sigmatel.c. > > > > Signed-off-by: Takashi Iwai > > --- > > sound/pci/hda/patch_conexant.c | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/sound/pci/hda/patch_conexant.c > b/sound/pci/hda/patch_conexant.c > > index 7627a69ca6d7..6f2fa838b635 100644 > > --- a/sound/pci/hda/patch_conexant.c > > +++ b/sound/pci/hda/patch_conexant.c > > @@ -26,6 +26,7 @@ > > #include > > #include > > #include > > +#include > > > > #include "hda_codec.h" > > #include "hda_local.h" > > @@ -859,6 +860,11 @@ static int patch_conexant_auto(struct hda_codec > *codec) > > if (err < 0) > > goto error; > > > > + if (codec->vendor_id == 0x14f15051) { > > + /* minimum value is actually mute */ > > + spec->gen.vmaster_tlv[3] |= TLV_DB_SCALE_MUTE; > > + } > > + > > codec->patch_ops = cx_auto_patch_ops; > > > > /* Some laptops with Conexant chips show stalls in S3 resume, > > -- > > Does this mean that when there is no hardware mute switch, the driver > create a fake one using mindB of volume as mute ? The fake mutes are, yes. > But this mean that the volume control and mute are not independent anymore, > just like those pulseaudio volume controls, volume always change to zero > after mute and unmute No, the mute controls are handled individually. And, this commit itself isn't about the fake mute implementations. It just give the hint to TLV. Takashi