summaryrefslogtreecommitdiff
path: root/sound/soc/sh
AgeCommit message (Collapse)AuthorFilesLines
2018-03-28Merge remote-tracking branches 'asoc/topic/pistachio', 'asoc/topic/pxa', ↵Mark Brown4-6/+66
'asoc/topic/rsnd', 'asoc/topic/rt274' and 'asoc/topic/rt286' into asoc-next
2018-03-21ASoC: rsnd: set pm_ops in hibernate-compatible wayNikita Yushchenko1-2/+1
Use SET_SYSTEM_SLEEP_PM_OPS() macro instead of direct assignment to .suspend and .resume fields. This makes driver working after restore from hibernation. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-13ASoC: rsnd: suppress rsnd_dai_call() debug messageKuninori Morimoto2-1/+20
rsnd_dai_call() is using dev_dbg(), but its message is sometimes blocks nessesary other messages. If RSND_DEBUG_NO_DAI_CALL was defined it will be suppressed by this patch. Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-13ASoC: rsnd: indicate IRQ error status for debugKuninori Morimoto3-3/+45
SSI/SRC have under/over flow error handling, and its status is useful for debuging. But sometimes it might be too much message, and it might blocks necessity other information. To avoid such situation, basically this patch indicates interrupt status debug message if DEBUG was defined, but it will be suppressed if RSND_DEBUG_NO_IRQ_STATUS was defined. Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: sh: siu: replace platform to componentKuninori Morimoto3-13/+8
Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: sh: fsi: replace platform to componentKuninori Morimoto1-19/+5
Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: sh: dma-sh7760: replace platform to componentKuninori Morimoto1-2/+3
Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: sh: rsnd: replace platform to componentKuninori Morimoto1-18/+4
Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-01-05Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown4-167/+172
2017-12-20ASoC: rsnd: fixup ADG register maskKuninori Morimoto1-3/+3
BRGCKR should use 0x80770000, instead of 0x80FF0000. R-Car Gen2 xxx_TIMSEL should use 0x0F1F, R-Car Gen3 xxx_TIMSEL should use 0x1F1F. Here, Gen3 doesn't support AVD, thus, both case can use 0x0F1F. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-11ASoC: rsnd: remove unneeded "is_graph" from __rsnd_dai_probe()Kuninori Morimoto1-3/+3
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-11ASoC: rsnd: PIO related function cleanupKuninori Morimoto1-81/+72
SSI had shared counting pointer position method between PIO/DMA mode before. But now DMA mode is using DMAEngine feature to get it. Thus, this counting pointer position method is needed for only PIO mode. We don't need to share code anymore. This patch names PIO related functions as rsnd_ssi_pio_xxx(), and merged/cleanuped each feature. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-11ASoC: rsnd: don't use runtime->sample_bitsKuninori Morimoto2-14/+7
Current rsnd driver is judging 16bit/24bit data by using runtime->sample_bits, but it is indicating physical size, not format size. This is confusable code. This patch uses snd_pcm_format_width() to be more correct code. Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-08ASoC: rsnd: more clear rsnd_get_dalign() for DALIGNKuninori Morimoto1-23/+10
On Renesas sound device, DALIGN which exchanges channel position is needed because SW and HW are using defferent data order if 16bit data. It is not needed when 24bit data. rsnd_get_dalign() returns necessary value, but it was confusable code. This patch makes it more simple. Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-08ASoC: rsnd: ssi: remove unnesessary period_posJiada Wang1-6/+3
period_pos can always be calculated by byte_pos and byte_per_period, there is no reason to maintain this variable in rsnd_dai_stream. This patch removes period_pos from rsnd_ssi and calculates next_period_byte with consideration of actual byte_pos value. Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-08Merge branch 'fix/rcar' of ↵Mark Brown2-7/+14
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar
2017-12-08ASoC: rsnd: ssi: fix race condition in rsnd_ssi_pointer_updateJiada Wang1-6/+10
Currently there is race condition between set of byte_pos and wrap it around when new buffer starts. If .pointer is called in-between it will result in inconsistent pointer position be returned from .pointer callback. This patch increments buffer pointer atomically to avoid this issue. Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Reviewed-by: Takashi Sakamoto <takashi.sakamoto@miraclelinux.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-29ASoC: rsnd: dma.c: spin lock is no longer needed in IRQ handlerKuninori Morimoto1-18/+0
DMA handler had needed to calculate pointer before, but it doesn't need now. Thus, we can remove unnecessary spin lock from DMAC handler. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-29ASoC: rsnd: TDM 6ch needs 8ch clock for hw refineKuninori Morimoto2-27/+80
Renesas sound needs 8ch clock if TDM 6ch mode, and needs 2ch clock for 6ch or 8ch sound if Multi SSI mode. And these are related to before/after CTU (= Channel Transfer Unit). To calculate these we already has rsnd_runtime_channel_for_ssi() which returns runtime necessary channels. But, it based on runtime->channels which is not yet set when hw refine. We need to use hw_params instead of runtime->xxx when hw refine, and it is not needed after runtime was set. This patch adds new hw_params on rsnd_dai_stream, and it will be removed on rsnd_hw_params(). This is very temporary durty code, but it seems no choice at this point. Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-28ASoC: rsnd: call snd_soc_disconnect_sync() when removeKuninori Morimoto1-0/+2
Renesas R-Car sound driver should be stopped if unbinded during playbacking/capturing. Otherwise clock open/close counter mismatch happen. One note is that we can't skip from remove function (= return -Exxx) in such case if user used unbind. Because unbind function doesn't check return value from each driver's remove function. This means we must to stop and remove driver in remove function. Now ASoC has snd_soc_disconnect_sync() for this purpose. Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-28ASoC: rsnd: ssiu: clear SSI_MODE for non TDM Extended modesJiada Wang1-1/+4
register SSI_MODE is set when SSI works in TDM Extended, but it isn't reset when SSI starts to work in other modes, thus causes issues. This patch clearss SSI_MODE register when SSI works in modes other than TDM Extended. Fixes: 186fadc132f0 ("ASoC: rsnd: add TDM Extend Mode support") Signed-off-by: Jiada Wang <jiada_wang@mentor.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-16ASoC: rcar: revert IOMMU support so farKuninori Morimoto2-82/+8
commit 4821d914fe74 ("ASoC: rsnd: use dma_sync_single_for_xxx() for IOMMU") had supported IOMMU, but it breaks normal sound "recorde" and both PulseAudio's "playback/recorde". The sound will be noisy. That commit was using dma_sync_single_for_xxx(), and driver should make sure memory is protected during CPU or Device are using it. But if driver returns current "residue" data size correctly on pointer function, player/recorder will access to protected memory. IOMMU feature should be supported, but I don't know how to handle it without memory cache problem at this point. Thus, this patch simply revert it to avoid current noisy sound. Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Tested-by: Ryo Kodama <ryo.kodama.vz@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-11Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fallthrough', ↵Mark Brown1-8/+3
'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/graph' into asoc-next
2017-11-11Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown8-188/+400
2017-11-11Merge tag 'asoc-fix-v4.14-rc6' into asoc-linusMark Brown2-3/+6
ASoC: Fixes for v4.14 I've been quite lax in sending these due to conference season but here's a fairly large collection of ASoC updates. The one thing that's not device specific is Takashi's fix for races between delayed work and PCM destruction, otherwise everything is specific to an individual device. # gpg: Signature made Thu 26 Oct 2017 15:11:23 BST # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" [unknown] # gpg: aka "Mark Brown <broonie@debian.org>" [unknown] # gpg: aka "Mark Brown <broonie@kernel.org>" [unknown] # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" [unknown] # gpg: aka "Mark Brown <broonie@linaro.org>" [unknown] # gpg: aka "Mark Brown <Mark.Brown@linaro.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0
2017-11-06ASoC: rsnd: return -EIO if rsnd_dmaen_request_channel() failedKuninori Morimoto1-3/+1
PTR_ERR(NULL) is success. Normally when a function returns both NULL and error pointers, it means that NULL is not a error. But, rsnd_dmaen_request_channel() returns NULL if requested resource was failed. Let's return -EIO if rsnd_dmaen_request_channel() was failed on rsnd_dmaen_nolock_start(). This patch fixes commit edce5c496c6a ("ASoC: rsnd: Request/Release DMA channel eachtime") 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>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01ASoC: rsnd: remove NULL check from rsnd_mod_name()/rsnd_mod_id()Kuninori Morimoto3-17/+21
Current rsnd driver has rsnd_mod_id() which returns mod ID, and it returns -1 if mod was NULL. In the same time, this driver has rsnd_mod_name() which returns mod name, and it returns "unknown" if mod or mod->ops was NULL. Basically these "mod" never be NULL, but the reason why rsnd driver has such behavior is that DMA path finder is assuming memory as "mod == NULL". Thus, current DMA path debug code prints like below. Here "unknown[-1]" means it was memory. ... rcar_sound ec500000.sound: unknown[-1] from rcar_sound ec500000.sound: src[0] to rcar_sound ec500000.sound: ctu[2] rcar_sound ec500000.sound: mix[0] rcar_sound ec500000.sound: dvc[0] rcar_sound ec500000.sound: ssi[0] rcar_sound ec500000.sound: audmac[0] unknown[-1] -> src[0] ... 1st issue is that it is confusable for user. 2nd issue is rsnd driver has something like below code. mask |= 1 << rsnd_mod_id(mod); Because of this kind of code, some statically code checker will reports "Shifting by a negative value is undefined behaviour". But this "mod" never be NULL, thus negative shift never happen. To avoid these issues, this patch adds new dummy "mem" to indicate memory, and use it to indicate debug information, and, remove unneeded "NULL mod" behavior from rsnd_mod_id() and rsnd_mod_name(). The debug information will be like below by this patch ... rcar_sound ec500000.sound: mem[0] from rcar_sound ec500000.sound: src[0] to rcar_sound ec500000.sound: ctu[2] rcar_sound ec500000.sound: mix[0] rcar_sound ec500000.sound: dvc[0] rcar_sound ec500000.sound: ssi[0] rcar_sound ec500000.sound: audmac[0] mem[0] -> src[0] ... Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-01ASoC: rsnd: rsnd_ssi_run_mods() needs to care ssi_parent_modKuninori Morimoto1-3/+8
SSI parent mod might be NULL. ssi_parent_mod() needs to care about it. Otherwise, it uses negative shift. This patch fixes it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-31ASoC: rsnd: Don't check SSISR::DIRQ when CaptureKuninori Morimoto1-6/+9
When stop case, it was Playback, it need to check all data were completely sent. But in Capture case, it might not receive data anymore. SSISR::DIRQ check is not need for Capture case. Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-31ASoC: rsnd: use snd_pcm_running() in rsnd_io_is_working()Kuninori Morimoto1-1/+4
Let's use more common style to checking running/working Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-31ASoC: rsnd: NULL check is not needed for clk_unprepare()Kuninori Morimoto1-2/+1
clk_unprepare() is checking parameter by IS_ERR_OR_NULL(). clk NULL check is not needed on rsnd_mod_quit() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-31ASoC: rsnd: tidyup rsnd_mod_next() for loop methodKuninori Morimoto1-4/+2
Let's remove point less "continue" Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-31ASoC: rsnd: don't use io->mod[] directlyKuninori Morimoto1-1/+1
We have rsnd_io_to_mod() macro. Let's use it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-13ASoC: rsnd: more clear ADG clock debug infoKuninori Morimoto1-18/+41
ADG inputs clock from CLK{A,B,C,I} and outputs clock from CLKOUT{0,1,2,3} which is selected by BRG{A,B}. Now, ADG is assuming BRGA is for 44100Hz related clocks, BRGB is for 48000Hz related clocks. Clock related debug is very difficult/confusable. This patch cleanups clock related debug info. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-11ASoC: rsnd: add rsnd_kctrl_xxx() macroKuninori Morimoto4-54/+59
Current CTU/MIX/DVC are directly using rsnd_kctrl_cfg_m/s to control val etc, but it is difficult to read/understand. And there was no uniformity in access method. This patch adds new rsnd_kctrl_xxx() and implements uniformed access method. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-04ASoC: fsi: Use of_device_get_match_data() helperGeert Uytterhoeven1-8/+3
Use the of_device_get_match_data() helper instead of open coding. Note that when used with DT, there's always a valid match. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-04ASoC: rsnd: add MIX Volume Ramp supportKuninori Morimoto3-7/+154
Both DVC/MIX have Volume Ramp Control. This patch supprts MIX Volume Ramp. One note is that main purpose of MIX Volume Ramp is to reduce noise, thus, MIX Ramp range is very few if you compare to DVC Volume Ramp (DVC = 5bit, MIX = 4bit). You can use MIX Volume Ranp like below amixer set "MIX Ramp Up Rate" "0.125 dB/1 step" amixer set "MIX Ramp Down Rate" "0.125 dB/1 step" amixer set "MIX Ramp" on aplay xxx.wav & amixer set "MIX",0 80% // DAI0 Volume Down amixer set "MIX",1 100% // DAI1 Volume Up Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-04ASoC: rsnd: makes volume ramp rate list genericKuninori Morimoto3-31/+36
DVC is supporting Volume Ramp Rate, and MIX has Volume Ramp but not yet supported. To support MIX Volume Ramp, we want to share Rate List since DVC/MIX are using almost same list. This patch move DVC specific Volume Ramp Rate List to core.c. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-04ASoC: rsnd: CTU kctrl sets onceKuninori Morimoto1-0/+8
Same CTU might be used few times if system/platform is using MIX. For example below case. DAI0 playback = <&src0 &ctu02 &mix0 &dvc0 &ssi0>; DAI1 playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>; This case, ALSA will have CTU,0 and CTU,1 kcontrol interfaces, but these are same CTU. This is confusing. This patch adds new flags and avoid such case. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-04ASoC: rsnd: DVC kctrl sets onceKuninori Morimoto1-0/+8
Same DVC might be used few times if system/platform is using MIX. For example below case. DAI0 playback = <&src0 &ctu02 &mix0 &dvc0 &ssi0>; DAI1 playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>; This case, ALSA will have DVC,0 and DVC,1 kcontrol interfaces, but these are same DVC. This is confusing. This patch adds new flags and avoid such case. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-04ASoC: rsnd: use generic rsnd_flags_xxx() macro on ADGKuninori Morimoto1-7/+6
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-04ASoC: rsnd: add generic rsnd_flags_xxx() macroKuninori Morimoto2-15/+16
SSI is using rsnd_ssi_flags_xxx() macro to control flags. But it is useful macro not only for SSI. This patch replace it to more generic rsnd_flags_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-03ASoC: rcar: skip disabled-SSI nodesKuninori Morimoto1-1/+4
The current device tree representation of the R-Car SSI assumes that they are numbered consecutively, starting from 0. Alas, this is not the case with the R8A77995 (D3) SoC which SSI1/SSI2 aren't present. In order to keep the existing device trees working, I'm suggesting to use a disabled node for SSI0/SSI1. Teach the SSI probe to just skip disabled nodes. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-21ASoC: rsnd: add rsnd_dma_alloc()Kuninori Morimoto1-27/+33
R-Car sound DMA will be used from SSI/SRC. dma.c doesn't alloc DMA handler in .probe timing, because we don't know what kind of DMA transfer will be used then. Thus, SSI/SRC have *rsnd_mod for DMA. rsnd_dma_attach() will allocate it and attach it to system. It will be PIO mode if it can't alloc DMA handler. In case of MIX is used, rsnd_dma_attach() will be called twice from SSI. To avoid duplicate allocation, current rsnd_dma_attach() is checking allocated DMA handler. This DMA related operation is a little bit difficult to understand. This patch adds new rsnd_dma_alloc() and separates allocation and attach for readable code. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-13ASoC: rsnd: fix ADG flagsKuninori Morimoto1-2/+2
Current ADG driver is over-writing flags. This patch fixes it. Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-01Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/es8316', ↵Mark Brown1-4/+2
'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/hdmi' into asoc-next
2017-09-01Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown16-127/+136
2017-09-01Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linusMark Brown3-16/+44
2017-08-22ASoC: rsnd: remove unused rsnd_xxx_to_dma()Kuninori Morimoto2-2/+0
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>