nfsd: track last inode only in use_wgather case
[safe/jmp/linux-2.6] / include / sound / wss.h
index 2cc1f14..6d65f32 100644 (file)
 #define WSS_HWSHARE_DMA1       (1<<1)
 #define WSS_HWSHARE_DMA2       (1<<2)
 
+/* IBM Thinkpad specific stuff */
+#define AD1848_THINKPAD_CTL_PORT1              0x15e8
+#define AD1848_THINKPAD_CTL_PORT2              0x15e9
+#define AD1848_THINKPAD_CS4248_ENABLE_BIT      0x02
+
 struct snd_wss {
        unsigned long port;             /* base i/o port */
        struct resource *res_port;
@@ -149,10 +154,13 @@ int snd_wss_create(struct snd_card *card,
                      unsigned short hardware,
                      unsigned short hwshare,
                      struct snd_wss **rchip);
+int snd_wss_free(struct snd_wss *chip);
 int snd_wss_pcm(struct snd_wss *chip, int device, struct snd_pcm **rpcm);
 int snd_wss_timer(struct snd_wss *chip, int device, struct snd_timer **rtimer);
 int snd_wss_mixer(struct snd_wss *chip);
 
+const struct snd_pcm_ops *snd_wss_get_pcm_ops(int direction);
+
 int snd_cs4236_create(struct snd_card *card,
                      unsigned long port,
                      unsigned long cport,
@@ -193,6 +201,31 @@ int snd_wss_put_single(struct snd_kcontrol *kcontrol,
   .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | \
                   (shift_right << 19) | (mask << 24) | (invert << 22) }
 
+#define WSS_SINGLE_TLV(xname, xindex, reg, shift, mask, invert, xtlv) \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+  .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, \
+  .name = xname, \
+  .index = xindex, \
+  .info = snd_wss_info_single, \
+  .get = snd_wss_get_single, \
+  .put = snd_wss_put_single, \
+  .private_value = reg | (shift << 8) | (mask << 16) | (invert << 24), \
+  .tlv = { .p = (xtlv) } }
+
+#define WSS_DOUBLE_TLV(xname, xindex, left_reg, right_reg, \
+                       shift_left, shift_right, mask, invert, xtlv) \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \
+  .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, \
+  .name = xname, \
+  .index = xindex, \
+  .info = snd_wss_info_double, \
+  .get = snd_wss_get_double, \
+  .put = snd_wss_put_double, \
+  .private_value = left_reg | (right_reg << 8) | (shift_left << 16) | \
+                  (shift_right << 19) | (mask << 24) | (invert << 22), \
+  .tlv = { .p = (xtlv) } }
+
+
 int snd_wss_info_double(struct snd_kcontrol *kcontrol,
                        struct snd_ctl_elem_info *uinfo);
 int snd_wss_get_double(struct snd_kcontrol *kcontrol,