diff options
Diffstat (limited to 'sound/soc/blackfin/bf5xx-ad1836.c')
-rw-r--r-- | sound/soc/blackfin/bf5xx-ad1836.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/sound/soc/blackfin/bf5xx-ad1836.c b/sound/soc/blackfin/bf5xx-ad1836.c index 0f45a3f56be8..2394bff2b655 100644 --- a/sound/soc/blackfin/bf5xx-ad1836.c +++ b/sound/soc/blackfin/bf5xx-ad1836.c | |||
@@ -40,9 +40,9 @@ static struct snd_soc_card bf5xx_ad1836; | |||
40 | static int bf5xx_ad1836_startup(struct snd_pcm_substream *substream) | 40 | static int bf5xx_ad1836_startup(struct snd_pcm_substream *substream) |
41 | { | 41 | { |
42 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 42 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
43 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 43 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
44 | 44 | ||
45 | cpu_dai->private_data = sport_handle; | 45 | snd_soc_dai_set_drvdata(cpu_dai, sport_handle); |
46 | return 0; | 46 | return 0; |
47 | } | 47 | } |
48 | 48 | ||
@@ -50,8 +50,8 @@ static int bf5xx_ad1836_hw_params(struct snd_pcm_substream *substream, | |||
50 | struct snd_pcm_hw_params *params) | 50 | struct snd_pcm_hw_params *params) |
51 | { | 51 | { |
52 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 52 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
53 | struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; | 53 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
54 | struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; | 54 | struct snd_soc_dai *codec_dai = rtd->codec_dai; |
55 | unsigned int channel_map[] = {0, 4, 1, 5, 2, 6, 3, 7}; | 55 | unsigned int channel_map[] = {0, 4, 1, 5, 2, 6, 3, 7}; |
56 | int ret = 0; | 56 | int ret = 0; |
57 | /* set cpu DAI configuration */ | 57 | /* set cpu DAI configuration */ |
@@ -83,23 +83,19 @@ static struct snd_soc_ops bf5xx_ad1836_ops = { | |||
83 | static struct snd_soc_dai_link bf5xx_ad1836_dai = { | 83 | static struct snd_soc_dai_link bf5xx_ad1836_dai = { |
84 | .name = "ad1836", | 84 | .name = "ad1836", |
85 | .stream_name = "AD1836", | 85 | .stream_name = "AD1836", |
86 | .cpu_dai = &bf5xx_tdm_dai, | 86 | .cpu_dai_name = "bf5xx-tdm", |
87 | .codec_dai = &ad1836_dai, | 87 | .codec_dai_name = "ad1836-hifi", |
88 | .platform_name = "bf5xx-tdm-pcm-audio", | ||
89 | .codec_name = "ad1836-codec.0", | ||
88 | .ops = &bf5xx_ad1836_ops, | 90 | .ops = &bf5xx_ad1836_ops, |
89 | }; | 91 | }; |
90 | 92 | ||
91 | static struct snd_soc_card bf5xx_ad1836 = { | 93 | static struct snd_soc_card bf5xx_ad1836 = { |
92 | .name = "bf5xx_ad1836", | 94 | .name = "bf5xx_ad1836", |
93 | .platform = &bf5xx_tdm_soc_platform, | ||
94 | .dai_link = &bf5xx_ad1836_dai, | 95 | .dai_link = &bf5xx_ad1836_dai, |
95 | .num_links = 1, | 96 | .num_links = 1, |
96 | }; | 97 | }; |
97 | 98 | ||
98 | static struct snd_soc_device bf5xx_ad1836_snd_devdata = { | ||
99 | .card = &bf5xx_ad1836, | ||
100 | .codec_dev = &soc_codec_dev_ad1836, | ||
101 | }; | ||
102 | |||
103 | static struct platform_device *bfxx_ad1836_snd_device; | 99 | static struct platform_device *bfxx_ad1836_snd_device; |
104 | 100 | ||
105 | static int __init bf5xx_ad1836_init(void) | 101 | static int __init bf5xx_ad1836_init(void) |
@@ -110,8 +106,7 @@ static int __init bf5xx_ad1836_init(void) | |||
110 | if (!bfxx_ad1836_snd_device) | 106 | if (!bfxx_ad1836_snd_device) |
111 | return -ENOMEM; | 107 | return -ENOMEM; |
112 | 108 | ||
113 | platform_set_drvdata(bfxx_ad1836_snd_device, &bf5xx_ad1836_snd_devdata); | 109 | platform_set_drvdata(bfxx_ad1836_snd_device, &bf5xx_ad1836); |
114 | bf5xx_ad1836_snd_devdata.dev = &bfxx_ad1836_snd_device->dev; | ||
115 | ret = platform_device_add(bfxx_ad1836_snd_device); | 110 | ret = platform_device_add(bfxx_ad1836_snd_device); |
116 | 111 | ||
117 | if (ret) | 112 | if (ret) |