@@ -11,6 +11,49 @@
#include <sound/soc.h>
+#define SOC_SDW_MAX_DAI_NUM 8
+
+struct asoc_sdw_codec_info;
+
+struct asoc_sdw_dai_info {
+ const bool direction[2]; /* playback & capture support */
+ const char *dai_name;
+ const int dai_type;
+ const int dailink[2]; /* dailink id for each direction */
+ const struct snd_kcontrol_new *controls;
+ const int num_controls;
+ const struct snd_soc_dapm_widget *widgets;
+ const int num_widgets;
+ int (*init)(struct snd_soc_card *card,
+ struct snd_soc_dai_link *dai_links,
+ struct asoc_sdw_codec_info *info,
+ bool playback);
+ int (*exit)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link);
+ int (*rtd_init)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
+ bool rtd_init_done; /* Indicate that the rtd_init callback is done */
+ unsigned long quirk;
+};
+
+struct asoc_sdw_codec_info {
+ const int part_id;
+ const int version_id;
+ const char *codec_name;
+ int amp_num;
+ const u8 acpi_id[ACPI_ID_LEN];
+ const bool ignore_internal_dmic;
+ const struct snd_soc_ops *ops;
+ struct asoc_sdw_dai_info dais[SOC_SDW_MAX_DAI_NUM];
+ const int dai_num;
+
+ int (*codec_card_late_probe)(struct snd_soc_card *card);
+
+ int (*count_sidecar)(struct snd_soc_card *card,
+ int *num_dais, int *num_devs);
+ int (*add_sidecar)(struct snd_soc_card *card,
+ struct snd_soc_dai_link **dai_links,
+ struct snd_soc_codec_conf **codec_conf);
+};
+
int asoc_sdw_startup(struct snd_pcm_substream *substream);
int asoc_sdw_prepare(struct snd_pcm_substream *substream);
int asoc_sdw_prepare(struct snd_pcm_substream *substream);
@@ -78,49 +78,6 @@ enum {
#define SOC_SDW_DAI_TYPE_AMP 1
#define SOC_SDW_DAI_TYPE_MIC 2
-#define SOC_SDW_MAX_DAI_NUM 8
-
-struct asoc_sdw_codec_info;
-
-struct asoc_sdw_dai_info {
- const bool direction[2]; /* playback & capture support */
- const char *dai_name;
- const int dai_type;
- const int dailink[2]; /* dailink id for each direction */
- const struct snd_kcontrol_new *controls;
- const int num_controls;
- const struct snd_soc_dapm_widget *widgets;
- const int num_widgets;
- int (*init)(struct snd_soc_card *card,
- struct snd_soc_dai_link *dai_links,
- struct asoc_sdw_codec_info *info,
- bool playback);
- int (*exit)(struct snd_soc_card *card, struct snd_soc_dai_link *dai_link);
- int (*rtd_init)(struct snd_soc_pcm_runtime *rtd, struct snd_soc_dai *dai);
- bool rtd_init_done; /* Indicate that the rtd_init callback is done */
- unsigned long quirk;
-};
-
-struct asoc_sdw_codec_info {
- const int part_id;
- const int version_id;
- const char *codec_name;
- int amp_num;
- const u8 acpi_id[ACPI_ID_LEN];
- const bool ignore_internal_dmic;
- const struct snd_soc_ops *ops;
- struct asoc_sdw_dai_info dais[SOC_SDW_MAX_DAI_NUM];
- const int dai_num;
-
- int (*codec_card_late_probe)(struct snd_soc_card *card);
-
- int (*count_sidecar)(struct snd_soc_card *card,
- int *num_dais, int *num_devs);
- int (*add_sidecar)(struct snd_soc_card *card,
- struct snd_soc_dai_link **dai_links,
- struct snd_soc_codec_conf **codec_conf);
-};
-
struct mc_private {
struct snd_soc_card card;
struct snd_soc_jack sdw_headset;