summaryrefslogtreecommitdiffstats
path: root/sound/isa/es18xx.c
diff options
context:
space:
mode:
authorMark Salazar <markTheCoder@justmyself.net>2006-01-16 11:33:52 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:24:08 +0100
commit14086771c04acecc81e3985ca3118b330324194d (patch)
tree72e008a3d667bd2d49fb0e13e08fa6d0df9622b5 /sound/isa/es18xx.c
parentf4df221f8fe129ac2fa2a2a4306b7355cf7d05d6 (diff)
downloadlinux-14086771c04acecc81e3985ca3118b330324194d.tar.bz2
[ALSA] #3/4 for Zoom Video - change Hardware Volume interrupt handling
Modules: ES18xx driver Third of 4 es18xx.c patches culminating in Zoom Video support. This patch changes the Hardware Volume support to reflect the fact that not all of the supported chipsets have seperate registers dedicated to the Hardware Volume inputs. Although all the chipsets can generate an HWV interrupt whenever a Hardware Volume input is received only those with seperate HWV registers can split the HWV registers from the Master volume registers. Testing: This work was initially done on the source from the Debian Sarge ALSA package, then tested on an ES1879 and an ES1878 machine. Patches were created against the Sarge code and then edited to apply correctly to the ALSA cvs code. Lastly the patched ALSA cvs code was test for successful compilation. No additional testing was done on the ALSA cvs version. Signed-off-by: Mark Salazar <markTheCoder@justmyself.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/es18xx.c')
-rw-r--r--sound/isa/es18xx.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 0488eba051e9..93335000c51e 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -148,7 +148,7 @@ struct snd_audiodrive {
#define ES18XX_DUPLEX_SAME 0x0010 /* Playback and record must share the same rate */
#define ES18XX_NEW_RATE 0x0020 /* More precise rate setting */
#define ES18XX_AUXB 0x0040 /* AuxB mixer control */
-#define ES18XX_HWV 0x0080 /* Has hardware volume */
+#define ES18XX_HWV 0x0080 /* Has seperate hardware volume mixer controls*/
#define ES18XX_MONO 0x0100 /* Mono_in mixer control */
#define ES18XX_I2S 0x0200 /* I2S mixer control */
#define ES18XX_MUTEREC 0x0400 /* Record source can be muted */
@@ -788,9 +788,12 @@ static irqreturn_t snd_es18xx_interrupt(int irq, void *dev_id, struct pt_regs *r
/* Hardware volume */
if (status & HWV_IRQ) {
- int split = snd_es18xx_mixer_read(chip, 0x64) & 0x80;
- snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->hw_switch->id);
- snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->hw_volume->id);
+ int split = 0;
+ if (chip->caps & ES18XX_HWV) {
+ split = snd_es18xx_mixer_read(chip, 0x64) & 0x80;
+ snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->hw_switch->id);
+ snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->hw_volume->id);
+ }
if (!split) {
snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->master_switch->id);
snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE, &chip->master_volume->id);
@@ -1614,22 +1617,22 @@ static int __devinit snd_es18xx_probe(struct snd_es18xx *chip)
switch (chip->version) {
case 0x1868:
- chip->caps = ES18XX_DUPLEX_MONO | ES18XX_DUPLEX_SAME | ES18XX_CONTROL | ES18XX_HWV;
+ chip->caps = ES18XX_DUPLEX_MONO | ES18XX_DUPLEX_SAME | ES18XX_CONTROL;
break;
case 0x1869:
chip->caps = ES18XX_PCM2 | ES18XX_SPATIALIZER | ES18XX_RECMIX | ES18XX_NEW_RATE | ES18XX_AUXB | ES18XX_MONO | ES18XX_MUTEREC | ES18XX_CONTROL | ES18XX_HWV;
break;
case 0x1878:
- chip->caps = ES18XX_DUPLEX_MONO | ES18XX_DUPLEX_SAME | ES18XX_I2S | ES18XX_CONTROL | ES18XX_HWV;
+ chip->caps = ES18XX_DUPLEX_MONO | ES18XX_DUPLEX_SAME | ES18XX_I2S | ES18XX_CONTROL;
break;
case 0x1879:
chip->caps = ES18XX_PCM2 | ES18XX_SPATIALIZER | ES18XX_RECMIX | ES18XX_NEW_RATE | ES18XX_AUXB | ES18XX_I2S | ES18XX_CONTROL | ES18XX_HWV;
break;
case 0x1887:
- chip->caps = ES18XX_PCM2 | ES18XX_RECMIX | ES18XX_AUXB | ES18XX_DUPLEX_SAME | ES18XX_HWV;
+ chip->caps = ES18XX_PCM2 | ES18XX_RECMIX | ES18XX_AUXB | ES18XX_DUPLEX_SAME;
break;
case 0x1888:
- chip->caps = ES18XX_PCM2 | ES18XX_RECMIX | ES18XX_AUXB | ES18XX_DUPLEX_SAME | ES18XX_HWV;
+ chip->caps = ES18XX_PCM2 | ES18XX_RECMIX | ES18XX_AUXB | ES18XX_DUPLEX_SAME;
break;
default:
snd_printk(KERN_ERR "[0x%lx] unsupported chip ES%x\n",