aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc.h22
-rw-r--r--sound/soc/soc-core.c6
2 files changed, 18 insertions, 10 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
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1fd1d1a62af1..4649db6163b8 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1401,11 +1401,11 @@ static void soc_set_name_prefix(struct snd_soc_card *card,
1401{ 1401{
1402 int i; 1402 int i;
1403 1403
1404 if (card->prefix_map == NULL) 1404 if (card->codec_conf == NULL)
1405 return; 1405 return;
1406 1406
1407 for (i = 0; i < card->num_prefixes; i++) { 1407 for (i = 0; i < card->num_configs; i++) {
1408 struct snd_soc_prefix_map *map = &card->prefix_map[i]; 1408 struct snd_soc_codec_conf *map = &card->codec_conf[i];
1409 if (map->dev_name && !strcmp(codec->name, map->dev_name)) { 1409 if (map->dev_name && !strcmp(codec->name, map->dev_name)) {
1410 codec->name_prefix = map->name_prefix; 1410 codec->name_prefix = map->name_prefix;
1411 break; 1411 break;