summaryrefslogtreecommitdiffstats
path: root/sound/soc
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: rsnd: ctu: add rsnd_mix_activation()Kuninori Morimoto2016-01-223-0/+11
| | | | | | | Based on datasheet Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: attach Audio-DMAC-periperi correctlyKuninori Morimoto2016-01-224-35/+34
| | | | | | | | | | SSI/SRC will try to attach DMAC as Audio-DMAC or Audio-DMAC-periperi. It is fixed IP, but will be attached to each streams as different module in case of MUX (= multi sound path will be merged). 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: each mod has status again for CTU/MUX supportKuninori Morimoto2016-01-2211-19/+79
| | | | | | | | | | | | | | | | | SSI will be used as normal SSI or as clock parent SSI. Therefor, rsnd driver wants to control SSI and parent SSI separately. Otherwise it can't use Playback/Capture in the same time. And it has been done by c2dc47d5cf("ASoC: rsnd: rsnd_dai_stream has each mod's status insted of rsnd_mod") before. OTOH, rsnd driver doesn't want to control CTU/MUX/DVC/SSIU/SSI in separately. Otherwise, these will be re-initialized during playing if MUX merges 2 sounds. Because of these picky reasons, this patch re-defines status on each mod, and add new parent_ssi_status on rsnd_dai_stream. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: select each SRC correctly for CMD data pathKuninori Morimoto2016-01-221-1/+5
| | | | | | | | | To select CMD data patch, it should use correct SRC from each stream in MUX case. But current code is selecting SRC from fixed stream. 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: don't overwrite io on rsnd_cmd_init()Kuninori Morimoto2016-01-221-4/+5
| | | | | | | | Current rsnd_cmd_init() overwrites "io" which will be used end of this function. This patch solved this issue. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: always call probe/remove for MUXKuninori Morimoto2016-01-222-7/+8
| | | | | | | | | CTU/MUX/DVC/SSIU/SSI/Audio-DMAC-periperi might be used under multipath. So, probe()/remove() need to be called multiple times. This patch allows it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: try to connect connected mod is not errorKuninori Morimoto2016-01-221-0/+3
| | | | | | | | If system uses CTU/MUX, CTU/MUX/DVC will try to connect same CMD to system, but it is not error in this case. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: don't update status if rsnd_mod_call() doesn't matchKuninori Morimoto2016-01-221-2/+5
| | | | | | | | | | If system uses CTU/MUX, and if probe error happened, it will try to call rsnd_dai_call(remove, ...). Then, MUX/DVC/SSIU/SSI might be called without calling rsnd_dai_call(probe, ...). Then, each mod status might be un-matched. It doesn't call un-matched remove function by this patch. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: add debug message for rsnd_mod_call()Kuninori Morimoto2016-01-221-0/+3
| | | | | | | | | rsnd_mod_call() tries to call each IP's relevant function. But it is difficult to understand which function returned error. This patch adds debug message for this purpose Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: use rsnd_mod_init() for ADGKuninori Morimoto2016-01-221-7/+2
| | | | | | | | Current ADG doesn't use rsnd_mod_init(), but this limitation is no longer necessary. Let's use common rsnd_mod_init() Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: remove unsed *parentKuninori Morimoto2016-01-221-1/+0
| | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: rsnd: precedence error in rsnd_ssiu_init()Dan Carpenter2016-01-061-1/+1
| | | | | | | | | The bitwise OR has higher precedence than ?: so the val2 was always set to 0x2. Fixes: b4c83b171557 ('ASoC: rsnd: add Multi channel support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* 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>
OpenPOWER on IntegriCloud