aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-10-06Merge remote-tracking branches 'asoc/topic/rt5645', 'asoc/topic/rt5677', 'asoc/topic/samsung', 'asoc/topic/sgtl5000' and 'asoc/topic/sh' into asoc-nextMark Brown2-3/+8
2014-10-06Merge remote-tracking branches 'asoc/topic/max98090', 'asoc/topic/rockchip', 'asoc/topic/rsnd' and 'asoc/topic/rt286' into asoc-nextMark Brown1-4/+2
2014-08-19ASoC: sh: Don't opencode DMAengine API callsLars-Peter Clausen1-2/+2
Use the proper wrapper functions instead of directly calling the DMAengine callback functions. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17ASoC: sh: Fix dma direction typeLars-Peter Clausen1-1/+6
dmaengine_prep_slave_single() expects a enum dma_transfer_direction and not a enum dma_data_direction. Since the integer representations of both DMA_TO_DEVICE and DMA_MEM_TO_DEV aswell as DMA_FROM_DEVICE and DMA_DEV_TO_MEM have the same value the code worked fine even though it was using the wrong type. Fixes the following warnings from sparse: sound/soc/sh/fsi.c:1307:42: warning: mixing different enum types sound/soc/sh/fsi.c:1307:42: int enum dma_data_direction versus sound/soc/sh/fsi.c:1307:42: int enum dma_transfer_direction Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17ASoC: rcar: Use && instead of & for boolean expressionsLars-Peter Clausen1-1/+1
Sparse spits out the following warning: sound/soc/sh/rcar/gen.c:250:21: warning: dubious: x & !y It does this because sometimes mixing boolean and bit-wise logic has not the intended result. In this case we are fine, but replacing the bit-wise '&' with the boolean '&&' silences the sparse warning. The generated code for both cases is the same. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16ASoC: rsnd: delete unneeded test before of_node_putJulia Lawall1-4/+2
Of_node_put supports NULL as its argument, so the initial test is not necessary. Suggested by Uwe Kleine-König. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e; @@ -if (e) of_node_put(e); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-04Merge remote-tracking branches 'asoc/topic/rt5670', 'asoc/topic/rt5677', 'asoc/topic/s6000', 'asoc/topic/samsung' and 'asoc/topic/sh-fsi' into asoc-nextMark Brown1-6/+6
2014-08-01ASoC: rsnd: enable Mute control on DVCKuninori Morimoto1-5/+29
DVC can control Mute. This patch supports it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01ASoC: rsnd: tidyup DVC control methodKuninori Morimoto1-25/+34
DVC can use Volume and Mute control, and these control methods doesn't have much difference. This patch cleanup current method, and it will be used for Mute control. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-01ASoC: rsnd: fixup SND_SOC_DAIFMT_xB_xF behaviorKuninori Morimoto1-21/+22
In current R-Car rsnd driver, the SND_SOC_DAIFMT_xB_xF flags are used to HW default behavior, but, it should be used to specific format. The waveforms of LEFT_J/RIGHT_J format with SND_SOC_DAIFMT_NB_NF flag will be started from "falling edge" without this patch. But, it should be started from "rising edge". Reported-by: Jun Watanabe <jun.watanabe.ue@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31ASoC: rsnd: fixup pcm_new callback methodKuninori Morimoto1-11/+9
bff58ea4f43d9b4a9fd6fb05fabc8f50f68131f5 (ASoC: rsnd: add DVC support) added DVC support, and it added pcm_new callback feature for it. Then it called all DAI's pcm_new callback, and it was wrong. This patch fixup it and call correct callback. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31ASoC: rsnd: add missing dev_dbg() in rsnd_bset()Kuninori Morimoto1-0/+4
b8c637864a6904a9ba8e0df556d5bdf9f26b2c54 (ASoC: rsnd: use regmap_mmio instead of original regmap bus) used regmap_mmio and modified dev_dbg() for rsnd_read/write(). But rsnd_bset() is missing it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31ASoC: rsnd: care audio local bus data format consistencyKuninori Morimoto3-0/+22
R-Car sound uses Audio Local Bus which uses Lch/Rch format. This bus is used if driver uses BUSIF. But sound data is written as Rch/Lch format in register. This means Rch <-> Lch will be inverted. SSIU :: BUSIF_DALIGN is used to controlling data format. Reported-by: Jun Watanabe <jun.watanabe.ue@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-31ASoC: rsnd: care detail of SRC_BSDSRKuninori Morimoto1-1/+31
Driver should care more detail of SRC_BSDSR settings. The sound includes noise without this patch if it used SRC. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-29ASoC: rsnd: use regmap_mmio instead of original regmap busKuninori Morimoto2-252/+189
Current rsnd driver is using regmap and regmap_field. It used original regmap bus which is single regmap instance for multi register mapping. This patch modifies it to use regmap_mmio bus, and tidyuped probe method Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-25ASoC: rsnd: fixup dai remove callback operationKuninori Morimoto1-11/+11
rsnd driver is using SSI/SRC/DVC which are using "mod" base operation. These "mod" are supporting "probe" and "remove" callbacks. Current rsnd_probe should call "remove" if "probe" was failed, since "probe" might be having DMAEngine handle. Some mod's "remove" callback might be called without calling "probe", but it is no problem. because "remove" do nothing in such case. So, all mod's "remove" should be called when error case of rsnd_probe() and rsnd_remove(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-22ASoC: rsnd: add missing src/dst_addr_width for DMAEngineKuninori Morimoto1-0/+2
Renesas new DMAEngine driver requests src/dst_addr_width Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-02ASoC: rsnd: add DT support to DVCKuninori Morimoto2-2/+49
Now, DVC can use DT Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-02ASoC: rsnd: DMA start address is properly used for each DMACKuninori Morimoto2-0/+3
R-Car sound uses Audio DMAC and Audio DMAC peri peri. Audio DMAC peri peri transfers data inside circuit. DMA transfer needs source / destination address, and destination address can be set via dmaengine_slave_config(). The source address can be set when starting DMAEngine. Because Audio DMAC peri peri always ignores its value, current driver always used same source address for Audio DMAC / Audio DMAC peri peri (Audio DMAC peri peri source / destination address is always fixed value) But, This is not good match for DT booting. This patch properly uses DMA start address for Audio DMAC / Audio DMAC peri peri. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-02ASoC: rsnd: DMA cleanup for flexible SSI/SRC selectionKuninori Morimoto3-59/+64
Current R-Car sound SSI/SRC/DVC selection has feature limit. (It is assuming that SSI/SRC are using same index number) So that enabling SSI/SRC flexible selection, this patch modifies DMA settings. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28ASoC: rsnd: enable DVC when captureKuninori Morimoto1-8/+4
Current DVC can be enabled only when playback, but, this came from misunderstanding. It is not correct. DVC <-> DMA relationship is... Playback: MEM -> DMAC -> SRC -> DVC -> DMACp -> SSI Capture: SSI -> DMACp -> SRC -> DVC -> DMAC -> MEM DVC can be used for both Playback/Capture Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28ASoC: rsnd: use dmaengine_prep_dma_cyclic() instead of original methodKuninori Morimoto2-62/+18
Current R-Car sound driver is using DMAEngine directly, but, ASoC is requesting to use common DMA transfer method, like snd_dmaengine_pcm_trigger() or dmaengine_pcm_ops. It is difficult to switch at this point, since Renesas driver is also supporting PIO transfer. This patch uses dmaengine_prep_dma_cyclic() instead of dmaengine_prep_slave_single(). It is used in requested method, and is good first step to switch over. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28ASoC: rsnd: SSI + DMA can select BUSIFKuninori Morimoto5-45/+121
Sound data needs to be sent to R-Car sound SSI when playback. But, there are 2 interfaces for it. 1st is SSITDR/SSIRDR which are mapped on SSI. 2nd is SSIn_BUSIF which are mapped on SSIU. 2nd SSIn_BUSIF is used when DMA transfer, and it is always used if sound data came from via SRC. But, we can use it when SSI+DMA case too. (Current driver is assuming 1st SSITDR/SSIRDR for it) 2nd SSIn_BUSIF can be used as FIFO. This is very helpful/useful for SSI+DMA. But DMA address / DMA ID are not same between 1st/2nd cases. This patch care about these settings. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28ASoC: fsi: use dmaengine_prep_dma_cyclic() for DMA transferKuninori Morimoto1-67/+27
Current FSI driver is using DMAEngine directly, but, ASoC is requesting to use common DMA transfer method, like snd_dmaengine_pcm_trigger() or dmaengine_pcm_ops. It is difficult to switch at this point, since Renesas driver is also supporting PIO transfer. This patch uses dmaengine_prep_dma_cyclic() instead of dmaengine_prep_slave_single(). It is used in requested method, and is good first step to switch over. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28ASoC: fsi: add fsi_pointer_update() for common pointer methodKuninori Morimoto1-35/+22
fsi PIO/DMA handler are using each own pointer update method, but these can be share. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28ASoC: fsi: use SNDRV_DMA_TYPE_DEV for sound bufferKuninori Morimoto1-37/+5
Current fsi driver is using SNDRV_DMA_TYPE_CONTINUOUS for snd_pcm_lib_preallocate_pages_for_all(). But, it came from original dma-sh7760.c, and no longer needed. This patch exchange its parameter, and removed original dma mapping and un-needed dma_sync_single_xxx() from driver. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28Merge remote-tracking branch 'asoc/fix/rcar' into asoc-rcarMark Brown2-14/+25
2014-06-21ASoC: sh/fsi: Make one-bit bitfields unsignedLars-Peter Clausen1-6/+6
One-bit signed bitfields have two possible values: 0 and -1. This sometimes leads to unexpected results (e.g. foo.bar = 1; foo.bar == 1 => false) which is why it is recommended to make one-bit bitfields unsigned. This fixes the following sparse warnings: sound/soc/sh/fsi.c:267:25: error: dubious one-bit signed bitfield sound/soc/sh/fsi.c:268:22: error: dubious one-bit signed bitfield sound/soc/sh/fsi.c:269:20: error: dubious one-bit signed bitfield sound/soc/sh/fsi.c:270:28: error: dubious one-bit signed bitfield sound/soc/sh/fsi.c:271:26: error: dubious one-bit signed bitfield sound/soc/sh/fsi.c:272:25: error: dubious one-bit signed bitfield Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: rcar: Fix dma direction typeLars-Peter Clausen2-2/+2
dmaengine_prep_slave_single() expects a enum dma_transfer_direction and not a enum dma_data_direction. Since the integer representations of both DMA_TO_DEVICE and DMA_MEM_TO_DEV aswell as DMA_FROM_DEVICE and DMA_DEV_TO_MEM have the same value the code worked fine even though it was using the wrong type. Fixes the following warning from sparse: sound/soc/sh/rcar/core.c:227:49: warning: mixing different enum types sound/soc/sh/rcar/core.c:227:49: int enum dma_data_direction versus sound/soc/sh/rcar/core.c:227:49: int enum dma_transfer_direction Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-18ASoC: rsnd: fixup loop exit timing of dma name searchKuninori Morimoto1-1/+3
Current dma name search loop didn't care about SSI index This patch fixes it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-18ASoC: rsnd: fixup rsnd_gen_dma_addr() for Gen1Kuninori Morimoto1-12/+21
ad32d0c7b0e993433df152ae747652647eb65a27 (ASoC: rsnd: add rsnd_gen_dma_addr() for DMAC addr) added rsnd_gen_dma_addr() to calculate DMA addr, but, it is necessary only for Gen2. This patch ignores Gen1 case. Kernel will be panic without this patch. Special thanks to Simon Reported-by: Simon Horman <horms@verge.net.au> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-12ASoC: rsnd: fixup index of src/dst mod when captureKuninori Morimoto1-1/+1
Index of dma name should use -1, not +1 when capture case. Thank you 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@linaro.org>
2014-06-03Merge remote-tracking branches 'asoc/topic/omap' and 'asoc/topic/rcar' into asoc-nextMark Brown6-31/+259
2014-05-26ASoC: rsnd: add rsnd_gen_dma_addr() for DMAC addrKuninori Morimoto3-4/+101
The DMAC src/dst addr needs to be set from driver when DT case. (It was set from SoC/DMAEngine code when non-DT case) This patch adds rsnd_gen_dma_addr() to set DMAC src/dst addr. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: care DMA slave channel name for DTKuninori Morimoto2-1/+85
Renesas sound driver is supporting to use DMAEngine. But, DMA slave channel name "tx", "rx" is not enough in DT case. Becuase, it has many ports and path combination. This patch adds rsnd_dma_of_name() to find DMA channel name, for example memory to SSI0 is "mem_ssi0", SSI0 to memory is "ssi0_mem", SSI0 to SRC0 is "ssi0_src0", SRC0 to SSI0 is "src0_ssi0", SRC0 to DVC0 is "src0_dvc0"... Renesas sound want to use PIO transfer mode for some reasons. It will be PIO tranfer mode if device node doesn't have DMA settings. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: module name is unifiedKuninori Morimoto3-9/+49
Renesas sound driver uses many modules (= SSI/SRC/DVC), and each module had own name. But, each module name can be used as several purpose, like clock name, DMA name etc... This patch uses common name for each module. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: remove rsnd_src_non_opsKuninori Morimoto1-10/+10
Renesas sound driver is supporting Gen1/Gen2. SRC probe can return error if it was unknown generation. Now, rsnd_src_non_ops is not needed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: save platform_device instead of deviceKuninori Morimoto2-3/+4
DT DMA support needs struct platform_device pointer, and it can get struct device pointer from platform_device. Save platform_device instead of device. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: rsnd: DT node clean up by using the of_node_put()Kuninori Morimoto2-4/+10
Driver needs to call of_node_put() after of_get_chile_by_name() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-22Merge remote-tracking branches 'asoc/topic/rt5651', 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf', 'asoc/topic/sta350' and 'asoc/topic/tlv320dac33' into asoc-nextMark Brown1-1/+1
2014-05-22Merge remote-tracking branches 'asoc/topic/nuc900', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/rt5640' and 'asoc/topic/rt5645' into asoc-nextMark Brown8-332/+531
2014-05-15ASoC: rsnd: Fix warnings due to improper printk formatsLaurent Pinchart1-7/+7
Use the %pap printk specifier to print resource_size_t variables. This fixes warnings on platforms where resource_size_t has a different size than int. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-13ASoC: rsnd: add DVC supportKuninori Morimoto7-2/+366
This patch adds DVC (Digital Volume Controller) support which is member of CMD unit. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-13ASoC: rsnd: enable to use multi parameter on rsnd_dai_call/rsnd_mod_callKuninori Morimoto1-13/+13
rsnd_mod_ops would like to come to use multi parameter. modify macro to enable it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-13ASoC: rsnd: remove duplicate parameter from rsnd_mod_opsKuninori Morimoto4-94/+65
Now, it can get rsnd_dai_stream pointer from rsnd_mod. Remove duplicate parameter from rsnd_mod_ops Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-13ASoC: rsnd: add rsnd_get_adinr()Kuninori Morimoto3-23/+30
SRC module needs ADINR register settings, but, it has many similar xxx_ADINR register, and needs same settings. This patch adds rsnd_get_adinr() to sharing code. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-13ASoC: rsnd: add rsnd_path_parse() macroKuninori Morimoto1-21/+22
Current R-Car sound supports only SRC/SSI, but, other module will be supported. This patch adds rsnd_path_parse() macro to share code Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoC: rsnd: remove compatibility codeKuninori Morimoto4-144/+33
Now, all platform is using new style rsnd_dai_platform_info. Keeping compatibility is no longer needed. We can cleanup code. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoC: rsnd: remove old clock style supportKuninori Morimoto1-36/+3
All platform which used old style was switched to new style. R-Car sound can remove old style clock support, use device dependent clock now. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01ASoC: sh: Migo-R sound needs I2CArnd Bergmann1-1/+1
The WM8978 driver needs I2C to be enabled, so the SND_SIU_MIGOR option also requires this. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>