diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-04-07 13:10:13 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-04-07 13:51:22 -0400 |
commit | 06f409d76f1d382167eb1cadde2e23a73272865d (patch) | |
tree | c3ce8d3662d0916bee10fe635cc84665b3c12cca /include | |
parent | 6553e192d48af88184029066c30c9464516ea0b7 (diff) |
ASoC: Provide core support for symmetric sample rates
Many devices require symmetric configurations of capture and playback
data formats, often due to shared clocking but sometimes also due to
other shared playback and record configuration in the device. Start
providing core support for this by allowing the DAIs or the machine
to specify that the sample rates used should be kept symmetric.
A flag symmetric_rates is provided in the snd_soc_dai and
snd_soc_dai_link structures. If this is set in either of the DAIs or in
the machine then a constraint will be applied when a stream is already
open preventing any changes in sample rate.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sound/soc-dai.h | 1 | ||||
-rw-r--r-- | include/sound/soc.h | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 13676472ddfc..22b729fbbf84 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -208,6 +208,7 @@ struct snd_soc_dai { | |||
208 | /* DAI capabilities */ | 208 | /* DAI capabilities */ |
209 | struct snd_soc_pcm_stream capture; | 209 | struct snd_soc_pcm_stream capture; |
210 | struct snd_soc_pcm_stream playback; | 210 | struct snd_soc_pcm_stream playback; |
211 | unsigned int symmetric_rates:1; | ||
211 | 212 | ||
212 | /* DAI runtime info */ | 213 | /* DAI runtime info */ |
213 | struct snd_pcm_runtime *runtime; | 214 | struct snd_pcm_runtime *runtime; |
diff --git a/include/sound/soc.h b/include/sound/soc.h index a40bc6f316fc..b1f2f8819fea 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h | |||
@@ -417,6 +417,12 @@ struct snd_soc_dai_link { | |||
417 | /* codec/machine specific init - e.g. add machine controls */ | 417 | /* codec/machine specific init - e.g. add machine controls */ |
418 | int (*init)(struct snd_soc_codec *codec); | 418 | int (*init)(struct snd_soc_codec *codec); |
419 | 419 | ||
420 | /* Symmetry requirements */ | ||
421 | unsigned int symmetric_rates:1; | ||
422 | |||
423 | /* Symmetry data - only valid if symmetry is being enforced */ | ||
424 | unsigned int rate; | ||
425 | |||
420 | /* DAI pcm */ | 426 | /* DAI pcm */ |
421 | struct snd_pcm *pcm; | 427 | struct snd_pcm *pcm; |
422 | }; | 428 | }; |