[PATCH] ALSA: hda/realtek: Add quirk for ASRock NUC Box 1100

Takashi Iwai tiwai at suse.de
Fri Nov 12 11:07:20 CET 2021


On Fri, 12 Nov 2021 10:47:11 +0100,
Werner Sembach wrote:
> 
> This applies a SND_PCI_QUIRK(...) to the ASRock NUC Box 1100 series. This
> fixes the issue of the headphone jack not being detected unless warm
> rebooted from a certain other OS.
> 
> When booting a certain other OS some coeff settings are changed that enable
> the audio jack. These settings are preserved on a warm reboot and can be
> easily dumped.
> 
> The relevant indexes and values where gathered by naively diff-ing and
> reading a working and a non-working coeff dump.
> 
> Signed-off-by: Werner Sembach <wse at tuxedocomputers.com>
> Cc: <stable at vger.kernel.org>

Thanks, the change looks almost good but in some small details:

> +static void alc233_fixup_asrock_nuc_box_1100_no_audio_jack(struct hda_codec *codec,
> +							     const struct hda_fixup *fix,
> +							     int action)

The function name could be a bit shorter?  It might be possible that
the fixup could be re-used by others, too.

> +{
> +	/*
> +	 * The audio jack input and output is not detected on the ASRock NUC Box 1100 series when
> +	 * cold booting without this fix. Warm rebooting from a certain other OS makes the audio
> +	 * functional, as COEF settings are preserved in this case. This fix sets these altered
> +	 * COEF values as the default.

Fitting in 80 columns is still preferred, to align with other code.

> +	alc_write_coef_idx(codec, 0x1a, 0x9003);
> +	alc_write_coef_idx(codec, 0x1b, 0x0e2b);
> +	alc_write_coef_idx(codec, 0x37, 0xfe06);
> +	alc_write_coef_idx(codec, 0x38, 0x4981);
> +	alc_write_coef_idx(codec, 0x45, 0xd489);
> +	alc_write_coef_idx(codec, 0x46, 0x0074);
> +	alc_write_coef_idx(codec, 0x49, 0x0149);

Can be put in the coef_fw table and processed via
alc_process_coef_fw() instead?


thanks,

Takashi


More information about the Alsa-devel mailing list