diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.6/0062-ALSA-oxygen-virtuoso-fix-exchanged-L-R-volumes-of-au.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.6/0062-ALSA-oxygen-virtuoso-fix-exchanged-L-R-volumes-of-au.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.6/0062-ALSA-oxygen-virtuoso-fix-exchanged-L-R-volumes-of-au.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.6/0062-ALSA-oxygen-virtuoso-fix-exchanged-L-R-volumes-of-au.patch new file mode 100644 index 00000000..4bd7da23 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.6/0062-ALSA-oxygen-virtuoso-fix-exchanged-L-R-volumes-of-au.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From bc7e7c8b2462ed098d18bc54b431341cc69584b2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Clemens Ladisch <clemens@ladisch.de> | ||
3 | Date: Sat, 4 Feb 2012 20:56:47 +0100 | ||
4 | Subject: [PATCH 62/87] ALSA: oxygen, virtuoso: fix exchanged L/R volumes of | ||
5 | aux and CD inputs | ||
6 | |||
7 | commit 2492250e4412c6411324c14ab289629360640b0a upstream. | ||
8 | |||
9 | The driver accidentally exchanged the left/right fields for stereo AC'97 | ||
10 | mixer registers. This affected only the aux and CD inputs because the | ||
11 | line input bypasses the AC'97 codec and the mic input is mono; cards | ||
12 | without AC'97 (Xonar DS/DG/HDAV Slim, HG2PCI, HiFier) were not affected. | ||
13 | |||
14 | Reported-and-tested-by: Abby Cedar <abbycedar@yahoo.com.au> | ||
15 | Signed-off-by: Clemens Ladisch <clemens@ladisch.de> | ||
16 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | ||
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
18 | --- | ||
19 | sound/pci/oxygen/oxygen_mixer.c | 25 ++++++++++++++----------- | ||
20 | 1 files changed, 14 insertions(+), 11 deletions(-) | ||
21 | |||
22 | diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c | ||
23 | index 26c7e8b..c0dbb52 100644 | ||
24 | --- a/sound/pci/oxygen/oxygen_mixer.c | ||
25 | +++ b/sound/pci/oxygen/oxygen_mixer.c | ||
26 | @@ -618,9 +618,12 @@ static int ac97_volume_get(struct snd_kcontrol *ctl, | ||
27 | mutex_lock(&chip->mutex); | ||
28 | reg = oxygen_read_ac97(chip, codec, index); | ||
29 | mutex_unlock(&chip->mutex); | ||
30 | - value->value.integer.value[0] = 31 - (reg & 0x1f); | ||
31 | - if (stereo) | ||
32 | - value->value.integer.value[1] = 31 - ((reg >> 8) & 0x1f); | ||
33 | + if (!stereo) { | ||
34 | + value->value.integer.value[0] = 31 - (reg & 0x1f); | ||
35 | + } else { | ||
36 | + value->value.integer.value[0] = 31 - ((reg >> 8) & 0x1f); | ||
37 | + value->value.integer.value[1] = 31 - (reg & 0x1f); | ||
38 | + } | ||
39 | return 0; | ||
40 | } | ||
41 | |||
42 | @@ -636,14 +639,14 @@ static int ac97_volume_put(struct snd_kcontrol *ctl, | ||
43 | |||
44 | mutex_lock(&chip->mutex); | ||
45 | oldreg = oxygen_read_ac97(chip, codec, index); | ||
46 | - newreg = oldreg; | ||
47 | - newreg = (newreg & ~0x1f) | | ||
48 | - (31 - (value->value.integer.value[0] & 0x1f)); | ||
49 | - if (stereo) | ||
50 | - newreg = (newreg & ~0x1f00) | | ||
51 | - ((31 - (value->value.integer.value[1] & 0x1f)) << 8); | ||
52 | - else | ||
53 | - newreg = (newreg & ~0x1f00) | ((newreg & 0x1f) << 8); | ||
54 | + if (!stereo) { | ||
55 | + newreg = oldreg & ~0x1f; | ||
56 | + newreg |= 31 - (value->value.integer.value[0] & 0x1f); | ||
57 | + } else { | ||
58 | + newreg = oldreg & ~0x1f1f; | ||
59 | + newreg |= (31 - (value->value.integer.value[0] & 0x1f)) << 8; | ||
60 | + newreg |= 31 - (value->value.integer.value[1] & 0x1f); | ||
61 | + } | ||
62 | change = newreg != oldreg; | ||
63 | if (change) | ||
64 | oxygen_write_ac97(chip, codec, index, newreg); | ||
65 | -- | ||
66 | 1.7.7.4 | ||
67 | |||