summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2014-12-10Merge tag 'v3.14.26' into backport/v3.14.24-ltsi-rc1+v3.14.26/snapshot-merge.wipSimon Horman6-21/+74
This is the 3.14.26 stable release Conflicts: Makefile
2014-12-06ALSA: usb-audio: Add ctrl message delay quirk for Marantz/Denon devicesJurgen Kramer1-0/+14
commit 6e84a8d7ac3ba246ef44e313e92bc16a1da1b04a upstream. This patch adds a USB control message delay quirk for a few specific Marantz/Denon devices. Without the delay the DACs will not work properly and produces the following type of messages: Nov 15 10:09:21 orwell kernel: [ 91.342880] usb 3-13: clock source 41 is not valid, cannot use Nov 15 10:09:21 orwell kernel: [ 91.343775] usb 3-13: clock source 41 is not valid, cannot use There are likely other Marantz/Denon devices using the same USB module which exhibit the same problems. But as this cannot be verified I limited the patch to the devices I could test. The following two devices are covered by this path: - Marantz SA-14S1 - Marantz HD-DAC1 Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06ASoC: dpcm: Fix race between FE/BE updates and triggerTakashi Iwai1-16/+56
commit ea9d0d771fcd32cd56070819749477d511ec9117 upstream. DPCM can update the FE/BE connection states totally asynchronously from the FE's PCM state. Most of FE/BE state changes are protected by mutex, so that they won't race, but there are still some actions that are uncovered. For example, suppose to switch a BE while a FE's stream is running. This would call soc_dpcm_runtime_update(), which sets FE's runtime_update flag, then sets up and starts BEs, and clears FE's runtime_update flag again. When a device emits XRUN during this operation, the PCM core triggers snd_pcm_stop(XRUN). Since the trigger action is an atomic ops, this isn't blocked by the mutex, thus it kicks off DPCM's trigger action. It eventually updates and clears FE's runtime_update flag while soc_dpcm_runtime_update() is running concurrently, and it results in confusion. Usually, for avoiding such a race, we take a lock. There is a PCM stream lock for that purpose. However, as already mentioned, the trigger action is atomic, and we can't take the lock for the whole soc_dpcm_runtime_update() or other operations that include the lengthy jobs like hw_params or prepare. This patch provides an alternative solution. This adds a way to defer the conflicting trigger callback to be executed at the end of FE/BE state changes. For doing it, two things are introduced: - Each runtime_update state change of FEs is protected via PCM stream lock. - The FE's trigger callback checks the runtime_update flag. If it's not set, the trigger action is executed there. If set, mark the pending trigger action and returns immediately. - At the exit of runtime_update state change, it checks whether the pending trigger is present. If yes, it executes the trigger action at this point. Reported-and-tested-by: Qiao Zhou <zhouqiao@marvell.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06ASoC: wm_adsp: Avoid attempt to free buffers that might still be in useCharles Keepax1-0/+1
commit 9da7a5a9fdeeb76b2243f6b473363a7e6147ab6f upstream. We should not free any buffers associated with writing out coefficients to the DSP until all the async writes have completed. This patch updates the out of memory path when allocating a new buffer to include a call to regmap_async_complete. Reported-by: JS Park <aitdark.park@samsung.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06ASoC: sgtl5000: Fix SMALL_POP bit definitionFabio Estevam2-3/+2
commit c251ea7bd7a04f1f2575467e0de76e803cf59149 upstream. On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound to happen 5 seconds after the end of a playback. The SMALL_POP bit should fix this, but its definition is incorrect: according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not bit 1. Fix the definition accordingly and enable the bit as intended per the code comment. After applying this change, no loud 'click' sound is heard after playback Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06ASoC: fsi: remove unsupported PAUSE flagKuninori Morimoto1-2/+1
commit c1b9b9b1ad2df6144ca3fbe6989f7bd9ea5c5562 upstream. FSI doesn't support PAUSE. Remove SNDRV_PCM_INFO_PAUSE flags from snd_pcm_hardware info Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-06ASoC: rsnd: remove unsupported PAUSE flagKuninori Morimoto1-2/+1
commit 706c66213e5e623e23f521b1acbd8171af7a3549 upstream. R-Car sound doesn't support PAUSE. Remove SNDRV_PCM_INFO_PAUSE flags from snd_pcm_hardware info Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-05Merge tag 'backport/v3.14.24-ltsi-rc1/rcar-snd-to-next-20141121' into ↵Simon Horman6-67/+338
backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip
2014-12-05Merge tag 'backport/v3.14.24-ltsi-rc1/rcar-snd-to-v3.18-rc6' into ↵Simon Horman1-2/+1
backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip
2014-12-05Merge tag 'backport/v3.14.24-ltsi-rc1/codecs-20141124' into ↵Simon Horman1-34/+63
backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wip
2014-12-05Merge tag 'v3.14.25' into backport/v3.14.24-ltsi-rc1+v3.14.25/snapshot-merge.wipSimon Horman1-0/+6
This is the 3.14.25 stable release Conflicts: Makefile
2014-12-05ASoC: rsnd: Add Volume Ramp supportKuninori Morimoto3-3/+93
This patch adds Volume Ramp to Renesas sound driver. amixer set "DVC Out" 100% amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps" amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps" amixer set "DVC Out Ramp" on aplay xxx.wav & amixer set "DVC Out" 80% // Volume Down amixer set "DVC Out" 100% // Volume Up Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 3539cacff2031f6d47881c5f3a4932b0ad5ec224) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: fallback to PIO mode if DMA mode was failedKuninori Morimoto2-4/+85
Current Renesas R-Car sound driver probe will be failed if it try to use DMA mode and it couldn't use for some reasons. But PIO mode works even though in such case. This patch try to fallback to PIO mode if DMA mode probing was failed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit d3a768233243b5892a9c74b85896b9e8c017b259) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: tidyup debug message format and timingKuninori Morimoto5-18/+29
Current Renesas R-Car sound driver debug message is using random format (ex "ssi0: xxx" / "SSI0 xxx" / "ssi[0]: xxx") and confusable timing ("xxx probe failed" and "xxx probed" are shown in same time) This patch fixes these Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 30cc4faf703955cd5cd07da489bd817ae43e3fec) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: enable enumerated DVC valume settingsKuninori Morimoto1-11/+44
DVC controls some digital volume features. Volume Ramp is listed as "XX dB / YY steps", and this enumerated settings are easy for users. This patch adds rsnd_dvc_cfg_e and care about enumerated settings. Compiler will report like below at this point, but, it will be removed if Volume Ramp was supported. warning: '_rsnd_dvc_pcm_new_e' defined but not used Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 018342976ce971944dd4d9309f75e86382079a2b) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: enable single DVC valume settingsKuninori Morimoto1-0/+18
DVC controls some digital volume features. Some of them requests values for "each channels", but, some of them requests values for "feature". And, Volume Ramp has "feature" settings. This patch adds rsnd_dvc_cfg_s and care about single settings. Compiler will report like below at this point, but, it will be removed if Volume Ramp was supported. warning: '_rsnd_dvc_pcm_new_s' defined but not used Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit ab2e479667507329475c8ef93d61f3dbe654c3c2) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: enable multiple DVC valume settingsKuninori Morimoto1-14/+30
DVC controls some digital volume features. Some of them requests values for "each channels", but, some of them requests values for "feature". Current dvc.c is supporting Mute/Volume, and these have "each channels" settings. This patch adds rsnd_dvc_cfg_m and care about multiple settings for each channels. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit ec14af91a03f7d68b2a72bec20be2ab583d3f63a) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: move DVC_DVUER settings under rsnd_dvc_volume_update()Kuninori Morimoto1-2/+6
We need to Enable/Disable DVC_DVUER register if we set DVCp_ZCMCR, DVCp_VRCTR, DVCp_VRPDR, DVCp_VRDBR, DVCp_VOL0R, DVCp_VOL1R, DVCp_VOL2R, DVCp_VOL3R, DVCp_VOL4R, DVCp_VOL5R, DVCp_VOL6R, DVCp_VOL7R and, these are controlled under rsnd_dvc_volume_update(). This patch moves DVC_DVUER settings to it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 140bab8961eb4047070b46a6dd50ec87496e0cde) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: control DVC_DVUCR under rsnd_dvc_volume_update()Kuninori Morimoto1-4/+10
rsnd_dvc_volume_update() is main function to control DVC feature like Digital Volume / Mute / Ramp etc. DVC_DVUCR should be controlled under this function. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 1c5d1c988302f324ac396ac13461d59d091be605) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: add struct rsnd_dvc_cfg and control DVC settingsKuninori Morimoto1-26/+25
DVC can control Digital Volume / Mute / Volume Ramp etc, and these uses different max value. Current driver is using fixed max value for each settings. This patch adds new struct rsnd_dvc_cfg, and control these. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 92b9a6991b2e3a4ccf5ffc956730d36835d53a79) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: tidyup RSND_DVC_VOLUME_NUM to RSND_DVC_CHANNELSKuninori Morimoto1-8/+8
RSND_DVC_VOLUME_NUM means DVC channel number. This patch tidyups this un-understandable naming Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 9960ce97432bdb1defc76ed80ac19e37e8778bc6) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: tidyup debug information when read/writeKuninori Morimoto1-7/+20
b8c637864a6904a9ba8e0df556d5bdf9f26b2c54 (ASoC: rsnd: use regmap_mmio instead of original regmap bus) added regmap_mmio support on Renesas R-Car sound driver. Then, debug information of register read/write indicates regmap index, not register address. This is a little bit confusable information. This patch tidyup debug message, and added regmap debug hint on comment area. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit ace0eb1e91a75b84b1be3d610b79509a5bd94df1) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: rsnd: remove unsupported PAUSE flagKuninori Morimoto1-2/+1
R-Car sound doesn't support PAUSE. Remove SNDRV_PCM_INFO_PAUSE flags from snd_pcm_hardware info Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org (cherry picked from commit 706c66213e5e623e23f521b1acbd8171af7a3549) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: codecs: Make OF supported CODECs visible in KconfigMark Brown1-34/+63
Now that we have a generic card driver we can't rely on the card driver selecting the CODECs for us so make the CODECs that can be enabled with OF directly selectable in Kconfig. For the platforms not using OF it's not clear that we don't still want to have some board specific selection since the kernel needs to contain code to register the devices; ACPI could provide this from firmware does not yet support any kind of generic card. It may also be desirable to hide these if OF is not enabled to reduce noise. Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 1291e14175e6b83efe1464f32189acb21bc4be09) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit a493b6a637e9d8e828d7ed4be4bdf24dfd1f9250) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit c8e6e960733f4a5835265c15429fced4d2f1595e) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: ak4642: Make of_device_id array constKiran Padwal1-2/+2
Make of_device_id array const, because all OF functions handle it as const Signed-off-by: Kiran Padwal <kiran.padwal21@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 27204ca8b981160c3b65cdc226c9070f76cbbd36) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit ffb83e8cb14cace1b08ceb56695b580c808d8a41) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit cd2b65741e72da64508957cd1cde85116102d8dd) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 486b09c750e58777976ad74a37de7b4252630332) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 1a7889ca8aba333d7c74fad543d692c31bc7f280) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 7c63f3c02f5a998621758239abed43c5bd454b70) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 4f8f86aa41232cc4595136f18013324482fdf749) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 1cc7195929501b96fccce42646f1ad0ffe2598a6) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 054cd7f4b986a941b56372b743602f7df6569c98) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit b8c637864a6904a9ba8e0df556d5bdf9f26b2c54) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit d62a3dcd4d75b1713d12697afdbffaf9a9da8f43) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 2bf865ba30405056e7922b960a1687bb4d5a4999) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 34cb6123f90d264d63bdcd3ee0df0d2cb4b36aab) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 340371005d399b595f4044fc5e336f4a66ead101) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 37523034851d6a4b1dc951e24bf2f11bc28fe58d) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 65f459923b7926f6a7f156970d83360bd80cb169) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit ccd01559ead29b59918458e9b412ff18b88fc6cf) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit d9288d0ba12de1b5efb830b9128e4cc6877318fc) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit cd7bcc6000165f6215d15e2e32b58a646e5de5ec) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit c08c3b088053cec1465051258844e7934d3e3e37) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 64eae986fc1e3a281b00f04b7c9c00b145ec8a57) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 4cf612780cec81317a0278b28679a8b69ea8f09c) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit ad32d0c7b0e993433df152ae747652647eb65a27) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2014-12-05ASoC: 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> (cherry picked from commit 199e7688bdf7d188d70c3432c96ec13d8a14b341) Signed-off-by: Simon Horman <horms+renesas@verge.net.au>