]> err.no Git - linux-2.6/blobdiff - sound/pci/hda/patch_si3054.c
Merge branch 'eseries' into pxa
[linux-2.6] / sound / pci / hda / patch_si3054.c
index 9838eac9ab598068458a509afe07ebf03f1bd471..9332b63e406cc963dfab355011b254493808db2f 100644 (file)
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <sound/driver.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
 #include <sound/core.h>
 #include "hda_codec.h"
 #include "hda_local.h"
-
+#include "hda_patch.h"
 
 /* si3054 verbs */
 #define SI3054_VERB_READ_NODE  0x900
@@ -78,6 +77,8 @@
 /* si3054 codec registers (nodes) access macros */
 #define GET_REG(codec,reg) (snd_hda_codec_read(codec,reg,0,SI3054_VERB_READ_NODE,0))
 #define SET_REG(codec,reg,val) (snd_hda_codec_write(codec,reg,0,SI3054_VERB_WRITE_NODE,val))
+#define SET_REG_CACHE(codec,reg,val) \
+       snd_hda_codec_write_cache(codec,reg,0,SI3054_VERB_WRITE_NODE,val)
 
 
 struct si3054_spec {
@@ -113,9 +114,9 @@ static int si3054_switch_put(struct snd_kcontrol *kcontrol,
        u16 reg  = PRIVATE_REG(kcontrol->private_value);
        u16 mask = PRIVATE_MASK(kcontrol->private_value);
        if (uvalue->value.integer.value[0])
-               SET_REG(codec, reg, (GET_REG(codec, reg)) | mask);
+               SET_REG_CACHE(codec, reg, (GET_REG(codec, reg)) | mask);
        else
-               SET_REG(codec, reg, (GET_REG(codec, reg)) & ~mask);
+               SET_REG_CACHE(codec, reg, (GET_REG(codec, reg)) & ~mask);
        return 0;
 }
 
@@ -205,7 +206,7 @@ static int si3054_build_pcms(struct hda_codec *codec)
        info->name = "Si3054 Modem";
        info->stream[SNDRV_PCM_STREAM_PLAYBACK] = si3054_pcm;
        info->stream[SNDRV_PCM_STREAM_CAPTURE]  = si3054_pcm;
-       info->is_modem = 1;
+       info->pcm_type = HDA_PCM_TYPE_MODEM;
        return 0;
 }
 
@@ -267,10 +268,6 @@ static struct hda_codec_ops si3054_patch_ops = {
        .build_pcms = si3054_build_pcms,
        .init = si3054_init,
        .free = si3054_free,
-#ifdef CONFIG_PM
-       //.suspend = si3054_suspend,
-       .resume = si3054_init,
-#endif
 };
 
 static int patch_si3054(struct hda_codec *codec)
@@ -289,7 +286,6 @@ static int patch_si3054(struct hda_codec *codec)
 struct hda_codec_preset snd_hda_preset_si3054[] = {
        { .id = 0x163c3055, .name = "Si3054", .patch = patch_si3054 },
        { .id = 0x163c3155, .name = "Si3054", .patch = patch_si3054 },
-       { .id = 0x11c11040, .name = "Si3054", .patch = patch_si3054 },
        { .id = 0x11c13026, .name = "Si3054", .patch = patch_si3054 },
        { .id = 0x11c13055, .name = "Si3054", .patch = patch_si3054 },
        { .id = 0x11c13155, .name = "Si3054", .patch = patch_si3054 },