diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 |
commit | 4de3a8e101150feaefa1139611a50ff37467f33e (patch) | |
tree | daada742542518b02d7db7c5d32e715eaa5f166d /sound/soc/kirkwood/kirkwood-t5325.c | |
parent | 294064f58953f9964e5945424b09c51800330a83 (diff) | |
parent | 099469502f62fbe0d7e4f0b83a2f22538367f734 (diff) | |
download | blackbird-op-linux-4de3a8e101150feaefa1139611a50ff37467f33e.tar.gz blackbird-op-linux-4de3a8e101150feaefa1139611a50ff37467f33e.zip |
Merge branch 'master' into fixes
Diffstat (limited to 'sound/soc/kirkwood/kirkwood-t5325.c')
-rw-r--r-- | sound/soc/kirkwood/kirkwood-t5325.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/sound/soc/kirkwood/kirkwood-t5325.c b/sound/soc/kirkwood/kirkwood-t5325.c index c772b3cf4039..b47cc4e9b746 100644 --- a/sound/soc/kirkwood/kirkwood-t5325.c +++ b/sound/soc/kirkwood/kirkwood-t5325.c @@ -25,18 +25,7 @@ static int t5325_hw_params(struct snd_pcm_substream *substream, { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *codec_dai = rtd->codec_dai; - struct snd_soc_dai *cpu_dai = rtd->cpu_dai; - int ret; - unsigned int freq, fmt; - - fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS; - ret = snd_soc_dai_set_fmt(cpu_dai, fmt); - if (ret < 0) - return ret; - - ret = snd_soc_dai_set_fmt(codec_dai, fmt); - if (ret < 0) - return ret; + unsigned int freq; freq = params_rate(params) * 256; @@ -70,11 +59,6 @@ static int t5325_dai_init(struct snd_soc_pcm_runtime *rtd) struct snd_soc_codec *codec = rtd->codec; struct snd_soc_dapm_context *dapm = &codec->dapm; - snd_soc_dapm_new_controls(dapm, t5325_dapm_widgets, - ARRAY_SIZE(t5325_dapm_widgets)); - - snd_soc_dapm_add_routes(dapm, t5325_route, ARRAY_SIZE(t5325_route)); - snd_soc_dapm_enable_pin(dapm, "Mic Jack"); snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); snd_soc_dapm_enable_pin(dapm, "Speaker"); @@ -90,6 +74,7 @@ static struct snd_soc_dai_link t5325_dai[] = { .platform_name = "kirkwood-pcm-audio", .codec_dai_name = "alc5621-hifi", .codec_name = "alc562x-codec.0-001a", + .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, .ops = &t5325_ops, .init = t5325_dai_init, }, @@ -98,8 +83,14 @@ static struct snd_soc_dai_link t5325_dai[] = { static struct snd_soc_card t5325 = { .name = "t5325", + .owner = THIS_MODULE, .dai_link = t5325_dai, .num_links = ARRAY_SIZE(t5325_dai), + + .dapm_widgets = t5325_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(t5325_dapm_widgets), + .dapm_routes = t5325_route, + .num_dapm_routes = ARRAY_SIZE(t5325_route), }; static struct platform_device *t5325_snd_device; |