summaryrefslogtreecommitdiff
path: root/sound/soc/sh
AgeCommit message (Collapse)Author
2016-09-29Merge remote-tracking branches 'asoc/topic/nau8810', 'asoc/topic/of-bool', ↵Mark Brown
'asoc/topic/omap' and 'asoc/topic/platform-drvdata' into asoc-next
2016-09-29Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown
2016-09-29ASoC: rsnd: add SNDRV_PCM_TRIGGER_SUSPEND/RESUMEKuninori Morimoto
This patch adds SNDRV_PCM_TRIGGER_SUSPEND/RESUME. Otherwise, it breaks rsnd driver internal start/stop counter when suspend/resume. This issue was reported/tested by Hiep Tested-by: Hiep Cao Minh <cm-hiep@jinso.co.jp> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-24Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linusMark Brown
2016-08-24ASoC: rsrc-card: rename rsrc-card to simple-scu-card phase3Kuninori Morimoto
rsrc-card which is using DPCM feature was created for Renesas sound. But not only Renesas, but many SoC can use this driver, because it is based on simple-card driver. To use it as more open driver, rsrc-card will be renamed to simple-scu-card. In order to easy patch review, as 3rd step, this patch moves rsrc-card driver to generic folder. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-24ASoC: rsrc-card: rename rsrc-card to simple-scu-card phase2Kuninori Morimoto
rsrc-card which is using DPCM feature was created for Renesas sound. But not only Renesas, but many SoC can use this driver, because it is based on simple-card driver. To use it as more open driver, rsrc-card will be renamed to simple-scu-card. In order to easy patch review, as 2nd step, this patch adds new compatible "simple-scu-audio-card"; rcar-card used specific property, not "simple-audio-card", but it should be now. Actually, rsrc-card is upstreamed driver, but noone is using it on upstream. The user is only local, and it is only me. Thus, there is no compatible break by this patch. This patch uses "simple-audio-card" prefix. And it removes rcar-card specifix compatible too. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-24ASoC: rsrc-card: rename rsrc-card to simple-scu-card phase1Kuninori Morimoto
rsrc-card which is using DPCM feature was created for Renesas sound. But not only Renesas, but many SoC can use this driver, because it is based on simple-card driver. To use it as more open driver, rsrc-card will be renamed to simple-scu-card. In order to easy patch review, as 1st step, this patch renames "rsrc" function prefix to "asoc_simple". Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-24ASoC: rsrc-card: remove board specific compatibleKuninori Morimoto
rsrc-card has board specific compatible (= lager/koelsh), but these were created as 1st prototype, and it is used in my test environment only. Now normal user can use generic compatible (= renesas,rsrc-card). Removing these board specific compatible doesn't breake compatibility. This patch remove these. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-24Merge branch 'topic/simple' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar
2016-08-11ASoC: fix W=1 build warningsBaoyou Xie
We get 1 warning about global functions without a declaration in the ASoC sub-system when building with W=1: sound/soc/sh/rcar/core.c:113:6: warning: no previous prototype for 'rsnd_mod_make_sure' [-Wmissing-prototypes] void rsnd_mod_make_sure(struct rsnd_mod *mod, enum rsnd_mod_type type) In this case, the function 'rsnd_mod_make_sure' is declared in rsnd.h file, but it only valid if the macro DEBUG is claimed. so the implementation of function 'rsnd_mod_make_sure' need be held by macro DEBUG. Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-10ASoC: rsrc-card: use asoc_simple_card_clean_reference()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-10ASoC: rsrc-card: use asoc_simple_card_canonicalize_cpu()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-09ASoC: rsrc-card: use asoc_simple_card_canonicalize_dailink()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-09ASoC: rsrc-card: use asoc_simple_card_init_dai()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: use of_property_read_boolJulia Lawall
Use of_property_read_bool to check for the existence of a property. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression e1,e2; statement S2,S1; @@ - if (of_get_property(e1,e2,NULL)) + if (of_property_read_bool(e1,e2)) S1 else S2 // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-08ASoC: rsrc-card: use asoc_simple_card_parse_dai()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-08-05ASoC: rsrc-card: use asoc_simple_card_parse_clk()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-27ASoC: rsnd: Fixup SRCm_IFSVR calculate methodHiroyuki Yokoyama
This patch fixes the calculation accuracy degradation of SRCm_IFSVR register value. Signed-off-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>
2016-07-24Merge remote-tracking branches 'asoc/topic/omap', 'asoc/topic/rcar' and ↵Mark Brown
'asoc/topic/rockchip' into asoc-next
2016-07-16ASoC: rsrc-card: use asoc_simple_card_parse_card_name()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-16ASoC: rsrc-card: use asoc_simple_dai instead of rsrc_card_daiKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-16ASoC: rsrc-card: use asoc_simple_card_parse_dailink_name()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-07-16Merge branch 'topic/simple' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rcar
2016-07-01Merge remote-tracking branches 'asoc/fix/rcar', 'asoc/fix/rt5670' and ↵Mark Brown
'asoc/fix/wm8940' into asoc-linus
2016-07-01ASoC: rsrc-card: use asoc_simple_card_parse_daifmt()Kuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-13ASoC: rcar: fix 'const static' variablesArnd Bergmann
When building with 'make W=1', we get a harmless warning about slightly incorrect prototypes in the rcar audio driver: sound/soc/sh/rcar/gen.c: In function 'rsnd_gen2_probe': sound/soc/sh/rcar/gen.c:209:2: error: 'static' is not at beginning of declaration [-Werror=old-style-declaration] This changes the 'const static' to 'static const' as it should be. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-09ASoC: rsnd: adg :: AUDIO-CLKOUTn asynchronizes supportKuninori Morimoto
AUDIO-CLKOUTn can asynchronizes with L/R clock. AUDIO-CLKOUTn synchronizes with L/R clock is now default behavior. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-30ASoC: rsrc-card: remove unused dai_numKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-27ASoC: rsnd: open 31bit of SSICKR maskKuninori Morimoto
SSICKR (Gen2) / BRGCKR (Gen3) 31bit mask should be opened, because BRGB (= for 48kHz) might select it. Special thanks Yokoyama-san 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>
2016-05-12rcar: src: skip disabled-SRC nodesSergei Shtylyov
The current device tree representation of the R-Car Sample Rate Converters (SRC) assumes that they are numbered consecutively, starting from 0. Alas, this is not the case with the R8A7794 SoC where SRC0 isn't present. In order to keep the existing device trees working, I'm suggesting to use a disabled node for SRC0. Teach the SRC probe to just skip disabled nodes. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-10ASoC: rsnd: don't use prohibited number to PDMACHCRn.SRSKuninori Morimoto
Current rsnd_dmapp_get_id() returns 0xFF as error code if system used strange connection. It will be used as PDMACHCRn.SRS, but 0xFF is prohibited number. In order not to use prohibited number, this patch indicates error message and returns 0x00 (same as SSI00) in error case. Special thanks to Dung-san. Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-04-28ASoC: rsnd: count .probe/.remove for rsnd_mod_call()Kuninori Morimoto
Current rsnd_mod_call is counting its calling count to avoid unbalanced function pair calling for error cases (ex init <-> quit). SSI parent is now controlled as "mod" on current rsnd driver. Because of this reason, SSI .remove function will be called twice if it was used as SSI parent when user tried unbind. But probe/remove pair were not counted. This patch counts probe/remove functions to avoid it. Special thans Hiep Reported-by: Hiep Cao Minh <cm-hiep@jinso.co.jp> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-04-20ASoC: rsnd: Remove CLK_IS_ROOTStephen Boyd
This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-12ASoC: rsnd: add simplified module explanationKuninori Morimoto
Renesas sound driver user needs to read its datasheet when create DT. But it is difficult to understand, because it has many modules (SRC/CTU/MIX/DVC/SSIU/SSI/AudioDMAC/AudioDMACperiperi), and many features (Asynchronous/Synchronous mode on SRC, CTU matrix, DVC volume settings feature, Multi-SSI/TDM-SSI, etc). This patch adds simplified explanation to help setting/understanding. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-07ASoC: rsnd: CMD TIMSEL support for CaptureKuninori Morimoto
CMD.out should use same as SRC.out for TIMSEL settings, but it cares Playback case only. This patch fixup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-07ASoC: rsnd: SRC TIMSEL support for CaptureKuninori Morimoto
SRC has Sync/Async mode, and it can't use Sync mode when Capture with CMD. In Async mode, it needs to care about in/out SRC rate for settings, but current driver supporting Playback case only. This patch supports Capture case. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-07ASoC: rsnd: add rsnd_src_get_in/out_rate()Kuninori Morimoto
SRC will convert rate, and then, CMD and SSI want to know its rate (= SRC.in / SRC.out) for each purpose. Current driver is supporting only Playback, but SRC+Capture support needs more flexibility. This patch adds rsnd_src_get_in/out_rate() for it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-07ASoC: rsnd: rename rsnd_enable_sync_convert() to rsnd_src_sync_is_enabled()Kuninori Morimoto
rsnd_enable_sync_convert() is for checking, not for setting. In order to avoid confusion, this patch renamed it to rsnd_src_sync_is_enabled() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-07ASoC: rsnd: SRC function parameter uses "mod" instead of "src"Kuninori Morimoto
To reduce confusion, SRC uses "mod" instead of "src" as function parameter Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-07ASoC: rsnd: SRC sync mode is not related to clock master modeKuninori Morimoto
SRC sync mode needs to control its clock (= for in/out). 1st but codec side clock Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-07ASoC: rsnd: don't enable SRC Sync mode when Capture with CMDKuninori Morimoto
It can't use SRC Synchronous convert when Capture if it uses CMD, because no one provide out side clocks. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-05ASoC: rsnd: add CTU supportKuninori Morimoto
This patch adds CTU (= Channel Transfer Unit) support on Renesas R-Car sound driver. It can Down/Up mixing and splitter. You need to check R-Car datasheet especially CTUn_CPMDR/CTUn_SV0xR/CTUn_SV1xR/CTUn_SV2xR/CTUn_SV3xR for setting parameter. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-05ASoC: rsnd: add rsnd_runtime_channel_xxx()Kuninori Morimoto
Current SSI is supporting Normal SSI/Multi mode SSI/TDM mode SSI and its behavior is based on input channels. This input channel might be converted by CTU, and SSI needs to be Multi SSI mode / TDM SSI mode if 6ch input EX) 6ch input, CTU for 2ch, playback 6ch 6ch 2ch 2ch 2ch 2ch -> SRC -> CTU -> MIX -> DVC -> SSIU -> SSI EX) 6ch input, no CTU, Multi SSI, playback 6ch 6ch 6ch 6ch 6ch 2ch -> SRC -> CTU -> MIX -> DVC -> SSIU -> SSI0/SSI1/SSI2 Current driver is using rsnd_get_adinr_chan() / rsnd_get_slot_width() for this purpose, but it is complicated enough without meaning. This patch adds new rsnd_runtime_channel_xxx() which is caring CTU/Multi SSI. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-05ASoC: rsnd: add CTU basic supportKuninori Morimoto
This patch adds Renesas R-Car sound CTU (= Channel Transfer Unit) very basic support, but not yet enough feature at this point. Because CTU support needs more complex channel function for each modules. To avoid complex patch reviewing, this patch picked up very basic part only. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-05ASoC: rsnd: tidyup rsnd_ssiu_init_gen2()Kuninori Morimoto
remove unnecessary variable Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-05ASoC: rsrc-card: add convert channels supportKuninori Morimoto
Renesas sound device has CTU (= Channel Transfer Unit), and sound card needs its support. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-05ASoC: rsnd: don't call update callback if it was NULLKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-02ASoC: sh: rcar: rsrc-card: don't open code of_device_get_match_data()Wolfram Sang
This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-02ASoC: sh: rcar: core: don't open code of_device_get_match_data()Wolfram Sang
This change will also make Coverity happy by avoiding a theoretical NULL pointer dereference; yet another reason is to use the above helper function to tighten the code and make it more readable. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-02ASoC: rsnd: rsnd_write() / rsnd_bset() uses regmap _force_ functionKuninori Morimoto
Some R-Car sound requests picky register access which needs *force* register write. Some status register needs to set 1 to clear status, but we might read 1 from its register. In such case, current regmap does nothing and driver will be forever loop To reduce code complexity, this patch uses regmap _force_ function for all register access. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>