diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-10-25 04:00:30 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-10-25 04:00:30 -0400 |
commit | aa5c14d5c0d3e4c587db4a1b220b9c86415c538f (patch) | |
tree | 0114637e8be2b38176e7e91e6cea3501b22cb66a /sound/soc/sh/siu_pcm.c | |
parent | 79fc84c7e0d2fe89c4e82f3a26fd8b0d13c31703 (diff) | |
parent | b11bdb5254ff17cb63e4ae5088b73fdcd2cc2602 (diff) |
Merge branch 'topic/asoc' into for-linus
Conflicts:
arch/powerpc/platforms/85xx/p1022_ds.c
Diffstat (limited to 'sound/soc/sh/siu_pcm.c')
-rw-r--r-- | sound/soc/sh/siu_pcm.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c index 36170be15aa7..d6c79fa56d12 100644 --- a/sound/soc/sh/siu_pcm.c +++ b/sound/soc/sh/siu_pcm.c | |||
@@ -48,7 +48,7 @@ struct siu_port *siu_ports[SIU_PORT_NUM]; | |||
48 | /* transfersize is number of u32 dma transfers per period */ | 48 | /* transfersize is number of u32 dma transfers per period */ |
49 | static int siu_pcm_stmwrite_stop(struct siu_port *port_info) | 49 | static int siu_pcm_stmwrite_stop(struct siu_port *port_info) |
50 | { | 50 | { |
51 | struct siu_info *info = siu_i2s_dai.private_data; | 51 | struct siu_info *info = siu_i2s_data; |
52 | u32 __iomem *base = info->reg; | 52 | u32 __iomem *base = info->reg; |
53 | struct siu_stream *siu_stream = &port_info->playback; | 53 | struct siu_stream *siu_stream = &port_info->playback; |
54 | u32 stfifo; | 54 | u32 stfifo; |
@@ -114,7 +114,7 @@ static void siu_dma_tx_complete(void *arg) | |||
114 | static int siu_pcm_wr_set(struct siu_port *port_info, | 114 | static int siu_pcm_wr_set(struct siu_port *port_info, |
115 | dma_addr_t buff, u32 size) | 115 | dma_addr_t buff, u32 size) |
116 | { | 116 | { |
117 | struct siu_info *info = siu_i2s_dai.private_data; | 117 | struct siu_info *info = siu_i2s_data; |
118 | u32 __iomem *base = info->reg; | 118 | u32 __iomem *base = info->reg; |
119 | struct siu_stream *siu_stream = &port_info->playback; | 119 | struct siu_stream *siu_stream = &port_info->playback; |
120 | struct snd_pcm_substream *substream = siu_stream->substream; | 120 | struct snd_pcm_substream *substream = siu_stream->substream; |
@@ -161,7 +161,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info, | |||
161 | static int siu_pcm_rd_set(struct siu_port *port_info, | 161 | static int siu_pcm_rd_set(struct siu_port *port_info, |
162 | dma_addr_t buff, size_t size) | 162 | dma_addr_t buff, size_t size) |
163 | { | 163 | { |
164 | struct siu_info *info = siu_i2s_dai.private_data; | 164 | struct siu_info *info = siu_i2s_data; |
165 | u32 __iomem *base = info->reg; | 165 | u32 __iomem *base = info->reg; |
166 | struct siu_stream *siu_stream = &port_info->capture; | 166 | struct siu_stream *siu_stream = &port_info->capture; |
167 | struct snd_pcm_substream *substream = siu_stream->substream; | 167 | struct snd_pcm_substream *substream = siu_stream->substream; |
@@ -270,7 +270,7 @@ static int siu_pcm_stmread_start(struct siu_port *port_info) | |||
270 | 270 | ||
271 | static int siu_pcm_stmread_stop(struct siu_port *port_info) | 271 | static int siu_pcm_stmread_stop(struct siu_port *port_info) |
272 | { | 272 | { |
273 | struct siu_info *info = siu_i2s_dai.private_data; | 273 | struct siu_info *info = siu_i2s_data; |
274 | u32 __iomem *base = info->reg; | 274 | u32 __iomem *base = info->reg; |
275 | struct siu_stream *siu_stream = &port_info->capture; | 275 | struct siu_stream *siu_stream = &port_info->capture; |
276 | struct device *dev = siu_stream->substream->pcm->card->dev; | 276 | struct device *dev = siu_stream->substream->pcm->card->dev; |
@@ -294,7 +294,7 @@ static int siu_pcm_stmread_stop(struct siu_port *port_info) | |||
294 | static int siu_pcm_hw_params(struct snd_pcm_substream *ss, | 294 | static int siu_pcm_hw_params(struct snd_pcm_substream *ss, |
295 | struct snd_pcm_hw_params *hw_params) | 295 | struct snd_pcm_hw_params *hw_params) |
296 | { | 296 | { |
297 | struct siu_info *info = siu_i2s_dai.private_data; | 297 | struct siu_info *info = siu_i2s_data; |
298 | struct device *dev = ss->pcm->card->dev; | 298 | struct device *dev = ss->pcm->card->dev; |
299 | int ret; | 299 | int ret; |
300 | 300 | ||
@@ -309,7 +309,7 @@ static int siu_pcm_hw_params(struct snd_pcm_substream *ss, | |||
309 | 309 | ||
310 | static int siu_pcm_hw_free(struct snd_pcm_substream *ss) | 310 | static int siu_pcm_hw_free(struct snd_pcm_substream *ss) |
311 | { | 311 | { |
312 | struct siu_info *info = siu_i2s_dai.private_data; | 312 | struct siu_info *info = siu_i2s_data; |
313 | struct siu_port *port_info = siu_port_info(ss); | 313 | struct siu_port *port_info = siu_port_info(ss); |
314 | struct device *dev = ss->pcm->card->dev; | 314 | struct device *dev = ss->pcm->card->dev; |
315 | struct siu_stream *siu_stream; | 315 | struct siu_stream *siu_stream; |
@@ -340,11 +340,12 @@ static bool filter(struct dma_chan *chan, void *slave) | |||
340 | static int siu_pcm_open(struct snd_pcm_substream *ss) | 340 | static int siu_pcm_open(struct snd_pcm_substream *ss) |
341 | { | 341 | { |
342 | /* Playback / Capture */ | 342 | /* Playback / Capture */ |
343 | struct siu_info *info = siu_i2s_dai.private_data; | 343 | struct snd_soc_pcm_runtime *rtd = ss->private_data; |
344 | struct siu_platform *pdata = rtd->platform->dev->platform_data; | ||
345 | struct siu_info *info = siu_i2s_data; | ||
344 | struct siu_port *port_info = siu_port_info(ss); | 346 | struct siu_port *port_info = siu_port_info(ss); |
345 | struct siu_stream *siu_stream; | 347 | struct siu_stream *siu_stream; |
346 | u32 port = info->port_id; | 348 | u32 port = info->port_id; |
347 | struct siu_platform *pdata = siu_i2s_dai.dev->platform_data; | ||
348 | struct device *dev = ss->pcm->card->dev; | 349 | struct device *dev = ss->pcm->card->dev; |
349 | dma_cap_mask_t mask; | 350 | dma_cap_mask_t mask; |
350 | struct sh_dmae_slave *param; | 351 | struct sh_dmae_slave *param; |
@@ -381,7 +382,7 @@ static int siu_pcm_open(struct snd_pcm_substream *ss) | |||
381 | 382 | ||
382 | static int siu_pcm_close(struct snd_pcm_substream *ss) | 383 | static int siu_pcm_close(struct snd_pcm_substream *ss) |
383 | { | 384 | { |
384 | struct siu_info *info = siu_i2s_dai.private_data; | 385 | struct siu_info *info = siu_i2s_data; |
385 | struct device *dev = ss->pcm->card->dev; | 386 | struct device *dev = ss->pcm->card->dev; |
386 | struct siu_port *port_info = siu_port_info(ss); | 387 | struct siu_port *port_info = siu_port_info(ss); |
387 | struct siu_stream *siu_stream; | 388 | struct siu_stream *siu_stream; |
@@ -403,7 +404,7 @@ static int siu_pcm_close(struct snd_pcm_substream *ss) | |||
403 | 404 | ||
404 | static int siu_pcm_prepare(struct snd_pcm_substream *ss) | 405 | static int siu_pcm_prepare(struct snd_pcm_substream *ss) |
405 | { | 406 | { |
406 | struct siu_info *info = siu_i2s_dai.private_data; | 407 | struct siu_info *info = siu_i2s_data; |
407 | struct siu_port *port_info = siu_port_info(ss); | 408 | struct siu_port *port_info = siu_port_info(ss); |
408 | struct device *dev = ss->pcm->card->dev; | 409 | struct device *dev = ss->pcm->card->dev; |
409 | struct snd_pcm_runtime *rt = ss->runtime; | 410 | struct snd_pcm_runtime *rt = ss->runtime; |
@@ -449,7 +450,7 @@ static int siu_pcm_prepare(struct snd_pcm_substream *ss) | |||
449 | 450 | ||
450 | static int siu_pcm_trigger(struct snd_pcm_substream *ss, int cmd) | 451 | static int siu_pcm_trigger(struct snd_pcm_substream *ss, int cmd) |
451 | { | 452 | { |
452 | struct siu_info *info = siu_i2s_dai.private_data; | 453 | struct siu_info *info = siu_i2s_data; |
453 | struct device *dev = ss->pcm->card->dev; | 454 | struct device *dev = ss->pcm->card->dev; |
454 | struct siu_port *port_info = siu_port_info(ss); | 455 | struct siu_port *port_info = siu_port_info(ss); |
455 | int ret; | 456 | int ret; |
@@ -492,7 +493,7 @@ static int siu_pcm_trigger(struct snd_pcm_substream *ss, int cmd) | |||
492 | static snd_pcm_uframes_t siu_pcm_pointer_dma(struct snd_pcm_substream *ss) | 493 | static snd_pcm_uframes_t siu_pcm_pointer_dma(struct snd_pcm_substream *ss) |
493 | { | 494 | { |
494 | struct device *dev = ss->pcm->card->dev; | 495 | struct device *dev = ss->pcm->card->dev; |
495 | struct siu_info *info = siu_i2s_dai.private_data; | 496 | struct siu_info *info = siu_i2s_data; |
496 | u32 __iomem *base = info->reg; | 497 | u32 __iomem *base = info->reg; |
497 | struct siu_port *port_info = siu_port_info(ss); | 498 | struct siu_port *port_info = siu_port_info(ss); |
498 | struct snd_pcm_runtime *rt = ss->runtime; | 499 | struct snd_pcm_runtime *rt = ss->runtime; |
@@ -528,7 +529,7 @@ static int siu_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, | |||
528 | struct snd_pcm *pcm) | 529 | struct snd_pcm *pcm) |
529 | { | 530 | { |
530 | /* card->dev == socdev->dev, see snd_soc_new_pcms() */ | 531 | /* card->dev == socdev->dev, see snd_soc_new_pcms() */ |
531 | struct siu_info *info = siu_i2s_dai.private_data; | 532 | struct siu_info *info = siu_i2s_data; |
532 | struct platform_device *pdev = to_platform_device(card->dev); | 533 | struct platform_device *pdev = to_platform_device(card->dev); |
533 | int ret; | 534 | int ret; |
534 | int i; | 535 | int i; |
@@ -605,9 +606,8 @@ static struct snd_pcm_ops siu_pcm_ops = { | |||
605 | .pointer = siu_pcm_pointer_dma, | 606 | .pointer = siu_pcm_pointer_dma, |
606 | }; | 607 | }; |
607 | 608 | ||
608 | struct snd_soc_platform siu_platform = { | 609 | struct snd_soc_platform_driver siu_platform = { |
609 | .name = "siu-audio", | 610 | .ops = &siu_pcm_ops, |
610 | .pcm_ops = &siu_pcm_ops, | ||
611 | .pcm_new = siu_pcm_new, | 611 | .pcm_new = siu_pcm_new, |
612 | .pcm_free = siu_pcm_free, | 612 | .pcm_free = siu_pcm_free, |
613 | }; | 613 | }; |