]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/hda/hda_local.h
ALSA: rawmidi - Refactor rawmidi open/close codes
[linux-2.6-omap-h63xx.git] / sound / pci / hda / hda_local.h
index aac569b05599b98b4f7b1ae9063177c7127b3ed8..44f189cb97aee1f8d40f166a5a998ae0ddca61b1 100644 (file)
@@ -251,6 +251,8 @@ int snd_hda_multi_out_dig_prepare(struct hda_codec *codec,
                                  unsigned int stream_tag,
                                  unsigned int format,
                                  struct snd_pcm_substream *substream);
+int snd_hda_multi_out_dig_cleanup(struct hda_codec *codec,
+                                 struct hda_multi_out *mout);
 int snd_hda_multi_out_analog_open(struct hda_codec *codec,
                                  struct hda_multi_out *mout,
                                  struct snd_pcm_substream *substream,
@@ -284,12 +286,21 @@ int snd_hda_codec_proc_new(struct hda_codec *codec);
 static inline int snd_hda_codec_proc_new(struct hda_codec *codec) { return 0; }
 #endif
 
+#define SND_PRINT_RATES_ADVISED_BUFSIZE        80
+void snd_print_pcm_rates(int pcm, char *buf, int buflen);
+
+#define SND_PRINT_BITS_ADVISED_BUFSIZE 16
+void snd_print_pcm_bits(int pcm, char *buf, int buflen);
+
 /*
  * Misc
  */
 int snd_hda_check_board_config(struct hda_codec *codec, int num_configs,
                               const char **modelnames,
                               const struct snd_pci_quirk *pci_list);
+int snd_hda_check_board_codec_sid_config(struct hda_codec *codec,
+                               int num_configs, const char **models,
+                               const struct snd_pci_quirk *tbl);
 int snd_hda_add_new_ctls(struct hda_codec *codec,
                         struct snd_kcontrol_new *knew);
 
@@ -403,11 +414,19 @@ void snd_hda_ctls_clear(struct hda_codec *codec);
  */
 #ifdef CONFIG_SND_HDA_HWDEP
 int snd_hda_create_hwdep(struct hda_codec *codec);
-int snd_hda_hwdep_add_sysfs(struct hda_codec *codec);
 #else
 static inline int snd_hda_create_hwdep(struct hda_codec *codec) { return 0; }
 #endif
 
+#ifdef CONFIG_SND_HDA_RECONFIG
+int snd_hda_hwdep_add_sysfs(struct hda_codec *codec);
+#else
+static inline int snd_hda_hwdep_add_sysfs(struct hda_codec *codec)
+{
+       return 0;
+}
+#endif
+
 /*
  * power-management
  */
@@ -440,4 +459,66 @@ int snd_hda_check_amp_list_power(struct hda_codec *codec,
 #define get_amp_direction(kc)  (((kc)->private_value >> 18) & 0x1)
 #define get_amp_index(kc)      (((kc)->private_value >> 19) & 0xf)
 
+/*
+ * CEA Short Audio Descriptor data
+ */
+struct cea_sad {
+       int     channels;
+       int     format;         /* (format == 0) indicates invalid SAD */
+       int     rates;
+       int     sample_bits;    /* for LPCM */
+       int     max_bitrate;    /* for AC3...ATRAC */
+       int     profile;        /* for WMAPRO */
+};
+
+#define ELD_FIXED_BYTES        20
+#define ELD_MAX_MNL    16
+#define ELD_MAX_SAD    16
+
+/*
+ * ELD: EDID Like Data
+ */
+struct hdmi_eld {
+       int     eld_size;
+       int     baseline_len;
+       int     eld_ver;        /* (eld_ver == 0) indicates invalid ELD */
+       int     cea_edid_ver;
+       char    monitor_name[ELD_MAX_MNL + 1];
+       int     manufacture_id;
+       int     product_id;
+       u64     port_id;
+       int     support_hdcp;
+       int     support_ai;
+       int     conn_type;
+       int     aud_synch_delay;
+       int     spk_alloc;
+       int     sad_count;
+       struct cea_sad sad[ELD_MAX_SAD];
+#ifdef CONFIG_PROC_FS
+       struct snd_info_entry *proc_entry;
+#endif
+};
+
+int snd_hdmi_get_eld_size(struct hda_codec *codec, hda_nid_t nid);
+int snd_hdmi_get_eld(struct hdmi_eld *, struct hda_codec *, hda_nid_t);
+void snd_hdmi_show_eld(struct hdmi_eld *eld);
+
+#ifdef CONFIG_PROC_FS
+int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld);
+void snd_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld);
+#else
+static inline int snd_hda_eld_proc_new(struct hda_codec *codec,
+                                      struct hdmi_eld *eld)
+{
+       return 0;
+}
+static inline void snd_hda_eld_proc_free(struct hda_codec *codec,
+                                        struct hdmi_eld *eld)
+{
+}
+#endif
+
+#define SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE 80
+void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen);
+
 #endif /* __SOUND_HDA_LOCAL_H */