]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/ice1712/ice1724.c
[ALSA] oxygen: rename PCM to Master
[linux-2.6-omap-h63xx.git] / sound / pci / ice1712 / ice1724.c
index 32560cfb6c3fcafdfe8bb210ea34d2b3c6d66008..3147cbc9edb3af4b65111f81f268ef6782e25a36 100644 (file)
@@ -2,7 +2,7 @@
  *   ALSA driver for VT1724 ICEnsemble ICE1724 / VIA VT1724 (Envy24HT)
  *                   VIA VT1720 (Envy24PT)
  *
- *     Copyright (c) 2000 Jaroslav Kysela <perex@suse.cz>
+ *     Copyright (c) 2000 Jaroslav Kysela <perex@perex.cz>
  *                    2002 James Stafford <jstafford@ampltd.com>
  *                    2003 Takashi Iwai <tiwai@suse.de>
  *
@@ -22,7 +22,6 @@
  *
  */      
 
-#include <sound/driver.h>
 #include <asm/io.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
@@ -51,8 +50,9 @@
 #include "juli.h"
 #include "phase.h"
 #include "wtm.h"
+#include "se.h"
 
-MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
+MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
 MODULE_DESCRIPTION("VIA ICEnsemble ICE1724/1720 (Envy24HT/PT)");
 MODULE_LICENSE("GPL");
 MODULE_SUPPORTED_DEVICE("{"
@@ -65,6 +65,7 @@ MODULE_SUPPORTED_DEVICE("{"
               JULI_DEVICE_DESC
               PHASE_DEVICE_DESC
               WTM_DEVICE_DESC
+              SE_DEVICE_DESC
                "{VIA,VT1720},"
                "{VIA,VT1724},"
                "{ICEnsemble,Generic ICE1724},"
@@ -341,10 +342,12 @@ static int snd_vt1724_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
 
        what = 0;
        snd_pcm_group_for_each_entry(s, substream) {
-               const struct vt1724_pcm_reg *reg;
-               reg = s->runtime->private_data;
-               what |= reg->start;
-               snd_pcm_trigger_done(s, substream);
+               if (snd_pcm_substream_chip(s) == ice) {
+                       const struct vt1724_pcm_reg *reg;
+                       reg = s->runtime->private_data;
+                       what |= reg->start;
+                       snd_pcm_trigger_done(s, substream);
+               }
        }
 
        switch (cmd) {
@@ -1931,6 +1934,7 @@ static struct snd_ice1712_card_info *card_tables[] __devinitdata = {
        snd_vt1724_juli_cards,
        snd_vt1724_phase_cards,
        snd_vt1724_wtm_cards,
+       snd_vt1724_se_cards,
        NULL,
 };
 
@@ -1953,6 +1957,7 @@ unsigned char snd_vt1724_read_i2c(struct snd_ice1712 *ice,
        unsigned char val;
 
        mutex_lock(&ice->i2c_mutex);
+       wait_i2c_busy(ice);
        outb(addr, ICEREG1724(ice, I2C_BYTE_ADDR));
        outb(dev & ~VT1724_I2C_WRITE, ICEREG1724(ice, I2C_DEV_ADDR));
        wait_i2c_busy(ice);