summaryrefslogtreecommitdiffstats
path: root/sound/soc/sh
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: rsnd: fix usrcnt decrementing bugAndrzej Hajda2015-12-301-13/+14
| | | | | | | | | | | | | | | Field usrcnt is unsigned so it cannot be lesser than zero. The patch fixes the check, moves it to the beginning of the function and changes return value to -EIO in case of usercnt error. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: add Multi channel supportKuninori Morimoto2015-12-225-17/+176
| | | | | | | | | | | | | This patch adds Multi channel support on Renesas R-Car sound. This patch is tested on Salvator-X board, but it can't use Multi channel, because supported format is different between codec chip and R-Car. Thus, it was tested on board which doesn't mount codec chip, with oscilloscope. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: add rsnd_parse_connect_common() and remove complex macroKuninori Morimoto2015-12-182-23/+59
| | | | | | | | | | Current rsnd driver is using complex macro to parse DAI connection. This patch adds new rsnd_parse_connect_common() and replace current macro to it. This is prepare for multi channel support Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: add rsnd_set_slot() / rsnd_get_slot_num()Kuninori Morimoto2015-12-182-3/+21
| | | | | | | | | | TDM will use 6 or 8 slots on 1 SSI, and Multi channel will use 6 or 8 slots on few SSI (each SSI uses 2 slots). Thus, this adds new slot control functions which can be prepare for Multi channel support. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: tidyup rsnd_get_slot_xxx() namingKuninori Morimoto2015-12-185-9/+10
| | | | | | | | | | | | | rsnd_get_slot_rdai() returns total slots (it returns 6 if total 6 channels) , and rsnd_get_slot_extend() returns extended SSI width (it returns 8 if total 6 channels). This will be used on SSI multi channel support too (It will return 2 if total 6 channels with 3 SSI). But, it is using confusable naming. This patch changes rsnd_get_slot_rdai() -> rsnd_get_slot(), rsnd_get_slot_extend() -> rsnd_get_slot_width() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove rsnd_get_slot_runtime()Kuninori Morimoto2015-12-182-16/+4
| | | | | | | | | Current Renesas sound driver is using rsnd_get_slot_runtime(), but it is same as runtime->channels. This patch removes rsnd_get_slot_runtime() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: SSI/SSIU use rsnd_get_slot_extend() to check TDMKuninori Morimoto2015-12-182-2/+2
| | | | | | | | | Current SSI/SSIU are using rsnd_get_slot_runtime() to check TDM, but using rsnd_get_slot_extend() is more sane. This patch fix it up Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: rsnd_dai_connect() returns error if it connect to existing modKuninori Morimoto2015-12-181-0/+3
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: tidyup debug print position on rsnd_dma_attach()Kuninori Morimoto2015-12-181-5/+5
| | | | | | | | It can't output corrent dma name *before* rsnd_mod_init(). It goes to *after* rsnd_mod_init() by this patch Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: tidyup return value of rsnd_get_adinr_bit()Kuninori Morimoto2015-12-181-9/+5
| | | | | | | | | | Renesas sound driver has rsnd_get_adinr_bit/chan() functions. It is assuming _bit() returns ADINR :: OTBL, and _chan() returns ADINR :: CHNUM. Current _bit() returns both OTBL and CHNUM. This patch fixup it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: fixup SSIU control timingKuninori Morimoto2015-12-181-1/+1
| | | | | | | SSIU should be controlled after SSI. This patch fix up it Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsrc-card: tidyup dai format for DPCMKuninori Morimoto2015-12-171-27/+55
| | | | | | | | | | | | | rsrc-card is DPCM supported version of simple-card. Thus it has similar DT format. OTOH, snd_soc_dai_link requests cpu/codec, but one of them will be snd-soc-dummy in DPCM case, and DPCM requests frontend/backend dai_link. This means it might have multi backend/codec. And, SND_SOC_DAIFMT_xxx is based on "codec". Because of these difference, current rsrc card can't detect correct dai_fmt. This patch detect correct dai fmt from 1st "codec". Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsrc-card: Remove support for setting differing DAI formatsKuninori Morimoto2015-12-171-12/+4
| | | | | | | | | 1efb53a220 ("ASoC: simple-card: Remove support for setting differing DAI formats") removed set_fmt support from simple-card. rsrc-card follows same style, because it is based on simple-card. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsrc-card: enable to use tdm_slot on DTKuninori Morimoto2015-12-171-0/+25
| | | | | | | | Renesas sound driver will use tdm slot on TDM Multi Mode support. This patch enables tdm slot on rsrc card driver on DT. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* rcar: mux: Avoid use of ret uninitialisedMark Brown2015-12-151-0/+1
| | | | | | | | | We use ret as the return value from the rsnd_mix_probe() but if there are no child nodes and no errors then we will never initialize ret leading to build warnings. Ensure ret is initialized before we iterate over the child nodes to avoid this. Signed-off-by: Mark Brown <broonie@kernel.org>
* rcar: dvc: Avoid use of ret uninitialisedMark Brown2015-12-151-0/+1
| | | | | | | | | We use ret as the return value from the rsnd_dvc_probe() but if there are no child nodes and no errors then we will never initialize ret leading to build warnings. Ensure ret is initialized before we iterate over the child nodes to avoid this. Signed-off-by: Mark Brown <broonie@kernel.org>
* rcar: ctu: Avoid use of ret uninitialisedMark Brown2015-12-151-0/+1
| | | | | | | | | We use ret as the return value from the rsnd_ctu_probe() but if there are no child nodes and no errors then we will never initialize ret leading to build warnings. Ensure ret is initialized before we iterate over the child nodes to avoid this. Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: tidyup data align position for captureKuninori Morimoto2015-12-084-2/+15
| | | | | | | | | | L/R channel data has been treated as inverted on R-Car sound 16bit mode, Thus, 4689032b1("ASoC: rsnd: tidyup data align position") tidyuped data align position. But it couldn't care about capture case. This patch cares both playback/capture Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: care SWSP bit for TDM/non-TDMKuninori Morimoto2015-12-021-2/+5
| | | | | | | | SSICR::SWSP bit controls WS signal low/high, but in case of TDM it is inverted. This patch solves this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: rsrc-card: check return value of snd_soc_of_get_dai_name()Kuninori Morimoto2015-12-011-2/+6
| | | | | | | | | This patch adds missing check of snd_soc_of_get_dai_name(). It might not be able to use sound card, because it might returns -EPROBE_DEFER. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: fixup wrong snd_soc_dai_driver pointer accessKuninori Morimoto2015-12-011-5/+5
| | | | | | | | | drv pointer should be "base + offset" instead of "current + offset". This patch fixup this issue, otherwise third and subsequent pointer will be broken Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: add TDM Extend Mode supportKuninori Morimoto2015-11-305-5/+54
| | | | | | | | | | | | | | Renesas R-Car can out TDM by 1) 6ch x 1 DAI as TDM Extend Mode 2) 2ch x 4 x 1 DAI as TDM split Mode 3) 2ch x 3 DAI or 2ch x 4 DAI as TDM Multichannel Mode This patch adds 1) TDM Extend Mode. Because of HW design, this 6ch data will be outputed via 8ch data width. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: dvc enables non-stereo soundKuninori Morimoto2015-11-304-4/+31
| | | | | | | | Current DVC is assuming that the sound is always stereo. This patch makes it more flexible Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: ssi enables non-stereo soundKuninori Morimoto2015-11-303-2/+38
| | | | | | | | | | | Current SSI is assuming that the sound is always stereo. But, SSI needs to calculate its frequency when master mode. Then This frequency depends on each SSI's slots, and TDM mode (= TDM Extend Mode, TDM split Mode, TDM Multichannel Mode). This patch enables to use non-stereo sound. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: set SSIWSR setting on rsnd_ssi_config_init()Kuninori Morimoto2015-11-301-2/+3
| | | | | | | | | | | It will have TDM settings on SSIWSR. Actually, we would like to set it on rsnd_ssi_config_init(), but we can't. Because SSI might be used as clock master (It doesn't need to call rsnd_ssi_config_init() when clock master mode). This patch adds new ssi->wsr and set it on rsnd_ssi_start(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: add rsnd_ssi_config_init()Kuninori Morimoto2015-11-301-46/+52
| | | | | | | | | In order to enhance code readability, this patch adds rsnd_ssi_config_init() and moves SSICR register settings to it. This is prepare patch for TDM support Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: dvc: add rsnd_dvc_halt()Kuninori Morimoto2015-11-301-0/+8
| | | | | | | Based on datasheet process Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: mix: add rsnd_mix_halt()Kuninori Morimoto2015-11-301-0/+8
| | | | | | | Based on datasheet process Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: src: add rsnd_src_halt()Kuninori Morimoto2015-11-301-0/+8
| | | | | | | Based on datasheet process Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: dvc: rename rsnd_dvc_soft_reset() to rsnd_dvc_activation()Kuninori Morimoto2015-11-301-2/+2
| | | | | | | Based on datasheet naming Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: mix: rename rsnd_mix_soft_reset() to rsnd_mix_activation()Kuninori Morimoto2015-11-301-2/+2
| | | | | | | Based on datasheet naming Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: src: rename rsnd_src_soft_reset() to rsnd_src_activation()Kuninori Morimoto2015-11-301-2/+2
| | | | | | | Based on datasheet naming Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: add missing SRC_O_BUSIF_MODE registerKuninori Morimoto2015-11-303-3/+7
| | | | | | | | | | SRC_BUSIF_MODE has both IN/OUT register. Current src driver sets IN register only. This patch sets missing OUT register. IN/OUT register are using default setting, so, there is no HW effect. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: add missing ADINR::CHNUM on DVC/SRC/SSIUKuninori Morimoto2015-11-303-3/+9
| | | | | | | | DVC/SRC/SSIU needs ADINR::CHNUM settings too. This patch adds these missing value. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: don't use normal *mod in adg.cKuninori Morimoto2015-11-301-19/+11
| | | | | | | | adg.c is used from ssi/src/cmd. Thus don't use confusable *mod here. This patch rename it to ssi_mod/src_mod/cmd_mod Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: tidyup semantics of rsnd_ssi_record_error()Kuninori Morimoto2015-11-271-5/+2
| | | | | | | | | rsnd_ssi_record_error() should recorde error, but it clears error too. this patch fixes up semantic of rsnd_ssi_record_error that it records error but doesn't clear error. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: tidyup semantics of rsnd_src_record_error()Kuninori Morimoto2015-11-271-7/+6
| | | | | | | | | | | | rsnd_src_error_record() should recorde error, but it clears error too. this patch fixes up semantic of rsnd_src_error_record that it records error but doesn't clear error. And this patch renames rsnd_src_error_clear() to rsnd_src_status_clear() rsnd_src_error_record() to rsnd_src_record_error() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: indicate register name for debugKuninori Morimoto2015-11-271-21/+31
| | | | | | | | | | | | Current rsnd driver is indicating how to use regmap debug method on gen.c comment area. regmap debug method indicates address and value, but rsnd driver is using too many IPs (SSI/SSIU/SRC/CTU/MIX/DVC/CMD), and address. Thus, we would like to know more useful information for debugging. This patch indicates address name for debugging. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: tidyup void* cast for 64bit compilerKuninori Morimoto2015-11-202-2/+2
| | | | | | | | | | | 64bit compiler indicates this without this patch linux/sound/soc/sh/rcar/core.c: In function 'rsnd_probe': linux/sound/soc/sh/rcar/core.c:1002:16: warning: cast from pointer to\ integer of different size [-Wpointer-to-int-cast] Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove struct platform_device from probe/remove parameterKuninori Morimoto2015-11-1812-89/+47
| | | | | | | | | Current Renesas sound driver requests struct platform_device on probe/remove for each modules. But driver can get it by rsnd_priv_to_pdev(). This patch removes unnecessary parameter Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove struct rcar_snd_infoKuninori Morimoto2015-11-183-139/+13
| | | | | | | | | | | No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. Now, platform boot style was removed from driver. This is cleanup patch, and remove pointless struct rcar_snd_info Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove struct rsnd_of_dataKuninori Morimoto2015-11-1812-45/+5
| | | | | | | | | | | No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. Now, platform boot style was removed from driver. This is cleanup patch, and remove pointless struct rsnd_of_data Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove platform boot support from gen.cKuninori Morimoto2015-11-183-17/+5
| | | | | | | | | | No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. This patch removes platform boot support from gen.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove platform boot support from dvc.cKuninori Morimoto2015-11-181-52/+31
| | | | | | | | | | No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. This patch removes platform boot support from dvc.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove platform boot support from mix.cKuninori Morimoto2015-11-181-54/+31
| | | | | | | | | | No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. This patch removes platform boot support from mix.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove platform boot support from ctu.cKuninori Morimoto2015-11-181-53/+32
| | | | | | | | | | No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. This patch removes platform boot support from ctu.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove platform boot support from src.cKuninori Morimoto2015-11-181-115/+43
| | | | | | | | | | No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. This patch removes platform boot support from src.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove platform boot support from ssi.cKuninori Morimoto2015-11-182-90/+57
| | | | | | | | | | No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. This patch removes platform boot support from ssi.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove platform boot support from core.cKuninori Morimoto2015-11-187-208/+95
| | | | | | | | | | No board is using Renesas sound driver via platform boot now. This means all user is using DT boot. Platform boot support is no longer needed. But, it strongly depends on platform boot style. This patch removes platform boot support from core.c Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: SRC settings matches to datasheetKuninori Morimoto2015-11-181-258/+166
| | | | | | | | Current SRC settings order was rough. Now, Gen1 support was removed. This patch makes it cleanup and match to datasheet. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>