Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2696854pxy; Sun, 25 Apr 2021 01:22:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySrEXkxpTtp+jhw3wXjXDZYNVW6IiUib9zVBbVyCozgxChYKQ47wGSFNx5W77i/o7SqWCS X-Received: by 2002:a05:6402:27d4:: with SMTP id c20mr14534062ede.271.1619338958494; Sun, 25 Apr 2021 01:22:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619338958; cv=none; d=google.com; s=arc-20160816; b=qbbglWoh1vuZi5C/Cxl4E/QhxGFcunYQffiYvfM3N+h2rDFofN3td9R8UFOwhQwIIQ QF45bWfoyj9vUcJKNO+HgUejVJRKvOBCo6MmFXNQMHhSNsWP3s/z/ihqwcBgWSa3wmn5 /eaSrYPajUGCPs8xVL8aKGVXU4Jem1JILsOeeIB6BoTlIKaokX0U58b0SSfA1Uw67Rkp YdBtzmhzKf0wXKp+OHXzXlxBnDY56qVxxgsFtamlLocRwRyYsMe8OQrGbfr19UkyUkQ9 +YcbZtS1hHlUZelzQc8ulrZoH6/B/WvBQ0nV0J8KkJFOsr8A4ep+ilnRo/N3SPHcWdR9 vBGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=SK9NR7+aEG+tQR9nolHzuTxf1uOe/HfIaSE6G8lp1g8=; b=Sg1cmg9OUTWDhsglyo16HZgo3Wa/zHghH7qi1SM9yAEi33TjQoKC5SnUUJafuY0YjZ E9RTqEtcDpsb/CGO6opkKVhAZ8b0G2iOVVF/Zw4Jr+VZYhmQnWUpkOFr4vl5KOS7umSh lv4GqUvLVZKbL0agtNfMJf6JSuPS28BshU3YBwP4jld4ybQ5tB3B86BdHFCTxyaAQhH1 SYolreSJKdxDTM4Pk0oSZslilC4lQaR0znU9e1oXZAEmyKmtjSea/EZ1hz36B6CXQIGV JjiL3q3ScTsv0xmz4sC1/z9w+Lm3jYgKKgyMywCAxj636ciZ8af2X44PUy0mjDn5lA8n aybA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si10673067ede.557.2021.04.25.01.22.14; Sun, 25 Apr 2021 01:22:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229475AbhDYIWE (ORCPT + 99 others); Sun, 25 Apr 2021 04:22:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:56616 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229485AbhDYIWD (ORCPT ); Sun, 25 Apr 2021 04:22:03 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2B0A9B16E; Sun, 25 Apr 2021 08:21:23 +0000 (UTC) Date: Sun, 25 Apr 2021 10:21:23 +0200 Message-ID: From: Takashi Iwai To: Vitaly Rodionov Cc: Jaroslav Kysela , Takashi Iwai , , , , Stefan Binding , You-Sheng Yang Subject: Re: [PATCH v1 2/2] ALSA: hda/cirrus: Use CS8409 Equalizer to fix abnormal sounds on Bullseye In-Reply-To: <20210424143244.639125-3-vitalyr@opensource.cirrus.com> References: <20210424143244.639125-1-vitalyr@opensource.cirrus.com> <20210424143244.639125-3-vitalyr@opensource.cirrus.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/25.3 (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 24 Apr 2021 16:32:44 +0200, Vitaly Rodionov wrote: > > From: Stefan Binding > > Tested on DELL Inspiron-3505, DELL Inspiron-3501, DELL Inspiron-3500 Similarly like the previous patch, the description about the problem itself is missing, so I cannot judge whether to take this or not. Please clarify at first. Also, it needs clarification whether applying this EQ to all hardware models with this codec chip is really safe or not; i.e. it's mandatory for the codec. thanks, Takashi > > Signed-off-by: Stefan Binding > Signed-off-by: Vitaly Rodionov > BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1924997 > Reported-and-tested-by: You-Sheng Yang > --- > sound/pci/hda/patch_cirrus.c | 33 +++++++++++++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > > diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c > index d6cf93b7483c..82c5f0869684 100644 > --- a/sound/pci/hda/patch_cirrus.c > +++ b/sound/pci/hda/patch_cirrus.c > @@ -1481,6 +1481,34 @@ static const struct cs8409_cir_param cs8409_cs42l42_hw_cfg[] = { > {} /* Terminator */ > }; > > +static const struct cs8409_cir_param cs8409_cs42l42_bullseye_atn[] = { > + { 0x47, 0x65, 0x4000 }, /* EQ_SEL=1, EQ1/2_EN=0 */ > + { 0x47, 0x64, 0x4000 }, /* +EQ_ACC */ > + { 0x47, 0x65, 0x4010 }, /* +EQ2_EN */ > + { 0x47, 0x63, 0x0647 }, /* EQ_DATA_HI=0x0647 */ > + { 0x47, 0x64, 0xc0c7 }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=0, EQ_DATA_LO=0x67 */ > + { 0x47, 0x63, 0x0647 }, /* EQ_DATA_HI=0x0647 */ > + { 0x47, 0x64, 0xc1c7 }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=1, EQ_DATA_LO=0x67 */ > + { 0x47, 0x63, 0xf370 }, /* EQ_DATA_HI=0xf370 */ > + { 0x47, 0x64, 0xc271 }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=2, EQ_DATA_LO=0x71 */ > + { 0x47, 0x63, 0x1ef8 }, /* EQ_DATA_HI=0x1ef8 */ > + { 0x47, 0x64, 0xc348 }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=3, EQ_DATA_LO=0x48 */ > + { 0x47, 0x63, 0xc110 }, /* EQ_DATA_HI=0xc110 */ > + { 0x47, 0x64, 0xc45a }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=4, EQ_DATA_LO=0x5a */ > + { 0x47, 0x63, 0x1f29 }, /* EQ_DATA_HI=0x1f29 */ > + { 0x47, 0x64, 0xc574 }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=5, EQ_DATA_LO=0x74 */ > + { 0x47, 0x63, 0x1d7a }, /* EQ_DATA_HI=0x1d7a */ > + { 0x47, 0x64, 0xc653 }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=6, EQ_DATA_LO=0x53 */ > + { 0x47, 0x63, 0xc38c }, /* EQ_DATA_HI=0xc38c */ > + { 0x47, 0x64, 0xc714 }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=7, EQ_DATA_LO=0x14 */ > + { 0x47, 0x63, 0x1ca3 }, /* EQ_DATA_HI=0x1ca3 */ > + { 0x47, 0x64, 0xc8c7 }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=8, EQ_DATA_LO=0xc7 */ > + { 0x47, 0x63, 0xc38c }, /* EQ_DATA_HI=0xc38c */ > + { 0x47, 0x64, 0xc914 }, /* +EQ_WRT, +EQ_ACC, EQ_ADR=9, EQ_DATA_LO=0x14 */ > + { 0x47, 0x64, 0x0000 }, /* -EQ_ACC, -EQ_WRT */ > + {} /* Terminator */ > +}; > + > /** > * cs8409_enable_i2c_clock - Enable I2C clocks > * @codec: the codec instance > @@ -2029,6 +2057,7 @@ static void cs8409_enable_ur(struct hda_codec *codec, int flag) > static void cs8409_cs42l42_hw_init(struct hda_codec *codec) > { > const struct cs8409_cir_param *seq = cs8409_cs42l42_hw_cfg; > + const struct cs8409_cir_param *seq_bullseye = cs8409_cs42l42_bullseye_atn; > struct cs_spec *spec = codec->spec; > > if (spec->gpio_mask) { > @@ -2043,6 +2072,10 @@ static void cs8409_cs42l42_hw_init(struct hda_codec *codec) > for (; seq->nid; seq++) > cs_vendor_coef_set(codec, seq->cir, seq->coeff); > > + if (codec->fixup_id == CS8409_BULLSEYE) > + for (; seq_bullseye->nid; seq_bullseye++) > + cs_vendor_coef_set(codec, seq_bullseye->cir, seq_bullseye->coeff); > + > /* Disable Unsolicited Response during boot */ > cs8409_enable_ur(codec, 0); > > -- > 2.25.1 >