diff options
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 b0ccd0b862fc..ed29c9e1ed4e 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; |
@@ -162,7 +162,7 @@ static int siu_pcm_wr_set(struct siu_port *port_info, | |||
162 | static int siu_pcm_rd_set(struct siu_port *port_info, | 162 | static int siu_pcm_rd_set(struct siu_port *port_info, |
163 | dma_addr_t buff, size_t size) | 163 | dma_addr_t buff, size_t size) |
164 | { | 164 | { |
165 | struct siu_info *info = siu_i2s_dai.private_data; | 165 | struct siu_info *info = siu_i2s_data; |
166 | u32 __iomem *base = info->reg; | 166 | u32 __iomem *base = info->reg; |
167 | struct siu_stream *siu_stream = &port_info->capture; | 167 | struct siu_stream *siu_stream = &port_info->capture; |
168 | struct snd_pcm_substream *substream = siu_stream->substream; | 168 | struct snd_pcm_substream *substream = siu_stream->substream; |
@@ -272,7 +272,7 @@ static int siu_pcm_stmread_start(struct siu_port *port_info) | |||
272 | 272 | ||
273 | static int siu_pcm_stmread_stop(struct siu_port *port_info) | 273 | static int siu_pcm_stmread_stop(struct siu_port *port_info) |
274 | { | 274 | { |
275 | struct siu_info *info = siu_i2s_dai.private_data; | 275 | struct siu_info *info = siu_i2s_data; |
276 | u32 __iomem *base = info->reg; | 276 | u32 __iomem *base = info->reg; |
277 | struct siu_stream *siu_stream = &port_info->capture; | 277 | struct siu_stream *siu_stream = &port_info->capture; |
278 | struct device *dev = siu_stream->substream->pcm->card->dev; | 278 | struct device *dev = siu_stream->substream->pcm->card->dev; |
@@ -296,7 +296,7 @@ static int siu_pcm_stmread_stop(struct siu_port *port_info) | |||
296 | static int siu_pcm_hw_params(struct snd_pcm_substream *ss, | 296 | static int siu_pcm_hw_params(struct snd_pcm_substream *ss, |
297 | struct snd_pcm_hw_params *hw_params) | 297 | struct snd_pcm_hw_params *hw_params) |
298 | { | 298 | { |
299 | struct siu_info *info = siu_i2s_dai.private_data; | 299 | struct siu_info *info = siu_i2s_data; |
300 | struct device *dev = ss->pcm->card->dev; | 300 | struct device *dev = ss->pcm->card->dev; |
301 | int ret; | 301 | int ret; |
302 | 302 | ||
@@ -311,7 +311,7 @@ static int siu_pcm_hw_params(struct snd_pcm_substream *ss, | |||
311 | 311 | ||
312 | static int siu_pcm_hw_free(struct snd_pcm_substream *ss) | 312 | static int siu_pcm_hw_free(struct snd_pcm_substream *ss) |
313 | { | 313 | { |
314 | struct siu_info *info = siu_i2s_dai.private_data; | 314 | struct siu_info *info = siu_i2s_data; |
315 | struct siu_port *port_info = siu_port_info(ss); | 315 | struct siu_port *port_info = siu_port_info(ss); |
316 | struct device *dev = ss->pcm->card->dev; | 316 | struct device *dev = ss->pcm->card->dev; |
317 | struct siu_stream *siu_stream; | 317 | struct siu_stream *siu_stream; |
@@ -342,11 +342,12 @@ static bool filter(struct dma_chan *chan, void *slave) | |||
342 | static int siu_pcm_open(struct snd_pcm_substream *ss) | 342 | static int siu_pcm_open(struct snd_pcm_substream *ss) |
343 | { | 343 | { |
344 | /* Playback / Capture */ | 344 | /* Playback / Capture */ |
345 | struct siu_info *info = siu_i2s_dai.private_data; | 345 | struct snd_soc_pcm_runtime *rtd = ss->private_data; |
346 | struct siu_platform *pdata = rtd->platform->dev->platform_data; | ||
347 | struct siu_info *info = siu_i2s_data; | ||
346 | struct siu_port *port_info = siu_port_info(ss); | 348 | struct siu_port *port_info = siu_port_info(ss); |
347 | struct siu_stream *siu_stream; | 349 | struct siu_stream *siu_stream; |
348 | u32 port = info->port_id; | 350 | u32 port = info->port_id; |
349 | struct siu_platform *pdata = siu_i2s_dai.dev->platform_data; | ||
350 | struct device *dev = ss->pcm->card->dev; | 351 | struct device *dev = ss->pcm->card->dev; |
351 | dma_cap_mask_t mask; | 352 | dma_cap_mask_t mask; |
352 | struct sh_dmae_slave *param; | 353 | struct sh_dmae_slave *param; |
@@ -383,7 +384,7 @@ static int siu_pcm_open(struct snd_pcm_substream *ss) | |||
383 | 384 | ||
384 | static int siu_pcm_close(struct snd_pcm_substream *ss) | 385 | static int siu_pcm_close(struct snd_pcm_substream *ss) |
385 | { | 386 | { |
386 | struct siu_info *info = siu_i2s_dai.private_data; | 387 | struct siu_info *info = siu_i2s_data; |
387 | struct device *dev = ss->pcm->card->dev; | 388 | struct device *dev = ss->pcm->card->dev; |
388 | struct siu_port *port_info = siu_port_info(ss); | 389 | struct siu_port *port_info = siu_port_info(ss); |
389 | struct siu_stream *siu_stream; | 390 | struct siu_stream *siu_stream; |
@@ -405,7 +406,7 @@ static int siu_pcm_close(struct snd_pcm_substream *ss) | |||
405 | 406 | ||
406 | static int siu_pcm_prepare(struct snd_pcm_substream *ss) | 407 | static int siu_pcm_prepare(struct snd_pcm_substream *ss) |
407 | { | 408 | { |
408 | struct siu_info *info = siu_i2s_dai.private_data; | 409 | struct siu_info *info = siu_i2s_data; |
409 | struct siu_port *port_info = siu_port_info(ss); | 410 | struct siu_port *port_info = siu_port_info(ss); |
410 | struct device *dev = ss->pcm->card->dev; | 411 | struct device *dev = ss->pcm->card->dev; |
411 | struct snd_pcm_runtime *rt = ss->runtime; | 412 | struct snd_pcm_runtime *rt = ss->runtime; |
@@ -451,7 +452,7 @@ static int siu_pcm_prepare(struct snd_pcm_substream *ss) | |||
451 | 452 | ||
452 | static int siu_pcm_trigger(struct snd_pcm_substream *ss, int cmd) | 453 | static int siu_pcm_trigger(struct snd_pcm_substream *ss, int cmd) |
453 | { | 454 | { |
454 | struct siu_info *info = siu_i2s_dai.private_data; | 455 | struct siu_info *info = siu_i2s_data; |
455 | struct device *dev = ss->pcm->card->dev; | 456 | struct device *dev = ss->pcm->card->dev; |
456 | struct siu_port *port_info = siu_port_info(ss); | 457 | struct siu_port *port_info = siu_port_info(ss); |
457 | int ret; | 458 | int ret; |
@@ -494,7 +495,7 @@ static int siu_pcm_trigger(struct snd_pcm_substream *ss, int cmd) | |||
494 | static snd_pcm_uframes_t siu_pcm_pointer_dma(struct snd_pcm_substream *ss) | 495 | static snd_pcm_uframes_t siu_pcm_pointer_dma(struct snd_pcm_substream *ss) |
495 | { | 496 | { |
496 | struct device *dev = ss->pcm->card->dev; | 497 | struct device *dev = ss->pcm->card->dev; |
497 | struct siu_info *info = siu_i2s_dai.private_data; | 498 | struct siu_info *info = siu_i2s_data; |
498 | u32 __iomem *base = info->reg; | 499 | u32 __iomem *base = info->reg; |
499 | struct siu_port *port_info = siu_port_info(ss); | 500 | struct siu_port *port_info = siu_port_info(ss); |
500 | struct snd_pcm_runtime *rt = ss->runtime; | 501 | struct snd_pcm_runtime *rt = ss->runtime; |
@@ -530,7 +531,7 @@ static int siu_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, | |||
530 | struct snd_pcm *pcm) | 531 | struct snd_pcm *pcm) |
531 | { | 532 | { |
532 | /* card->dev == socdev->dev, see snd_soc_new_pcms() */ | 533 | /* card->dev == socdev->dev, see snd_soc_new_pcms() */ |
533 | struct siu_info *info = siu_i2s_dai.private_data; | 534 | struct siu_info *info = siu_i2s_data; |
534 | struct platform_device *pdev = to_platform_device(card->dev); | 535 | struct platform_device *pdev = to_platform_device(card->dev); |
535 | int ret; | 536 | int ret; |
536 | int i; | 537 | int i; |
@@ -607,9 +608,8 @@ static struct snd_pcm_ops siu_pcm_ops = { | |||
607 | .pointer = siu_pcm_pointer_dma, | 608 | .pointer = siu_pcm_pointer_dma, |
608 | }; | 609 | }; |
609 | 610 | ||
610 | struct snd_soc_platform siu_platform = { | 611 | struct snd_soc_platform_driver siu_platform = { |
611 | .name = "siu-audio", | 612 | .ops = &siu_pcm_ops, |
612 | .pcm_ops = &siu_pcm_ops, | ||
613 | .pcm_new = siu_pcm_new, | 613 | .pcm_new = siu_pcm_new, |
614 | .pcm_free = siu_pcm_free, | 614 | .pcm_free = siu_pcm_free, |
615 | }; | 615 | }; |