[alsa-devel] [PATCH 10/11] ALSA: hda/ca0132 - Add ZxR 600 ohm gain control

Takashi Sakamoto o-takashi at sakamocchi.jp
Mon Oct 1 04:22:57 CEST 2018


Hi,

On Sep 30 2018 12:03, Connor McAdams wrote:
> This patch adds a control for 600 ohm gain on the Sound Blaster ZxR.
> 
> Signed-off-by: Connor McAdams <conmanx360 at gmail.com>
> ---
>   sound/pci/hda/patch_ca0132.c | 44 ++++++++++++++++++++++++++++++++++++++++++--
>   1 file changed, 42 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
> index f0781e4..90e6a96 100644
> --- a/sound/pci/hda/patch_ca0132.c
> +++ b/sound/pci/hda/patch_ca0132.c
> ..
> @@ -6415,6 +6452,9 @@ static int ca0132_build_controls(struct hda_codec *codec)
>   		ae5_add_headphone_gain_enum(codec);
>   		ae5_add_sound_filter_enum(codec);
>   	}
> +
> +	if (spec->quirk == QUIRK_ZXR)
> +		zxr_add_headphone_gain_switch(codec);
>   #ifdef ENABLE_TUNING_CONTROLS
>   	add_tuning_ctls(codec);
>   #endif

Though error code can be returned in a call of snd_hda_ctl_add(), it's 
not handled correctly in 'ca0132_build_controls()'. At least, return
code in calls of below functions is better to be checked.

  - add_voicefx()
  - add_ca0132_alt_eq_presets()
  - ca0132_alt_add_svm_enum()
  - ca0132_alt_add_output_enum
  - ca0132_alt_add_input_enum
  - ca0132_alt_add_mic_boost_enum
  - ae5_add_headphone_gain_enum
  - ae5_add_sound_filter_enum
  - zxr_add_headphone_gain_switch

This is not a strong request and you can work for it after merging this
patchset. We have two weeks more till next merge window.


Regards

Takashi Sakamoto


More information about the Alsa-devel mailing list