]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/hda/hda_codec.h
ALSA: hda - Don't reset SPDIF in each status change
[linux-2.6-omap-h63xx.git] / sound / pci / hda / hda_codec.h
index f14871151be983a307330ec9c61009895a22f944..aeee5816153787ebc0cd0a8123dba4e8c0d186b5 100644 (file)
@@ -78,7 +78,7 @@ enum {
 #define AC_VERB_GET_BEEP_CONTROL               0x0f0a
 #define AC_VERB_GET_EAPD_BTLENABLE             0x0f0c
 #define AC_VERB_GET_DIGI_CONVERT_1             0x0f0d
-#define AC_VERB_GET_DIGI_CONVERT_2             0x0f0e
+#define AC_VERB_GET_DIGI_CONVERT_2             0x0f0e /* unused */
 #define AC_VERB_GET_VOLUME_KNOB_CONTROL                0x0f0f
 /* f10-f1a: GPIO */
 #define AC_VERB_GET_GPIO_DATA                  0x0f15
@@ -121,6 +121,7 @@ enum {
 #define AC_VERB_SET_CONFIG_DEFAULT_BYTES_1     0x71d
 #define AC_VERB_SET_CONFIG_DEFAULT_BYTES_2     0x71e
 #define AC_VERB_SET_CONFIG_DEFAULT_BYTES_3     0x71f
+#define AC_VERB_SET_EAPD                               0x788
 #define AC_VERB_SET_CODEC_RESET                        0x7ff
 
 /*
@@ -449,6 +450,7 @@ enum {
  */
 
 struct hda_bus;
+struct hda_beep;
 struct hda_codec;
 struct hda_pcm;
 struct hda_pcm_stream;
@@ -590,11 +592,21 @@ struct hda_pcm_stream {
        struct hda_pcm_ops ops;
 };
 
+/* PCM types */
+enum {
+       HDA_PCM_TYPE_AUDIO,
+       HDA_PCM_TYPE_SPDIF,
+       HDA_PCM_TYPE_HDMI,
+       HDA_PCM_TYPE_MODEM,
+       HDA_PCM_NTYPES
+};
+
 /* for PCM creation */
 struct hda_pcm {
        char *name;
        struct hda_pcm_stream stream[2];
-       unsigned int is_modem;  /* modem codec? */
+       unsigned int pcm_type;  /* HDA_PCM_TYPE_XXX */
+       int device;     /* assigned device number */
 };
 
 /* codec information */
@@ -624,6 +636,9 @@ struct hda_codec {
        /* codec specific info */
        void *spec;
 
+       /* beep device */
+       struct hda_beep *beep;
+
        /* widget capabilities cache */
        unsigned int num_nodes;
        hda_nid_t start_nid;
@@ -639,6 +654,11 @@ struct hda_codec {
 
        struct snd_hwdep *hwdep;        /* assigned hwdep device */
 
+       /* misc flags */
+       unsigned int spdif_status_reset :1; /* needs to toggle SPDIF for each
+                                            * status change
+                                            * (e.g. Realtek codecs)
+                                            */
 #ifdef CONFIG_SND_HDA_POWER_SAVE
        unsigned int power_on :1;       /* current (global) power-state */
        unsigned int power_transition :1; /* power-state in transition */
@@ -712,6 +732,7 @@ int snd_hda_build_pcms(struct hda_bus *bus);
 void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,
                                u32 stream_tag,
                                int channel_id, int format);
+void snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid);
 unsigned int snd_hda_calc_stream_format(unsigned int rate,
                                        unsigned int channels,
                                        unsigned int format,