diff options
author | Nikesh Oswal <nikesh@opensource.wolfsonmicro.com> | 2015-02-02 12:06:44 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-17 18:54:54 -0400 |
commit | c66150824b8a809a502fd833fa9b18082cd89a39 (patch) | |
tree | 312992852d07ce536b600cdf9da91a067c31d1c9 /include/sound | |
parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) |
ASoC: dapm: add code to configure dai link parameters
dai-link params for codec-codec links were fixed. The fixed
link between codec and another chip which may be another codec,
baseband, bluetooth codec etc may require run time configuaration
changes. This change provides an optional alsa control to select
one of the params from a list of params.
Signed-off-by: Nikesh Oswal <nikesh@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/soc-dapm.h | 3 | ||||
-rw-r--r-- | include/sound/soc.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h index 8d7416e46861..eda881402dda 100644 --- a/include/sound/soc-dapm.h +++ b/include/sound/soc-dapm.h | |||
@@ -378,6 +378,7 @@ int snd_soc_dapm_link_dai_widgets(struct snd_soc_card *card); | |||
378 | void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card); | 378 | void snd_soc_dapm_connect_dai_link_widgets(struct snd_soc_card *card); |
379 | int snd_soc_dapm_new_pcm(struct snd_soc_card *card, | 379 | int snd_soc_dapm_new_pcm(struct snd_soc_card *card, |
380 | const struct snd_soc_pcm_stream *params, | 380 | const struct snd_soc_pcm_stream *params, |
381 | unsigned int num_params, | ||
381 | struct snd_soc_dapm_widget *source, | 382 | struct snd_soc_dapm_widget *source, |
382 | struct snd_soc_dapm_widget *sink); | 383 | struct snd_soc_dapm_widget *sink); |
383 | 384 | ||
@@ -531,6 +532,8 @@ struct snd_soc_dapm_widget { | |||
531 | void *priv; /* widget specific data */ | 532 | void *priv; /* widget specific data */ |
532 | struct regulator *regulator; /* attached regulator */ | 533 | struct regulator *regulator; /* attached regulator */ |
533 | const struct snd_soc_pcm_stream *params; /* params for dai links */ | 534 | const struct snd_soc_pcm_stream *params; /* params for dai links */ |
535 | unsigned int num_params; /* number of params for dai links */ | ||
536 | unsigned int params_select; /* currently selected param for dai link */ | ||
534 | 537 | ||
535 | /* dapm control */ | 538 | /* dapm control */ |
536 | int reg; /* negative reg = no direct dapm */ | 539 | int reg; /* negative reg = no direct dapm */ |
diff --git a/include/sound/soc.h b/include/sound/soc.h index 0d1ade195628..4636a058372b 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -941,6 +941,7 @@ struct snd_soc_dai_link { | |||
941 | int be_id; /* optional ID for machine driver BE identification */ | 941 | int be_id; /* optional ID for machine driver BE identification */ |
942 | 942 | ||
943 | const struct snd_soc_pcm_stream *params; | 943 | const struct snd_soc_pcm_stream *params; |
944 | unsigned int num_params; | ||
944 | 945 | ||
945 | unsigned int dai_fmt; /* format to set on init */ | 946 | unsigned int dai_fmt; /* format to set on init */ |
946 | 947 | ||