1
0
Fork 0
Commit Graph

737 Commits (09ccbb74b6718ad4d1290de3f5669212c0ac7d4b)

Author SHA1 Message Date
Kuninori Morimoto 348d592c71 ASoC: rsnd: remove platform boot support from gen.c
No board is using Renesas sound driver via platform boot now.
This means all user is using DT boot. Platform boot support is
no longer needed. But, it strongly depends on platform boot style.
This patch removes platform boot support from gen.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto 9eaa1a6f7e ASoC: rsnd: remove platform boot support from dvc.c
No board is using Renesas sound driver via platform boot now.
This means all user is using DT boot. Platform boot support is
no longer needed. But, it strongly depends on platform boot style.
This patch removes platform boot support from dvc.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto c7fe4be840 ASoC: rsnd: remove platform boot support from mix.c
No board is using Renesas sound driver via platform boot now.
This means all user is using DT boot. Platform boot support is
no longer needed. But, it strongly depends on platform boot style.
This patch removes platform boot support from mix.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto cfe7c0390a ASoC: rsnd: remove platform boot support from ctu.c
No board is using Renesas sound driver via platform boot now.
This means all user is using DT boot. Platform boot support is
no longer needed. But, it strongly depends on platform boot style.
This patch removes platform boot support from ctu.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto adf6a68159 ASoC: rsnd: remove platform boot support from src.c
No board is using Renesas sound driver via platform boot now.
This means all user is using DT boot. Platform boot support is
no longer needed. But, it strongly depends on platform boot style.
This patch removes platform boot support from src.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto 02534f2f80 ASoC: rsnd: remove platform boot support from ssi.c
No board is using Renesas sound driver via platform boot now.
This means all user is using DT boot. Platform boot support is
no longer needed. But, it strongly depends on platform boot style.
This patch removes platform boot support from ssi.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto 94e2710cd2 ASoC: rsnd: remove platform boot support from core.c
No board is using Renesas sound driver via platform boot now.
This means all user is using DT boot. Platform boot support is
no longer needed. But, it strongly depends on platform boot style.
This patch removes platform boot support from core.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto 75916f6524 ASoC: rsnd: SRC settings matches to datasheet
Current SRC settings order was rough. Now, Gen1 support was removed.
This patch makes it cleanup and match to datasheet.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto d444080ef8 ASoC: rsnd: cleanup RSND_REG_xxx
SRC Gen1 support was removed. Current rsnd driver is sharing Gen1/Gen2
register index to reduce memory, but there is no effect anymore.
Let's remove share definition and merge RSND_REG_xxx

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto e8e7b7bdc6 ASoC: rsnd: remove Gen1 support from SRC
This patch removes SRC Gen1 support which has no user on upstream.
Historically, SRC Gen1 was created as prepare for SRC Gen2 support.
It works well for Gen2 support, but Gen1 is not same as Gen2.
So now, Gen1 support is no longer needed. Thanks Gen1 and Bye-bye.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-18 18:08:16 +00:00
Kuninori Morimoto f46a93b820 ASoC: rsnd: ssi: 24bit data needs right-aligned settings
Data left/right aligned is controlled by PDTA bit on SSICR.
But default is left-aligned. Thus 24bit sound will be very small sound
without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-17 11:43:46 +00:00
Kuninori Morimoto 85d4a62140 ASoC: rsnd: SND_SOC_RCAR doesn't depend on DMA_OF
8616774("ASoC: rnsd: fix build regression without CONFIG_OF")
added "depends on DMA_OF" in SND_SOC_RCAR to avoid compile error of

    sound/built-in.o: In function `rsnd_dma_request_channel':
    :(.text+0x9fb84): undefined reference to `of_dma_request_slave_channel'

But, it was OF base DMAEngine API definition issue, not SND_SOC_RCAR
issue. This patch remove DMA_OF dependence.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 17:45:31 +00:00
Kuninori Morimoto 68a550248e ASoC: rsnd: call clk_prepare()/clk_enable() for AUDIO_CLKx
ADG can output AUDIO_CLKOUTx, and these are generated from
AUDIO_CLKx. Thus we need to call clk_prepare()/clk_enable()
for AUDIO_CLKx.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 81ad174db5 ASoC: rsnd: tidyup comment position of rsnd_mod_xxx
f1df12290("ASoC: rsnd: add common mod confirm method")
added rsnd_mod_make_sure(), but rsnd_mod_xxx() comment position
was wrong. This patch tidyup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 13e0d17d08 ASoC: rsnd: MIX settings matches to datasheet
Current MIX settings order was rough.
This patch makes it match to datasheet.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto ca16cc6159 ASoC: rsnd: DVC settings matches to datasheet
Current DVC settings order was rough.
This patch makes it match to datasheet.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto dcc5a7b3b0 ASoC: rsnd: move CMD related operation to cmd.c
8cca6e11c1 ("ASoC: rsnd: use mod base common method on CMD")
added cmd.c. Let's move CMD related operation to cmd.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Geert Uytterhoeven 8b27418f30 ASoC: rsnd: Add missing initialization of ADG req_rate
If the "clock-frequency" DT property is not found, req_rate is used
uninitialized, and the "audio_clkout" clock will be created with an
arbitrary clock rate.

This uninitialized kernel stack data may leak to userspace through
/sys/kernel/debug/clk/clk_summary, cfr. the value in the "rate" column:

       clock     enable_cnt  prepare_cnt        rate   accuracy   phase
    --------------------------------------------------------------------
     audio_clkout         0            0  4001836240          0 0

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 9c66eedc17 ASoC: rsnd: fixup rsnd_dmapp_stop() return value
45a4394d03("ASoC: rsnd: use mod base common method on DMA phase3")
Exchanged "void rsnd_dmapp_stop()" to "int rsnd_dmapp_stop()",
but it returns inverted value. This patch fixup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto f36a82264d ASoC: rsnd: call rsnd_src_quit() from rsnd_src_quit_gen2()
2d604e03("ASoC: rsnd: disable SRC.out only when stop timing")
added rsnd_src_quit_gen2(), but it should call rsnd_src_quit()
same as before. This patch fixup it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto e7d850dd10 ASoC: rsnd: use mod base common method on SSI-parent
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

This patch makes SSI parent mod base common method

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto c7f69ab536 ASoC: rsnd: use mod base common method on SSIU
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

This patch makes SSIU mod base common method

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 1b2ca0adf1 ASoC: rsnd: use mod base common method on CMD
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

This patch makes CMD mod base common method

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 497debaa80 ASoC: rsnd: use mod base common method on DMA phase3
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

This patch makes DMA mod bse common method

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 76c80b5b3f ASoC: rsnd: use mod base common method on DMA phase2
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

DMA will be implemented as module. Then rsnd_dma_ops will be rebased
to rsnd_mod_ops, but these are similar, but different function.
This patch modify rsnd_dma_ops same style as rsnd_mod_ops.
This is prepare for final merge

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 940e947926 ASoC: rsnd: use mod base common method on DMA phase1
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

DMA will be implemented as module. Then rsnd_dma will be mod base.
This patch makes rsnd_dma mod base, but still not yet completely
finished. This mod is not yet installed to system at this point.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto e10369d88c ASoC: rsnd: use common rsnd_ssi_status_xxx()
Current ssi.c driver has random access to SSISR register. Let's use
common rsnd_ssi_status_xxx() function

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 2daf71ad8d ASoC: rsnd: avoid pointless loop in rsnd_mod_interrupt()
Current Renesas sound driver doesn't have 1:1 relationship between
stream <-> mod because it is supporting MIX. Because of this reason
rsnd_mod_interrupt() is searching correspond mod by for loop.
But this loop is not needed, because each mod has own type.
This patch avoid pointless loop by using mod->type.

This patch is good for SSI-parent support, because stream might have
2 SSI as SSI-parent/child. SSI interrupt handler will be called twice
if stream has SSI-parent without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 69e32a58bd ASoC: rsnd: Don't stop HW even if a large number of errors occur
Current SSI/SRC restarts HW if under/over flow happened to avoid L/R
invert issue. But it will stop HW if too many error happen.
But if it stops on HW, other side under/over flow happen. OTHA, it will
be forever loop interrupt if something strange error happen on
HW/driver without escape route of large number error.

To avoid this issue, it indicates error message if large number error
occur, and disables error interrupt.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto c2dc47d5cf ASoC: rsnd: rsnd_dai_stream has each mod's status insted of rsnd_mod
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

Current rsnd is controling each mod's status on mod. But it was not
good design for SSI, because stream might has SSI-parent.
In such case, it can't play/capture in same time, because SSI-parent
is used as normal SSI in other stream, but it shares same status.
To avoid this issue each mod's status is controlled by rsnd_dai_stream
instead of rsnd_mod.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto b761bf272b ASoC: rsnd: disable SRC.out only when stop timing
Because SRC is connected to DMA and DMA want to keep dreq when stop
timing. This patch makes SRC stop SRC.out only when stop timing. And
it stops both SRC.out/SRC.in when quit timing

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 37447b46e8 ASoC: rsnd: move rsnd_src_ssi_irq_enable/disable() to ssi.c
Part of SSI IRQ enable/disable was controlled by SRU (on Gen1)
or CMD (on Gen2). Because of this reason SSI IRQ function was
implemented under src.c. but it is not understandable.
Let's move it to ssi.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 40854c648e ASoC: rsnd: fixup rsnd_dma_of_path method for mod base common method
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

Current rsnd_dma_of_path is assuming that all mods are related to DMA.
But it will be wrong. This patch tidyup this wrong assumption

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 48d582819f ASoC: rsnd: remove all modules when PIO fallback
Current Renesas sound is supporting PIO fallback if it can't use DMA.
In such case, it should remove all attached modules, but current driver
is missing about CTU/MIX. Because current implement requests
specific mod for remove.
To avoid same things in future, this patch removes all mods,
and re-connects SSI when PIO fallback case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 27924f3208 ASoC: rsnd: enable to use rsnd_dai_connect() from each mod
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

DMAC/SSIU/SSI-parent/CMD will be implemented as module, but these are
not customer controlled module. These should be automatically install
to system. Because of this, rsnd_dai_connect() should be called from
each mod. SSI can be very special, because it will be installed as
SSI-parent / SSI-child. Thus, new rsnd_dai_connect() has type parameter
which should be mod->type except SSI-parent

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 81ecbb654e ASoC: rsnd: rename rsnd_dma_init() to rsnd_dma_attach()
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

DMA will be implemented as module. Then each rsnd_dma_ops will be
rsnd_mod_ops. But current rsnd_dma_ops::init means "DMA attach".
This patch removes .init from rsnd_dma_ops, and renames
rsnd_dma_init() to rsnd_dma_attach()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 3e5afa73a9 ASoC: rsnd: DMA related definition goes to dma.c
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

DMA will be implemented as module. Current DMA definition is no longer
needed on rsnd.h. Let's move it to dma.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 232c00b6e5 ASoC: rsnd: DMA become SSI/SRC member
Renesas sound needs many devices
(SSI/SSIU/SRC/CTU/MIX/DVC/CMD/AudioDMAC/AudioDMACpp).
SSI/SRC/CTU/MIX/DVC are implemented as module.
SSI parent, SSIU are implemented as part of SSI
CMD is implemented as part of CTU/MIX/DVC
AudioDMAC/AudioDMACpp are implemented as part of SSI/SRC
It is nice sense that these all devices are implemented as mod.

Current rsnd_mod is member of rsnd_mod. But the DMA user is only
SSI/SRC. This DMA will be implemented as module. As 1st step, DMA
become SSI/SRC member by this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-16 10:09:29 +00:00
Kuninori Morimoto 7115cb913d ASoC: rsnd: make sure SRC In Rate feature enablement
SRC In Rate convert feature cannot be used if data path is using DVC.
This patch judges it, and not allowed to use it in such case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-10 19:02:02 +00:00
Mark Brown 2a148b6f27 ASoC: Updates for v4.4
Not much core work here, a few small tweaks to interfaces but mainly the
 changes here are driver ones.  Highlights include:
 
  - Updates to the topology userspace interface
  - Big updates to the Renesas support from Morimoto-san
  - Most of the support for Intel Sky Lake systems.
  - New drivers for Asahi Kasei Microdevices AK4613, Allwinnner A10,
    Cirrus Logic WM8998, Dialog DA7219, Nuvoton NAU8825 and Rockchip
    S/PDIF.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJWLbbGAAoJECTWi3JdVIfQH7oH/1VdN2ozP9A03p24aC5qso1F
 VWOBnG4pkw1G6J5qK2lemMDeJdRdTfreICUAa9Tw9kOSfTIb6F3X8kCw8tbwlw0I
 4phgmyo23P53OfLZFMkQi/RCfwItnE0sszqhvoumUg0ryjYxg2JT+gTMgwvVo7Pq
 hf6m6a3we5pxLIIYP4wlQgOKwUJe4B4nC37ExySf24Dlo/DzmWDtfQbGvmyluFzb
 MB1qzEvAc/KC3LZFkIFmhfg2/caNRhcQrzkUCYrLR3t+oz9P1zCpYTII7VDdMg7L
 SM2VoL+ynEAdBqa38Ozwxvd/mpHwinlAeiikuwz1PyxVOqZvZqqiWzD8eUJkhZk=
 =/F/Q
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v4.3-rc6' into asoc-fix-rcar

ASoC: Updates for v4.4

Not much core work here, a few small tweaks to interfaces but mainly the
changes here are driver ones.  Highlights include:

 - Updates to the topology userspace interface
 - Big updates to the Renesas support from Morimoto-san
 - Most of the support for Intel Sky Lake systems.
 - New drivers for Asahi Kasei Microdevices AK4613, Allwinnner A10,
   Cirrus Logic WM8998, Dialog DA7219, Nuvoton NAU8825 and Rockchip
   S/PDIF.
2015-11-10 19:01:58 +00:00
Kuninori Morimoto 021c5d9469 ASoC: rsnd: fixup SCU_SYS_INT_EN1 address
cfcefe0126 ("ASoC: rsnd: add recovery support for under/over flow
error on SRC") added SCU_SYS_INT_EN1 address, but it should be
0x1d4, not 0x1c4. This patch fixup it.

Fixes: cfcefe0126 ("ASoC: rsnd: add recovery support for under/over flow error on SRC")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-11-06 12:06:48 +00:00
Mark Brown 71831ef699 Merge remote-tracking branches 'asoc/topic/rt298', 'asoc/topic/rt5640', 'asoc/topic/samsung' and 'asoc/topic/sh' into asoc-next 2015-10-26 11:16:13 +09:00
Mark Brown 512def88cb Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/rl6347a', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next 2015-10-26 11:16:10 +09:00
Kuninori Morimoto b415b4d312 ASoC: rsnd: remove duplicate parameter from rsnd_ssi_xxx()
rsnd_ssi_use_busif() and rsnd_ssi_is_pin_sharing() are the function
which returns current SSI status. But these requests duplicated parameter.
This patch removes duplicated parameter.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 13:30:01 +01:00
Kuninori Morimoto 69819f527a ASoC: rsnd: remove unused rsnd_dma_to_ssi() macro
rsnd_dma_to_ssi() is no longer used, let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 13:30:01 +01:00
Kuninori Morimoto c992934501 ASoC: rsnd: rename rsnd_mod_hw_start/stop to rsnd_mod_power_on/off
rsnd_mod_hw_start/stop were unclear naming.
It became rsnd_mod_power_on/off by this patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 13:30:01 +01:00
Kuninori Morimoto 89e3e2c352 ASoC: rsnd: fixup rsnd_dai_call() behavior for .stop/.quit
Current rsnd_dai_call returns immediately if rsnd_mod_call return fail.
Thus, each callback-count can be unbalanced for example .init was OK,
start was OK, but, .stop was not OK. This case .quit should be called
but isn't called. And, rsnd_dai_stream_quit() also not be called.
rsnd_dai_call() should call all .stop/.quit eventhough it returns error.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 13:30:01 +01:00
Kuninori Morimoto 32a96d558d ASoC: rsnd: fixup rsnd_dai_call() behavior for unimplemented method
Current rsnd_dai_call didn't count callback-count if callback
wasn't implemented. Thus, it counts can be unbalance.
ex) .start : implemented
    .stop  : not implemented
This patch solve this issue

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 13:30:01 +01:00
Kuninori Morimoto 1355720a3b ASoC: rsnd: fixup rsnd_mod_call() behavior for debug
Indicating each module method as debug message before executing is
readable/understandable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 13:30:01 +01:00
Kuninori Morimoto b05ce4c091 ASoC: rsnd: fixup devm_request_irq() option on ssi.c
bfc0cfe("ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_ssi_xxx()")
tidyuped devm_request_irq() option from ssi to mod, but devm_free_irq()
on rsnd_ssi_dma_remove() didn't modified. This patch fixups this issue.
Otherwise kernel will output WARNING message.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 13:30:01 +01:00
Kuninori Morimoto 9993c16d46 ASoC: rsnd: fixup struct rsnd_gen::res array size
struct rsnd_gen :: res array size should be RSND_BASE_MAX,
not RSND_REG_MAX. This patch fixup it, and indicates whether
each data array size is based on what

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 13:30:01 +01:00
Kuninori Morimoto c9b9638f61 ASoC: rsnd: fixup print debug message after read
debug meesage for rsnd_mod_read() should be prints after read

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-22 13:30:01 +01:00
Kuninori Morimoto 8a98b4223d ASoC: rsnd: Gen1 probe is not error
Probing from Gen1 is not error. This patch fixup it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-16 15:21:35 +01:00
Kuninori Morimoto 4362495734 ASoC: rsnd: Announce for removing Gen1 SRU support
Gen1 SRU support was created for preparation of Gen2 SRC support,
but no-one is using this feature (sampling rate convert) on Gen1.
BockW had used SRU before, but it was pass through mode.
This means it is same as SSI. And BockW "platform base" code was
removed from upstream code. It is now supported via DT, but it doesn't
use SRU. More detail, r8a7778.dtsi has "rcar_sound,src" entry, but
no-one is using this feature today. SRU probing has no relation to this
removing. This means there is no effect for DT compatibility, no issues
on upstream kernel.

Gen2 SRC was created from Gen1 SRU, these are similar but not same IP.
Keeping Gen1 SRU in current driver is a little bit difficult,
and no-one is using it today. Gen1 sound is still supported via SSI.
Gen1 SRU support will be removed in the next kernel version.
This patch announces it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-14 10:11:10 +01:00
Masanari Iida 4272975a34 ASoC: sh: Fit typo in Kconfig
s/SUR/SRU/g

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-12 16:58:31 +01:00
Geert Uytterhoeven dcc448e619 ASoC: rsnd: Remove obsolete platform data support
Since commit 3d7608e4c1 ("ARM: shmobile: bockw: remove legacy
board file and config"), Renesas R-Car SoCs are only supported in
generic DT-only ARM multi-platform builds.  The driver doesn't need to
use platform data anymore, hence remove platform data configuration.

Move <sound/rcar_snd.h> to sound/soc/sh/rcar/, as it's no longer needed
by platform code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-07 12:19:51 +01:00
Mark Brown 727e53a12f Merge remote-tracking branches 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/spear', 'asoc/topic/sunxi' and 'asoc/topic/tlv320aic3x' into asoc-next 2015-09-23 11:01:27 -07:00
Kuninori Morimoto 462c30bc8b ASoC: rsnd: fixup clkout_name[] index error for single AUDIO_CLKOUT SoC
2a46db4a3("ASoC: rsnd: add AUDIO_CLKOUT support") added AUDIO_CLKOUT
support for ADG. But single AUDIO_CLKOUT needs clkout_name[CLKOUT],
not clkout_name[i]. Kernel will have NULL pointer access without this
patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-16 20:40:39 +01:00
Kuninori Morimoto e2f8445176 ASoC: rsnd: SND_SOC_RCAR depends on COMMON_CLK
2a46db4a3("ASoC: rsnd: add AUDIO_CLKOUT support") uses
of_clk_add_provider() which is requesting struct clk_onecell_data.
But it is COMMON_CLK feature. SND_SOC_RCAR depends on COMMON_CLK

This patch also solved compile error of 7486d80f7("ASoC: rsnd: remove
unneeded sh_clk header")

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-16 20:40:02 +01:00
Kuninori Morimoto 2a46db4a37 ASoC: rsnd: add AUDIO_CLKOUT support
Renesas sound has AUDIO_CLKOUT (in Gen1/Gen2) AUDIO_CLKOUT1/2/3 (in Gen3)
This patch support these patches as clock provider.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:32 +01:00
Kuninori Morimoto 248e88c2fb ASoC: rsnd: adg: ignore undefined clock error
undefined clock is not error. Accept such case. And this is prepare
for clock out support in the same time.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:32 +01:00
Kuninori Morimoto 3af6c3ac91 ASoC: rsnd: tidyup ADG debug message for clock selection
It didn't have "\n", and indicated different data

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:32 +01:00
Kuninori Morimoto eae6fff4f1 ASoC: rsnd: tidyup ADG clock calculate method
Current ADG clock calculation needs ADG and SSI settings.
Thus, SSI side clock request function depends on ADG settings.
After reconsideration,  we can close this method inside ADG.
This function uses new method. And it becomes preparation for
AUDIO_CLKOUT support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:32 +01:00
Kuninori Morimoto 5c6901d98b ASoC: rsnd: ADG initial setup on rsnd_adg_ssi_clk_init()
ADG is special IP since it doesn't have MSTP. And now, ADG has common
mod base register access. We can now setup ADG initial setting when
probe timing. It is needed if sound card is based on AUIDO_CLK which
is used as Master clock.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:31 +01:00
Kuninori Morimoto f1df122907 ASoC: rsnd: add common mod confirm method
Renesas sound has SSI/SRC/DVC/MIX/ADG modules, and these have original
register mapping. Thus this driver is using regmap field, and each module
is using it based on each module ID.

Sometimes, each module needs other module to controlling. but current each
function is using just "mod" as parameter name. This is confusable.
For example, if SSI0 and SRC2 are connected, and if SRC module function
has bug of module access, and if it needs to control connected SSI,
SRC function will access to SSI2 (It should access to SSI0, but it uses
SRC's ID 2). This is easy to happen in current driver style.

To avoid this kind of confusable trouble, this patch adds module confirm
macro for debug purpose.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:31 +01:00
Kuninori Morimoto 1665a9e5e2 ASoC: rsnd: ADG uses mod base common method
Renesas sound has ADG IP, but it is special device.
(It is clock generater, and it doesn't need MSTP)
Thus, ADG didn't use mod base common method on rsnd driver.
But it can be confusable point. Let's use common method

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:31 +01:00
Kuninori Morimoto b76e218ae5 ASoC: rsnd: add rsnd_mod_get() macro and use it
Renesas sound driver has SSI/SRC/DVC/CTU/MIX, and these are controlled
as modules. And these module are member of each modules's private data.
It used own method to get module pointer, but Let's use common method

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:31 +01:00
Kuninori Morimoto ac37a45b0b ASoC: rsnd: Add Gen3 initial support
Renesas sound Gen3 is updated version of Gen2. We need to update
driver for it, but basically it should works as Gen2 compatible.
This is initial support for Gen3. Gen3 specific feature will be
incrementally added in the future

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:31 +01:00
Kuninori Morimoto 7486d80f7d ASoC: rsnd: remove unneeded sh_clk header
sh_clk header is not needed, and it will create confusion.
Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:29 +01:00
Kuninori Morimoto b9bfe9d5f7 ASoC: rsnd: rename rsnd_src_pcm_new() to rsnd_src_pcm_new_gen2()
rsnd_src_pcm_new() is used only from Gen2. make it clear in function name,
and remove unneeded Gen1 check.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:28 +01:00
Kuninori Morimoto c25f20e1de ASoC: rsnd: tidyup rsnd_dma_to_xxx() position
rsnd_dma_to_xxx() macro should exist in same place

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 19:47:28 +01:00
Axel Lin 1ff68f5590 ASoC: sh: siu_dai: Convert to use resource managed APIs
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-14 18:39:05 +01:00
Mark Brown cfed47d7b5 Merge remote-tracking branches 'asoc/topic/rt5677', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf-codec' and 'asoc/topic/spear' into asoc-next 2015-08-30 15:56:44 +01:00
Mark Brown 532161e6cc Merge remote-tracking branches 'asoc/topic/rcar', 'asoc/topic/reg-default', 'asoc/topic/rl6231', 'asoc/topic/rockchip' and 'asoc/topic/rt286' into asoc-next 2015-08-30 15:55:54 +01:00
Axel Lin e8de871e19 ASoC: sh: dma-sh7760: Convert to devm_snd_soc_register_platform
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-30 12:15:10 +01:00
Axel Lin 92eca20bbe ASoC: sh: ssi: Convert to devm_snd_soc_register_component
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-28 17:28:49 +01:00
Geert Uytterhoeven 1af2cc64b1 ASoC: rsnd: Silence DMA slave ID compile warning on 64-bit
On arm64:

    sound/soc/sh/rcar/dma.c: In function 'rsnd_dmaen_init':
    sound/soc/sh/rcar/dma.c:180:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
	     (void *)id);
	     ^
    include/linux/dmaengine.h:1185:75: note: in definition of macro 'dma_request_channel'
     #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y)
									       ^

Add an intermediate cast to "uintptr_t" to kill the compile warning.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-11 17:13:25 +01:00
Lars-Peter Clausen e773c2f964 ASoC: rcar ctu: Staticise local symbols
rsnd_of_parse_ctu() is not used outside this file so it can be static.
Fixes the following sparse warning:

	sound/soc/sh/rcar/ctu.c:72:6: warning: symbol 'rsnd_of_parse_ctu' was
		not declared. Should it be static?

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-29 15:06:08 +01:00
Kuninori Morimoto 48725e9cc8 ASoC: rsnd: tidyup parameter assignment position
84e95355602c("ASoC: rsnd: show debug message for SSI/SRC/DVC connection")
added debug message on rsnd_dai_connect(), but the relationship of
parameter check was absurdity. This patch tidyup it.
It is reported via Smatch/Dan

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-21 11:39:42 +01:00
Kuninori Morimoto 70fb10529f ASoC: rsnd: add MIX (Mixer) support
This patch adds MIX (Mixer) initial support for rsnd driver.
It is assuming that this MIX is used via DPCM.

This is sample code for playback.

	CPU0  : [MEM] -> [SRC1] -> [CTU02] -+
					    |
					    +-> [MIX0] -> [DVC0] -> [SSI0]
	                                    |
	CPU1  : [MEM] -> [SRC2] -> [CTU03] -+

	sound {
		compatible = "renesas,rsrc-card";

		...

		cpu@0 {
			sound-dai = <&rcar_sound 0>;
		};

		cpu@1 {
			sound-dai = <&rcar_sound 1>;
		};

		codec {
			...
		};
	};

	rcar_sound {

		...

		rcar_sound,dai {
			dai0 {
				playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
			};
			dai1 {
				playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
			};
		};
	};

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 19:26:06 +01:00
Kuninori Morimoto 9269e3c3cf ASoC: rsnd: add CTU (Channel Transfer Unit) prototype support
This patch adds CTU (Channel Transfer Unit) support for rsnd driver.
But, it does nothing to data at this point, but is required for MIX
support.

CTU design is a little different from other IPs (CTU0 is including
CTU00 - CTU03, and CTU1 is including CTU10 - CTU13, these have different
register mapping) We need to care about it on this driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 19:26:06 +01:00
Kuninori Morimoto 7dfb491945 ASoC: rsnd: update Audio DMA path search method
Current rsnd driver is assuming Audio DMAC / Audio DMAC peri peri
are used from SSI/SSIU/SRC/DVC. But we will add CTU/MIX to this driver.
Then, current DMA path searching method is not understandable, and good
enough for this purpose. This patch update DMA path search method, more
simply.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-17 19:26:06 +01:00
Kuninori Morimoto 78edead449 ASoC: rsnd: tidyup SRC position on each code
This is cleanup for CTU/MIX support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto 5cbbadd3d5 ASoC: rsnd: add rsnd_io_to_mod()
Sometimes we would like to get each module directly, especially data path
searching. this patch adds rsnd_io_to_mod() macro, and existing
rsnd_io_to_mod_xxx() use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto ddea1b2e83 ASoC: rsnd: dma: add DMA name on .ops
Current rsnd driver is using Audio DMAC (via DMAEngine) and
Audio DMAC peri peri (via original method), and usage of these DMAC
are different. Indicates its naming is useful for debugging.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto 9469b8b609 ASoC: rsnd: check the Gen1 at the beginning of DVC probe
DVC doesn't support Gen1, check it beginning of probe

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto 98d358af07 ASoC: rsnd: tidyup rsnd_dma_ops definition place
rsnd_dma_ops is used only from dma.c, rsnd.h doesn't need it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto 84e9535560 ASoC: rsnd: show debug message for SSI/SRC/DVC connection
It can help for connection debug

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:22 +01:00
Kuninori Morimoto 4689032b11 ASoC: rsnd: tidyup data align position
Sound L/R order of SSI is different from Linux sound data order.
So current rsnd driver is using DALIGN (= data align) to exchange data
align on SSIU. OTOH, CMD/SRC/SSIU have DALIGN register. Now inverted
sound volume will be exchanged if user used volume control on DVC.
Because SSIU which exchanges data align is located after DVC.

	MEM -> SRC -> DVC -> SSI

This patch exchanges data align SRC if possible

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto bfe1360d79 ASoC: rsnd: add rsnd_get_adinr_chan()
Current rsnd driver has rsnd_get_adinr_bit() to get bit settings for
ADINR (= Audio Information Register) of SSIU/SRC/DVC.
This patch adds rsnd_get_adinr_chan() to get channel settings for
ADINR (= Audio Information Register) of CTU/MIX.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto 3023b384d0 ASoC: rsnd: tidyup ADINR function name
Renesas sound IP (= SSIU/SRC/CTU/MIX/DVC) have ADINR
(= Audio Information Register), but some of them (= SSIU/SRC/DVC)
are for audio data bits, some of them (= CTU/MIX) are for audio data
channels.
Current rsnd driver is supporting SSIU/SRC/DVC, and these ADINR were
for bits. This patch rename rsnd_get_adinr() to rsnd_get_adinr_bit(),
and we will have rsnd_get_adinr_chan() for CTU/MIX.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto d1ade514e8 ASoC: rsnd: add rsnd_src_initialize_lock/unlock()
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxIR (Initialization Register) is one
of them. These xxxIR need be set to 1 during initialization.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_src_initialize_lock/unlock() and make sure it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto 3bb3d363e5 ASoC: rsnd: add rsnd_dvc_initialize_lock/unlock()
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxIR (Initialization Register) is one
of them. These xxxIR need be set to 1 during initialization.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_dvc_initialize_lock/unlock() and make sure it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto e2c0841619 ASoC: rsnd: add rsnd_path_parse() for CTU/MIX/DVC route setting
Current sound data route settings is done in dvc.c, and it doesn't care
about CTU/MIX at this poinnt, but we need to care about these.
OTOH, rsnd driver already has rsnd_path_xxx() functions for data path which
are good match for CTU/MIX/DVC path selectio.
This patch adds new rsnd_path_parse() to select sound data route which will
care about CTU/MIX/DVC path.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto c8cf15f64f ASoC: rsnd: rename rsnd_path_parse/break() into add/remove
parse/break is a little ambiguous/confusable name for rsnd module path.
Especially for CTU/MIX support. It was renamed to add/remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:21 +01:00
Kuninori Morimoto d6f8d5b442 ASoC: rsnd: enable module multi connection
'8a4e379b54f8("ASoC: rsnd: remove io from rsnd_mod")' removed mod/io
relationship. rsnd_dai_connect() mod/io check is no longer needed

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:20 +01:00
Kuninori Morimoto 379febfd2e ASoC: rsnd: src: make sure SRC soft reset
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxRSR (Software reset Register) is one
of them. These xxxRSR need be set to 1 to 0 when software reset.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_src_soft_reset() and make sure it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:20 +01:00
Kuninori Morimoto 636e4bad5c ASoC: rsnd: dvc: make sure DVC soft reset
Renesas SCU (Sampling Rate Convert Unit) includes SRC/CTU/MIX/DVC,
and these have similar register. xxxRSR (Software reset Register) is one
of them. These xxxRSR need be set to 1 to 0 when software reset.
Current rsnd driver has src.c / dvc.c, and we will have mix.c.
It is readable if these have same named function.
This patch adds rsnd_dvc_soft_reset() and make sure it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:29:20 +01:00
Kuninori Morimoto da599fd34b ASoC: rsnd: move SRC specific macro into src.c
rsnd_src_nr() is used only from src.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:34 +01:00
Kuninori Morimoto 4f35fabaa3 ASoC: rsnd: move DVC specific macro into dvc.c
rsnd_dvc_nr() is used only from dvc.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-16 22:10:34 +01:00