From: Takashi Iwai <tiwai@suse.de>
To: dengxiang <dengxiang@nfschina.com>
Cc: tiwai@suse.com, yangyingliang@huawei.com, perex@perex.cz,
linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH v2] ALSA: hda/realtek: Add quirks for Unis H3C Desktop B760 & Q760
Date: Fri, 30 Jun 2023 10:27:47 +0200 [thread overview]
Message-ID: <87ilb5cq2k.wl-tiwai@suse.de> (raw)
In-Reply-To: <20230630041243.2309665-1-dengxiang@nfschina.com>
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 <lkp@intel.com>
> 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 <dengxiang@nfschina.com>
> ---
> 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
prev parent reply other threads:[~2023-06-30 8:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 4:12 dengxiang
2023-06-30 8:27 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilb5cq2k.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=dengxiang@nfschina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=yangyingliang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®