]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/cx88/cx88-alsa.c
Merge git://git.infradead.org/~kmpark/onenand-mtd-2.6
[linux-2.6-omap-h63xx.git] / drivers / media / video / cx88 / cx88-alsa.c
index 6cf8609588a581758c62488bf338b4605d1ddc18..316b106c3511b2a15981e692c6e4c7cd9884c6cd 100644 (file)
 #include <linux/pci.h>
 
 #include <asm/delay.h>
-#include <sound/driver.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
 #include <sound/control.h>
 #include <sound/initval.h>
+#include <sound/tlv.h>
 
 #include "cx88.h"
 #include "cx88-reg.h"
@@ -416,7 +416,7 @@ static int snd_cx88_hw_params(struct snd_pcm_substream * substream,
        buf->risc.jmp[0] = cpu_to_le32(RISC_JUMP|RISC_IRQ1|RISC_CNT_INC);
        buf->risc.jmp[1] = cpu_to_le32(buf->risc.dma);
 
-       buf->vb.state = STATE_PREPARED;
+       buf->vb.state = VIDEOBUF_PREPARED;
 
        chip->buf = buf;
        chip->dma_risc = dma;
@@ -605,12 +605,17 @@ static int snd_cx88_volume_put(struct snd_kcontrol *kcontrol,
        return changed;
 }
 
+static const DECLARE_TLV_DB_SCALE(snd_cx88_db_scale, -6300, 100, 0);
+
 static struct snd_kcontrol_new snd_cx88_volume = {
        .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+       .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
+                 SNDRV_CTL_ELEM_ACCESS_TLV_READ,
        .name = "Playback Volume",
        .info = snd_cx88_volume_info,
        .get = snd_cx88_volume_get,
        .put = snd_cx88_volume_put,
+       .tlv.p = snd_cx88_db_scale,
 };
 
 static int snd_cx88_switch_get(struct snd_kcontrol *kcontrol,