Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 248279
b: refs/heads/master
c: ea0a591
h: refs/heads/master
i:
  248277: 4ea3a2c
  248275: 6cbd759
  248271: f835492
v: v3
  • Loading branch information
Mark Brown committed Apr 13, 2011
1 parent 083332b commit 4a196d2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ecfb1adf5f037eaff0b678918d84a8febd9f1c3e
refs/heads/master: ea0a591a28b9249ea585f2cf8045e43f57f48fbb
37 changes: 37 additions & 0 deletions trunk/sound/soc/samsung/speyside.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,33 @@

#include "../codecs/wm8915.h"

static int speyside_set_bias_level(struct snd_soc_card *card,
enum snd_soc_bias_level level)
{
struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
int ret;

switch (level) {
case SND_SOC_BIAS_STANDBY:
ret = snd_soc_dai_set_sysclk(codec_dai, WM8915_SYSCLK_MCLK1,
32768, SND_SOC_CLOCK_IN);
if (ret < 0)
return ret;

ret = snd_soc_dai_set_pll(codec_dai, WM8915_FLL_MCLK1,
0, 0, 0);
if (ret < 0) {
pr_err("Failed to stop FLL\n");
return ret;
}

default:
break;
}

return 0;
}

static int speyside_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{
Expand Down Expand Up @@ -51,6 +78,13 @@ static struct snd_soc_ops speyside_ops = {
.hw_params = speyside_hw_params,
};

static int speyside_wm8915_init(struct snd_soc_pcm_runtime *rtd)
{
struct snd_soc_dai *dai = rtd->codec_dai;

return snd_soc_dai_set_sysclk(dai, WM8915_SYSCLK_MCLK1, 32768, 0);
}

static struct snd_soc_dai_link speyside_dai[] = {
{
.name = "CPU",
Expand All @@ -59,6 +93,7 @@ static struct snd_soc_dai_link speyside_dai[] = {
.codec_dai_name = "wm8915-aif1",
.platform_name = "samsung-audio",
.codec_name = "wm8915.1-001a",
.init = speyside_wm8915_init,
.ops = &speyside_ops,
},
};
Expand Down Expand Up @@ -91,6 +126,8 @@ static struct snd_soc_card speyside = {
.dai_link = speyside_dai,
.num_links = ARRAY_SIZE(speyside_dai),

.set_bias_level = speyside_set_bias_level,

.dapm_widgets = widgets,
.num_dapm_widgets = ARRAY_SIZE(widgets),
.dapm_routes = audio_paths,
Expand Down

0 comments on commit 4a196d2

Please sign in to comment.