Commit e9995609 authored by Connor McAdams's avatar Connor McAdams Committed by Greg Kroah-Hartman

ALSA: hda/ca0132 - Fix input effect controls for desktop cards

[ Upstream commit 7a2dc84f ]

This patch removes the echo cancellation control for desktop cards, and
makes use of the special 0x47 SCP command for noise reduction.
Signed-off-by: default avatarConnor McAdams <conmanx360@gmail.com>
Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 9c30ea2d
...@@ -4521,7 +4521,7 @@ static int ca0132_effects_set(struct hda_codec *codec, hda_nid_t nid, long val) ...@@ -4521,7 +4521,7 @@ static int ca0132_effects_set(struct hda_codec *codec, hda_nid_t nid, long val)
val = 0; val = 0;
/* If Voice Focus on SBZ, set to two channel. */ /* If Voice Focus on SBZ, set to two channel. */
if ((nid == VOICE_FOCUS) && (spec->quirk == QUIRK_SBZ) if ((nid == VOICE_FOCUS) && (spec->use_pci_mmio)
&& (spec->cur_mic_type != REAR_LINE_IN)) { && (spec->cur_mic_type != REAR_LINE_IN)) {
if (spec->effects_switch[CRYSTAL_VOICE - if (spec->effects_switch[CRYSTAL_VOICE -
EFFECT_START_NID]) { EFFECT_START_NID]) {
...@@ -4540,7 +4540,7 @@ static int ca0132_effects_set(struct hda_codec *codec, hda_nid_t nid, long val) ...@@ -4540,7 +4540,7 @@ static int ca0132_effects_set(struct hda_codec *codec, hda_nid_t nid, long val)
* For SBZ noise reduction, there's an extra command * For SBZ noise reduction, there's an extra command
* to module ID 0x47. No clue why. * to module ID 0x47. No clue why.
*/ */
if ((nid == NOISE_REDUCTION) && (spec->quirk == QUIRK_SBZ) if ((nid == NOISE_REDUCTION) && (spec->use_pci_mmio)
&& (spec->cur_mic_type != REAR_LINE_IN)) { && (spec->cur_mic_type != REAR_LINE_IN)) {
if (spec->effects_switch[CRYSTAL_VOICE - if (spec->effects_switch[CRYSTAL_VOICE -
EFFECT_START_NID]) { EFFECT_START_NID]) {
...@@ -5856,8 +5856,8 @@ static int ca0132_build_controls(struct hda_codec *codec) ...@@ -5856,8 +5856,8 @@ static int ca0132_build_controls(struct hda_codec *codec)
*/ */
num_fx = OUT_EFFECTS_COUNT + IN_EFFECTS_COUNT; num_fx = OUT_EFFECTS_COUNT + IN_EFFECTS_COUNT;
for (i = 0; i < num_fx; i++) { for (i = 0; i < num_fx; i++) {
/* SBZ and R3D break if Echo Cancellation is used. */ /* Desktop cards break if Echo Cancellation is used. */
if (spec->quirk == QUIRK_SBZ || spec->quirk == QUIRK_R3D) { if (spec->use_pci_mmio) {
if (i == (ECHO_CANCELLATION - IN_EFFECT_START_NID + if (i == (ECHO_CANCELLATION - IN_EFFECT_START_NID +
OUT_EFFECTS_COUNT)) OUT_EFFECTS_COUNT))
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment