diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2017-05-23 21:17:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-05-24 13:11:47 -0400 |
commit | 7819a942de7b993771bd9377babc80485fe7606b (patch) | |
tree | ac166e463677e33881d94f2372e935fadfde30ae | |
parent | 1f8754d4daea5f257370a52a30fcb22798c54516 (diff) |
ASoC: rsnd: SSI PIO adjust to 24bit mode
commit 90431eb49bff ("ASoC: rsnd: don't use PDTA bit for 24bit on SSI")
fixups 24bit mode data alignment, but PIO was not cared.
This patch fixes PIO mode 24bit data alignment
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sh/rcar/ssi.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c index c224695c1484..91e5c07911b4 100644 --- a/sound/soc/sh/rcar/ssi.c +++ b/sound/soc/sh/rcar/ssi.c | |||
@@ -550,6 +550,13 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod, | |||
550 | struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); | 550 | struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io); |
551 | u32 *buf = (u32 *)(runtime->dma_area + | 551 | u32 *buf = (u32 *)(runtime->dma_area + |
552 | rsnd_dai_pointer_offset(io, 0)); | 552 | rsnd_dai_pointer_offset(io, 0)); |
553 | int shift = 0; | ||
554 | |||
555 | switch (runtime->sample_bits) { | ||
556 | case 32: | ||
557 | shift = 8; | ||
558 | break; | ||
559 | } | ||
553 | 560 | ||
554 | /* | 561 | /* |
555 | * 8/16/32 data can be assesse to TDR/RDR register | 562 | * 8/16/32 data can be assesse to TDR/RDR register |
@@ -557,9 +564,9 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod, | |||
557 | * see rsnd_ssi_init() | 564 | * see rsnd_ssi_init() |
558 | */ | 565 | */ |
559 | if (rsnd_io_is_play(io)) | 566 | if (rsnd_io_is_play(io)) |
560 | rsnd_mod_write(mod, SSITDR, *buf); | 567 | rsnd_mod_write(mod, SSITDR, (*buf) << shift); |
561 | else | 568 | else |
562 | *buf = rsnd_mod_read(mod, SSIRDR); | 569 | *buf = (rsnd_mod_read(mod, SSIRDR) >> shift); |
563 | 570 | ||
564 | elapsed = rsnd_dai_pointer_update(io, sizeof(*buf)); | 571 | elapsed = rsnd_dai_pointer_update(io, sizeof(*buf)); |
565 | } | 572 | } |