aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/soc.h
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2010-12-02 09:53:03 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-12-03 11:36:45 -0500
commitff819b8357df0ca9903ff7c9ad518b949c410123 (patch)
tree610ef8b2d54813bc87fe6bf037bd89ed351d89e9 /include/sound/soc.h
parent119bd789f6405b8bf351b58561d08d8fc4e2d10b (diff)
ASoC: soc-core: Generalize snd_soc_prefix_map and rename to snd_soc_codec_conf
The snd_soc_codec_conf struct now holds codec specific configuration information. A new configuration option has been added to allow machine drivers to override the compression type set by the codec driver. In the absence of providing an snd_soc_codec_conf struct or when providing one but not setting the compress_type member to anything, the one supplied by the codec driver will be used instead. In all other cases the one set in the snd_soc_codec_conf struct takes effect. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/sound/soc.h')
-rw-r--r--include/sound/soc.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 24db9101c87d..cf76021f04a7 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -581,9 +581,20 @@ struct snd_soc_dai_link {
581 struct snd_soc_ops *ops; 581 struct snd_soc_ops *ops;
582}; 582};
583 583
584struct snd_soc_prefix_map { 584struct snd_soc_codec_conf {
585 const char *dev_name; 585 const char *dev_name;
586
587 /*
588 * optional map of kcontrol, widget and path name prefixes that are
589 * associated per device
590 */
586 const char *name_prefix; 591 const char *name_prefix;
592
593 /*
594 * set this to the desired compression type if you want to
595 * override the one supplied in codec->driver->compress_type
596 */
597 enum snd_soc_compress_type compress_type;
587}; 598};
588 599
589struct snd_soc_aux_dev { 600struct snd_soc_aux_dev {
@@ -628,12 +639,9 @@ struct snd_soc_card {
628 struct snd_soc_pcm_runtime *rtd; 639 struct snd_soc_pcm_runtime *rtd;
629 int num_rtd; 640 int num_rtd;
630 641
631 /* 642 /* optional codec specific configuration */
632 * optional map of kcontrol, widget and path name prefixes that are 643 struct snd_soc_codec_conf *codec_conf;
633 * associated per device 644 int num_configs;
634 */
635 struct snd_soc_prefix_map *prefix_map;
636 int num_prefixes;
637 645
638 /* 646 /*
639 * optional auxiliary devices such as amplifiers or codecs with DAI 647 * optional auxiliary devices such as amplifiers or codecs with DAI