Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230340
b: refs/heads/master
c: ff819b8
h: refs/heads/master
v: v3
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Dec 3, 2010
1 parent f29c322 commit 3598517
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 119bd789f6405b8bf351b58561d08d8fc4e2d10b
refs/heads/master: ff819b8357df0ca9903ff7c9ad518b949c410123
22 changes: 15 additions & 7 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,20 @@ struct snd_soc_dai_link {
struct snd_soc_ops *ops;
};

struct snd_soc_prefix_map {
struct snd_soc_codec_conf {
const char *dev_name;

/*
* optional map of kcontrol, widget and path name prefixes that are
* associated per device
*/
const char *name_prefix;

/*
* set this to the desired compression type if you want to
* override the one supplied in codec->driver->compress_type
*/
enum snd_soc_compress_type compress_type;
};

struct snd_soc_aux_dev {
Expand Down Expand Up @@ -628,12 +639,9 @@ struct snd_soc_card {
struct snd_soc_pcm_runtime *rtd;
int num_rtd;

/*
* optional map of kcontrol, widget and path name prefixes that are
* associated per device
*/
struct snd_soc_prefix_map *prefix_map;
int num_prefixes;
/* optional codec specific configuration */
struct snd_soc_codec_conf *codec_conf;
int num_configs;

/*
* optional auxiliary devices such as amplifiers or codecs with DAI
Expand Down
6 changes: 3 additions & 3 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1401,11 +1401,11 @@ static void soc_set_name_prefix(struct snd_soc_card *card,
{
int i;

if (card->prefix_map == NULL)
if (card->codec_conf == NULL)
return;

for (i = 0; i < card->num_prefixes; i++) {
struct snd_soc_prefix_map *map = &card->prefix_map[i];
for (i = 0; i < card->num_configs; i++) {
struct snd_soc_codec_conf *map = &card->codec_conf[i];
if (map->dev_name && !strcmp(codec->name, map->dev_name)) {
codec->name_prefix = map->name_prefix;
break;
Expand Down

0 comments on commit 3598517

Please sign in to comment.