Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230338
b: refs/heads/master
c: 23bbce3
h: refs/heads/master
v: v3
  • Loading branch information
Dimitris Papastamos authored and Mark Brown committed Dec 3, 2010
1 parent 935a85f commit 3ff6aea
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 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: 676ad98a06a629e6273819a54b70f3987044b608
refs/heads/master: 23bbce34f47762ce944ea9b8b3b3e05e220c6a2e
1 change: 1 addition & 0 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ struct snd_soc_codec {
struct list_head list;
struct list_head card_list;
int num_dai;
enum snd_soc_compress_type compress_type;

/* runtime */
struct snd_ac97 *ac97; /* for ad-hoc ac97 devices */
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1550,11 +1550,11 @@ int snd_soc_cache_init(struct snd_soc_codec *codec)
int i;

for (i = 0; i < ARRAY_SIZE(cache_types); ++i)
if (cache_types[i].id == codec->driver->compress_type)
if (cache_types[i].id == codec->compress_type)
break;
if (i == ARRAY_SIZE(cache_types)) {
dev_err(codec->dev, "Could not match compress type: %d\n",
codec->driver->compress_type);
codec->compress_type);
return -EINVAL;
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -3450,6 +3450,11 @@ int snd_soc_register_codec(struct device *dev,
return -ENOMEM;
}

if (codec_drv->compress_type)
codec->compress_type = codec_drv->compress_type;
else
codec->compress_type = SND_SOC_FLAT_COMPRESSION;

INIT_LIST_HEAD(&codec->dapm.widgets);
INIT_LIST_HEAD(&codec->dapm.paths);
codec->write = codec_drv->write;
Expand Down

0 comments on commit 3ff6aea

Please sign in to comment.