Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21941430rwd; Fri, 30 Jun 2023 01:35:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlEFOma0J+5Xvu5PfBpaD0JZPD6qeCtOXNs+xY9bb36fflPECY058P3UjdzaSCgTgKMCrNDy X-Received: by 2002:a92:db51:0:b0:345:913a:41a3 with SMTP id w17-20020a92db51000000b00345913a41a3mr1474307ilq.30.1688114122729; Fri, 30 Jun 2023 01:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688114122; cv=none; d=google.com; s=arc-20160816; b=07zkbR14kRwDoms5dwQLULjYfVRm+74dDomuzOVKYoEN0DXktQsU8gN33u8hJmiw46 QAJS4k9bwb6H2+WB9qKzmSdLrymO0H4sQCepMwOZx1VfLUyAKh/CC6WKOsyeP05ydyQo C6Hy6HtRhRFkLhG4vTTXRvpe5IKF13eHpWgefW4y7bpLfupYw3V4c2iBUf91XEEmUSAh lzD6N4ynzXYl6s962P9d8GHmkXKJwbQ5LjzhOh1qEBKQiqZMC6vmbgT4KD8sWJz7V3X5 0zkiD+iWYKQoVmEefXRPszvTlgqhSU5TuwHMaHDL1RnTrMofO8afbltN/wWl+CfFuvsk DrMg== 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:dkim-signature:dkim-signature; bh=c+W8aKfkXpZKK+uj0tHa1zrRij5dJeSXQ7E45G9hHSA=; fh=c0981kfQi9ACbBgvOsp+zdH9ufVAu3ZV+cEHD5ZaIuU=; b=TGxYmie5/+nEvqA0ipmV66VPZEz4i4ZIXDNEH8Q0ClRZF/xdUlQ3/SGpjifeuKNyx8 ucqccR9QQVlTMkgOj4TQb23eVHNsqrm4Ek1NeWvMj8Dqy63JXKE9zrrAUYOvyb+uIosJ 6w2w2zptu13K/Ww8keaAGlw7ZwVbm21X8TFQixDlJD0NCbJjWmEB9q0FrJmTABXJ8j8g ls1l8KIENvy5TMWhz7zLB6e1Zc5TVs/QwCM8qlfOLFVyx/IvTJXYh2NPSGU46mZjP0Ev A7xIx8bLrhmUA1WOTY/vcc87h8mJX27eDjDnMdRcHyJU2q8r36KKF0did1bVH28TIVzL TxMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="I/tF7TsW"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k26-20020a635a5a000000b00543cca81bb9si11987103pgm.329.2023.06.30.01.35.10; Fri, 30 Jun 2023 01:35:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="I/tF7TsW"; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230462AbjF3I2Q (ORCPT + 99 others); Fri, 30 Jun 2023 04:28:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232520AbjF3I2E (ORCPT ); Fri, 30 Jun 2023 04:28:04 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 007BF1FE3 for ; Fri, 30 Jun 2023 01:27:48 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id ACE651F8C8; Fri, 30 Jun 2023 08:27:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688113667; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c+W8aKfkXpZKK+uj0tHa1zrRij5dJeSXQ7E45G9hHSA=; b=I/tF7TsWTN74LgFy/ViXDWQ/t/1yu7hDCwnb+F1xRLdaOgPQjFvFyDErItEvMZFpZOrdG4 6D2fkrr76rQN0C8fg5rqwSTYLRfQjDs+pqONg0R0SVcTTDemkMKhdGngSS9k9DzibTahnS eRnSFCgmIj4BRcO875Fgaa8ZMJG0h+o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688113667; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=c+W8aKfkXpZKK+uj0tHa1zrRij5dJeSXQ7E45G9hHSA=; b=hmAfoe+eHfDyfmPi1tvHW6G1cYl8EElIueAcNajFfKyj3DWF0pWWmbaX6AL0dmkQS4Ih6/ g86f3kluVHVF67Ag== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 785BF138F8; Fri, 30 Jun 2023 08:27:47 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id jZ4GHAOSnmTETgAAMHmgww (envelope-from ); Fri, 30 Jun 2023 08:27:47 +0000 Date: Fri, 30 Jun 2023 10:27:47 +0200 Message-ID: <87ilb5cq2k.wl-tiwai@suse.de> From: Takashi Iwai To: dengxiang Cc: tiwai@suse.com, yangyingliang@huawei.com, perex@perex.cz, linux-kernel@vger.kernel.org, kernel test robot Subject: Re: [PATCH v2] ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760 In-Reply-To: <20230630041243.2309665-1-dengxiang@nfschina.com> References: <20230630041243.2309665-1-dengxiang@nfschina.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Jun 2023 06:12:43 +0200, dengxiang wrote: > > These models use NSIWAY amplifiers for internal speaker, but cannot put > sound outside from these amplifiers. So eapd verbs are needed to initialize > the amplifiers. They can be added during boot to get working sound out > of internal speaker. > > Reported-by: kernel test robot > Closes: https://lore.kernel.org/oe-kbuild-all/202306291229.5w2tIZjA-lkp@xxxxxxxxx/ > > --- > v2: > - remove warning about unused variable 'spec' as belows: > > Signed-off-by: dengxiang > --- > sound/pci/hda/patch_realtek.c | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c > index afe8253f9a4f..82f53af2d08a 100644 > --- a/sound/pci/hda/patch_realtek.c > +++ b/sound/pci/hda/patch_realtek.c > @@ -11201,6 +11201,20 @@ static void alc897_fixup_lenovo_headset_mode(struct hda_codec *codec, > } > } > > +static const struct hda_verb alc897_unis_h3c_x500s_eapd_verbs[] = { > + {0x14, AC_VERB_SET_EAPD_BTLENABLE, 0}, > + { } > +}; > + > +static void alc897_fixup_unis_h3c_x500s(struct hda_codec *codec, > + const struct hda_fixup *fix, int action) > +{ > + if (action != HDA_FIXUP_ACT_PRE_PROBE) > + return; > + > + snd_hda_add_verbs(codec, alc897_unis_h3c_x500s_eapd_verbs); > +} > + > static const struct coef_fw alc668_coefs[] = { > WRITE_COEF(0x01, 0xbebe), WRITE_COEF(0x02, 0xaaaa), WRITE_COEF(0x03, 0x0), > WRITE_COEF(0x04, 0x0180), WRITE_COEF(0x06, 0x0), WRITE_COEF(0x07, 0x0f80), > @@ -11286,6 +11300,7 @@ enum { > ALC897_FIXUP_HP_HSMIC_VERB, > ALC897_FIXUP_LENOVO_HEADSET_MODE, > ALC897_FIXUP_HEADSET_MIC_PIN2, > + ALC897_FIXUP_UNIS_H3C_X500s, > }; > > static const struct hda_fixup alc662_fixups[] = { > @@ -11725,6 +11740,10 @@ static const struct hda_fixup alc662_fixups[] = { > .chained = true, > .chain_id = ALC897_FIXUP_LENOVO_HEADSET_MODE > }, > + [ALC897_FIXUP_UNIS_H3C_X500s] = { > + .type = HDA_FIXUP_FUNC, > + .v.func = alc897_fixup_unis_h3c_x500s, If it's only about verbs, it can be embedded here like: [ALC897_FIXUP_UNIS_H3C_X500s] = { .type = HDA_FIXUP_FUNC, .v.verbs = (const struct hda_verb[]) { { 0x14, AC_VERB_SET_EAPD_BTLENABLE, 0 }, {} }, }, Also, try to keep the capital letters for ALC_* enums. thanks, Takashi