[1/3] ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
diff mbox series

Message ID 20200803002928.8638-1-conmanx360@gmail.com
State New
Headers show
Series
  • [1/3] ALSA: hda/ca0132 - Fix ZxR Headphone gain control get value.
Related show

Commit Message

Connor McAdams Aug. 3, 2020, 12:29 a.m. UTC
When the ZxR headphone gain control was added, the ca0132_switch_get
function was not updated, which meant that the changes to the control
state were not saved when entering/exiting alsamixer.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
---
 sound/pci/hda/patch_ca0132.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Takashi Iwai Aug. 3, 2020, 6:12 a.m. UTC | #1
On Mon, 03 Aug 2020 02:29:25 +0200,
Connor McAdams wrote:
> 
> When the ZxR headphone gain control was added, the ca0132_switch_get
> function was not updated, which meant that the changes to the control
> state were not saved when entering/exiting alsamixer.
> 
> Signed-off-by: Connor McAdams <conmanx360@gmail.com>

Applied, thanks.


Takashi

Patch
diff mbox series

diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 19c575fd28a1..2cbe01d59c16 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -5748,6 +5748,11 @@  static int ca0132_switch_get(struct snd_kcontrol *kcontrol,
 		return 0;
 	}
 
+	if (nid == ZXR_HEADPHONE_GAIN) {
+		*valp = spec->zxr_gain_set;
+		return 0;
+	}
+
 	return 0;
 }