Skip to content

Commit

Permalink
ALSA: hda/ca0132 - Fix input effect controls for desktop cards
Browse files Browse the repository at this point in the history
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: Connor McAdams <conmanx360@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Connor McAdams authored and Takashi Iwai committed Oct 9, 2018
1 parent 1502b43 commit 7a2dc84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/pci/hda/patch_ca0132.c
Original file line number Diff line number Diff line change
Expand Up @@ -4857,7 +4857,7 @@ static int ca0132_effects_set(struct hda_codec *codec, hda_nid_t nid, long val)
val = 0;

/* 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)) {
if (spec->effects_switch[CRYSTAL_VOICE -
EFFECT_START_NID]) {
Expand All @@ -4876,7 +4876,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
* 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)) {
if (spec->effects_switch[CRYSTAL_VOICE -
EFFECT_START_NID]) {
Expand Down Expand Up @@ -6374,8 +6374,8 @@ static int ca0132_build_controls(struct hda_codec *codec)
*/
num_fx = OUT_EFFECTS_COUNT + IN_EFFECTS_COUNT;
for (i = 0; i < num_fx; i++) {
/* SBZ and R3D break if Echo Cancellation is used. */
if (spec->quirk == QUIRK_SBZ || spec->quirk == QUIRK_R3D) {
/* Desktop cards break if Echo Cancellation is used. */
if (spec->use_pci_mmio) {
if (i == (ECHO_CANCELLATION - IN_EFFECT_START_NID +
OUT_EFFECTS_COUNT))
continue;
Expand Down

0 comments on commit 7a2dc84

Please sign in to comment.