diff options
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/codecs/ac97.c | 15 | ||||
-rw-r--r-- | sound/soc/codecs/wm8994.c | 2 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 3 |
3 files changed, 12 insertions, 8 deletions
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c index a1bbe16b7f96..bcfa53271673 100644 --- a/sound/soc/codecs/ac97.c +++ b/sound/soc/codecs/ac97.c | |||
@@ -80,9 +80,11 @@ static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, | |||
80 | static int ac97_soc_probe(struct platform_device *pdev) | 80 | static int ac97_soc_probe(struct platform_device *pdev) |
81 | { | 81 | { |
82 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); | 82 | struct snd_soc_device *socdev = platform_get_drvdata(pdev); |
83 | struct snd_soc_card *card = socdev->card; | ||
83 | struct snd_soc_codec *codec; | 84 | struct snd_soc_codec *codec; |
84 | struct snd_ac97_bus *ac97_bus; | 85 | struct snd_ac97_bus *ac97_bus; |
85 | struct snd_ac97_template ac97_template; | 86 | struct snd_ac97_template ac97_template; |
87 | int i; | ||
86 | int ret = 0; | 88 | int ret = 0; |
87 | 89 | ||
88 | printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION); | 90 | printk(KERN_INFO "AC97 SoC Audio Codec %s\n", AC97_VERSION); |
@@ -102,12 +104,6 @@ static int ac97_soc_probe(struct platform_device *pdev) | |||
102 | INIT_LIST_HEAD(&codec->dapm_widgets); | 104 | INIT_LIST_HEAD(&codec->dapm_widgets); |
103 | INIT_LIST_HEAD(&codec->dapm_paths); | 105 | INIT_LIST_HEAD(&codec->dapm_paths); |
104 | 106 | ||
105 | ret = snd_soc_new_ac97_codec(codec, &soc_ac97_ops, 0); | ||
106 | if (ret < 0) { | ||
107 | printk(KERN_ERR "ASoC: failed to init gen ac97 glue\n"); | ||
108 | goto err; | ||
109 | } | ||
110 | |||
111 | /* register pcms */ | 107 | /* register pcms */ |
112 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); | 108 | ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); |
113 | if (ret < 0) | 109 | if (ret < 0) |
@@ -123,6 +119,13 @@ static int ac97_soc_probe(struct platform_device *pdev) | |||
123 | if (ret < 0) | 119 | if (ret < 0) |
124 | goto bus_err; | 120 | goto bus_err; |
125 | 121 | ||
122 | for (i = 0; i < card->num_links; i++) { | ||
123 | if (card->dai_link[i].codec_dai->ac97_control) { | ||
124 | snd_ac97_dev_add_pdata(codec->ac97, | ||
125 | card->dai_link[i].cpu_dai->ac97_pdata); | ||
126 | } | ||
127 | } | ||
128 | |||
126 | return 0; | 129 | return 0; |
127 | 130 | ||
128 | bus_err: | 131 | bus_err: |
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index d01d3091fe81..bdda0936a404 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c | |||
@@ -3438,7 +3438,7 @@ struct snd_soc_dai wm8994_dai[] = { | |||
3438 | .rates = WM8994_RATES, | 3438 | .rates = WM8994_RATES, |
3439 | .formats = WM8994_FORMATS, | 3439 | .formats = WM8994_FORMATS, |
3440 | }, | 3440 | }, |
3441 | .playback = { | 3441 | .capture = { |
3442 | .stream_name = "AIF3 Capture", | 3442 | .stream_name = "AIF3 Capture", |
3443 | .channels_min = 2, | 3443 | .channels_min = 2, |
3444 | .channels_max = 2, | 3444 | .channels_max = 2, |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1ff553bbc063..d59076e2ca84 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1597,7 +1597,8 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid) | |||
1597 | mutex_unlock(&codec->mutex); | 1597 | mutex_unlock(&codec->mutex); |
1598 | return ret; | 1598 | return ret; |
1599 | } | 1599 | } |
1600 | if (card->dai_link[i].codec_dai->ac97_control) { | 1600 | /* Check for codec->ac97 to handle the ac97.c fun */ |
1601 | if (card->dai_link[i].codec_dai->ac97_control && codec->ac97) { | ||
1601 | snd_ac97_dev_add_pdata(codec->ac97, | 1602 | snd_ac97_dev_add_pdata(codec->ac97, |
1602 | card->dai_link[i].cpu_dai->ac97_pdata); | 1603 | card->dai_link[i].cpu_dai->ac97_pdata); |
1603 | } | 1604 | } |