- 06 9月, 2018 1 次提交
-
-
由 Kuninori Morimoto 提交于
Current rsnd driver will fallback to PIO mode if it can't get DMA handler. But, DMA might return -EPROBE_DEFER when probe timing. This driver always fallback to PIO mode especially from commit ac6bbf0c ("iommu: Remove IOMMU_OF_DECLARE") because of this reason. The DMA driver will be probed later, but sound driver might be probed as PIO mode in such case. This patch fixup this issue. Then, -EPROBE_DEFER is not error. Thus, let's don't indicate error message in such case. And it needs to call rsnd_adg_remove() individually if probe failed, because it registers clk which should be unregister. Maybe PIO fallback feature itself is not needed, but let's keep it so far. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 03 9月, 2018 1 次提交
-
-
由 Jiada Wang 提交于
Clocking operations clk_get/set_rate, are non-atomic, they shouldn't be called in soc_pcm_trigger() which is atomic. Following issue was found due to execution of clk_get_rate() causes sleep in soc_pcm_trigger(), which shouldn't be blocked. We can reproduce this issue by following > enable CONFIG_DEBUG_ATOMIC_SLEEP=y > compile, and boot > mount -t debugfs none /sys/kernel/debug > while true; do cat /sys/kernel/debug/clk/clk_summary > /dev/null; done & > while true; do aplay xxx; done This patch adds support to .prepare callback, and moves non-atomic clocking operations to it. As .prepare is non-atomic, it is always called before trigger_start/trigger_stop. BUG: sleeping function called from invalid context at kernel/locking/mutex.c:620 in_atomic(): 1, irqs_disabled(): 128, pid: 2242, name: aplay INFO: lockdep is turned off. irq event stamp: 5964 hardirqs last enabled at (5963): [<ffff200008e59e40>] mutex_lock_nested+0x6e8/0x6f0 hardirqs last disabled at (5964): [<ffff200008e623f0>] _raw_spin_lock_irqsave+0x24/0x68 softirqs last enabled at (5502): [<ffff200008081838>] __do_softirq+0x560/0x10c0 softirqs last disabled at (5495): [<ffff2000080c2e78>] irq_exit+0x160/0x25c Preemption disabled at:[ 62.904063] [<ffff200008be4d48>] snd_pcm_stream_lock+0xb4/0xc0 CPU: 2 PID: 2242 Comm: aplay Tainted: G B C 4.9.54+ #186 Hardware name: Renesas Salvator-X board based on r8a7795 (DT) Call trace: [<ffff20000808fe48>] dump_backtrace+0x0/0x37c [<ffff2000080901d8>] show_stack+0x14/0x1c [<ffff2000086f4458>] dump_stack+0xfc/0x154 [<ffff2000081134a0>] ___might_sleep+0x57c/0x58c [<ffff2000081136b8>] __might_sleep+0x208/0x21c [<ffff200008e5980c>] mutex_lock_nested+0xb4/0x6f0 [<ffff2000087cac74>] clk_prepare_lock+0xb0/0x184 [<ffff2000087cb094>] clk_core_get_rate+0x14/0x54 [<ffff2000087cb0f4>] clk_get_rate+0x20/0x34 [<ffff20000113aa00>] rsnd_adg_ssi_clk_try_start+0x158/0x4f8 [snd_soc_rcar] [<ffff20000113da00>] rsnd_ssi_init+0x668/0x7a0 [snd_soc_rcar] [<ffff200001133ff4>] rsnd_soc_dai_trigger+0x4bc/0xcf8 [snd_soc_rcar] [<ffff200008c1af24>] soc_pcm_trigger+0x2a4/0x2d4 Fixes: e7d850dd ("ASoC: rsnd: use mod base common method on SSI-parent") Signed-off-by: NJiada Wang <jiada_wang@mentor.com> Signed-off-by: NTimo Wischer <twischer@de.adit-jv.com> [Kuninori: tidyup for upstream] Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
-
- 18 6月, 2018 3 次提交
-
-
由 Kuninori Morimoto 提交于
rsnd priv has many parameters. On __rsnd_dai_probe() it uses rsnd_rdai_get() to get rdai pointer, but is using priv->daidrv directly to get daidrvhv, but it is confusable for reader. This patch adds rsnd_daidrv_get() to get daidrv from priv. Now reader can understand that rdai and daidrv are related. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
If SSIs are sharing WS pin, it should has .symmetric_rates. This patch sets it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Tidyup incoherence between MODULE_LICENSE and header license, too Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 6月, 2018 1 次提交
-
-
由 Kees Cook 提交于
The devm_kzalloc() function has a 2-factor argument form, devm_kcalloc(). This patch replaces cases of: devm_kzalloc(handle, a * b, gfp) with: devm_kcalloc(handle, a * b, gfp) as well as handling cases of: devm_kzalloc(handle, a * b * c, gfp) with: devm_kzalloc(handle, array3_size(a, b, c), gfp) as it's slightly less ugly than: devm_kcalloc(handle, array_size(a, b), c, gfp) This does, however, attempt to ignore constant size factors like: devm_kzalloc(handle, 4 * 1024, gfp) though any constants defined via macros get caught up in the conversion. Any factors with a sizeof() of "unsigned char", "char", and "u8" were dropped, since they're redundant. Some manual whitespace fixes were needed in this patch, as Coccinelle really liked to write "=devm_kcalloc..." instead of "= devm_kcalloc...". The Coccinelle script used for this was: // Fix redundant parens around sizeof(). @@ expression HANDLE; type TYPE; expression THING, E; @@ ( devm_kzalloc(HANDLE, - (sizeof(TYPE)) * E + sizeof(TYPE) * E , ...) | devm_kzalloc(HANDLE, - (sizeof(THING)) * E + sizeof(THING) * E , ...) ) // Drop single-byte sizes and redundant parens. @@ expression HANDLE; expression COUNT; typedef u8; typedef __u8; @@ ( devm_kzalloc(HANDLE, - sizeof(u8) * (COUNT) + COUNT , ...) | devm_kzalloc(HANDLE, - sizeof(__u8) * (COUNT) + COUNT , ...) | devm_kzalloc(HANDLE, - sizeof(char) * (COUNT) + COUNT , ...) | devm_kzalloc(HANDLE, - sizeof(unsigned char) * (COUNT) + COUNT , ...) | devm_kzalloc(HANDLE, - sizeof(u8) * COUNT + COUNT , ...) | devm_kzalloc(HANDLE, - sizeof(__u8) * COUNT + COUNT , ...) | devm_kzalloc(HANDLE, - sizeof(char) * COUNT + COUNT , ...) | devm_kzalloc(HANDLE, - sizeof(unsigned char) * COUNT + COUNT , ...) ) // 2-factor product with sizeof(type/expression) and identifier or constant. @@ expression HANDLE; type TYPE; expression THING; identifier COUNT_ID; constant COUNT_CONST; @@ ( - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(TYPE) * (COUNT_ID) + COUNT_ID, sizeof(TYPE) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(TYPE) * COUNT_ID + COUNT_ID, sizeof(TYPE) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(TYPE) * (COUNT_CONST) + COUNT_CONST, sizeof(TYPE) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(TYPE) * COUNT_CONST + COUNT_CONST, sizeof(TYPE) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(THING) * (COUNT_ID) + COUNT_ID, sizeof(THING) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(THING) * COUNT_ID + COUNT_ID, sizeof(THING) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(THING) * (COUNT_CONST) + COUNT_CONST, sizeof(THING) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(THING) * COUNT_CONST + COUNT_CONST, sizeof(THING) , ...) ) // 2-factor product, only identifiers. @@ expression HANDLE; identifier SIZE, COUNT; @@ - devm_kzalloc + devm_kcalloc (HANDLE, - SIZE * COUNT + COUNT, SIZE , ...) // 3-factor product with 1 sizeof(type) or sizeof(expression), with // redundant parens removed. @@ expression HANDLE; expression THING; identifier STRIDE, COUNT; type TYPE; @@ ( devm_kzalloc(HANDLE, - sizeof(TYPE) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | devm_kzalloc(HANDLE, - sizeof(TYPE) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | devm_kzalloc(HANDLE, - sizeof(TYPE) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | devm_kzalloc(HANDLE, - sizeof(TYPE) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | devm_kzalloc(HANDLE, - sizeof(THING) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | devm_kzalloc(HANDLE, - sizeof(THING) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | devm_kzalloc(HANDLE, - sizeof(THING) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | devm_kzalloc(HANDLE, - sizeof(THING) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) ) // 3-factor product with 2 sizeof(variable), with redundant parens removed. @@ expression HANDLE; expression THING1, THING2; identifier COUNT; type TYPE1, TYPE2; @@ ( devm_kzalloc(HANDLE, - sizeof(TYPE1) * sizeof(TYPE2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | devm_kzalloc(HANDLE, - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | devm_kzalloc(HANDLE, - sizeof(THING1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | devm_kzalloc(HANDLE, - sizeof(THING1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | devm_kzalloc(HANDLE, - sizeof(TYPE1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) | devm_kzalloc(HANDLE, - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) ) // 3-factor product, only identifiers, with redundant parens removed. @@ expression HANDLE; identifier STRIDE, SIZE, COUNT; @@ ( devm_kzalloc(HANDLE, - (COUNT) * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | devm_kzalloc(HANDLE, - COUNT * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | devm_kzalloc(HANDLE, - COUNT * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | devm_kzalloc(HANDLE, - (COUNT) * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | devm_kzalloc(HANDLE, - COUNT * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | devm_kzalloc(HANDLE, - (COUNT) * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | devm_kzalloc(HANDLE, - (COUNT) * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | devm_kzalloc(HANDLE, - COUNT * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) ) // Any remaining multi-factor products, first at least 3-factor products, // when they're not all constants... @@ expression HANDLE; expression E1, E2, E3; constant C1, C2, C3; @@ ( devm_kzalloc(HANDLE, C1 * C2 * C3, ...) | devm_kzalloc(HANDLE, - (E1) * E2 * E3 + array3_size(E1, E2, E3) , ...) | devm_kzalloc(HANDLE, - (E1) * (E2) * E3 + array3_size(E1, E2, E3) , ...) | devm_kzalloc(HANDLE, - (E1) * (E2) * (E3) + array3_size(E1, E2, E3) , ...) | devm_kzalloc(HANDLE, - E1 * E2 * E3 + array3_size(E1, E2, E3) , ...) ) // And then all remaining 2 factors products when they're not all constants, // keeping sizeof() as the second factor argument. @@ expression HANDLE; expression THING, E1, E2; type TYPE; constant C1, C2, C3; @@ ( devm_kzalloc(HANDLE, sizeof(THING) * C2, ...) | devm_kzalloc(HANDLE, sizeof(TYPE) * C2, ...) | devm_kzalloc(HANDLE, C1 * C2 * C3, ...) | devm_kzalloc(HANDLE, C1 * C2, ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(TYPE) * (E2) + E2, sizeof(TYPE) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(TYPE) * E2 + E2, sizeof(TYPE) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(THING) * (E2) + E2, sizeof(THING) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - sizeof(THING) * E2 + E2, sizeof(THING) , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - (E1) * E2 + E1, E2 , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - (E1) * (E2) + E1, E2 , ...) | - devm_kzalloc + devm_kcalloc (HANDLE, - E1 * E2 + E1, E2 , ...) ) Signed-off-by: NKees Cook <keescook@chromium.org>
-
- 16 4月, 2018 2 次提交
-
-
由 Kuninori Morimoto 提交于
commit 4821d914 ("ASoC: rsnd: use dma_sync_single_for_xxx() for IOMMU") (= v1) which have been already reverted had supported IPMMU support on rsnd driver. Because memory allocating timing and DMAEngine access timing were different, it used continuous memory and called dma map function by itself. OTOH, it is using DMA descriptor mode (= DMA cyclic mode), thus, there was timing conflict between DMA sync/unsync and DMA transfer starting, and it maked sound noise. This patch supports IPMMU with coherent memory, and, it uses Audio DMAC dev for allocating memory by snd_pcm_lib_preallocate_pages_for_all() to indicate memory area to IPMMU. One note is that Playback/Capture need each paired Audio DMAC dev. Because of this, we need to keep each paired Audio DMAC dev when probing, and use it when allocating each memory for IPMMU. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
rsnd driver is supporting Gen3. The difference between Gen1 and Gen2 were very big, but, between Gen2 and Gen3 are not so much. Thus, it is assuming Gen2 and Gen3 have compatible, therefore, there is no RSND_GEN3 and rsnd_is_gen3() macro. But in the future, it will need Gen2 and Gen3 different operation, and for Gen4. This patch adds missing RSND_GEN3 and rsnd_is_gen3() macro. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NNguyen Viet Dung <dung.nguyen.aj@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 12 4月, 2018 1 次提交
-
-
由 Arnd Bergmann 提交于
The suspend/resume callbacks are now optional, leading to a warning when they are unused: sound/soc/sh/rcar/core.c:1548:12: error: 'rsnd_resume' defined but not used [-Werror=unused-function] static int rsnd_resume(struct device *dev) ^~~~~~~~~~~ sound/soc/sh/rcar/core.c:1539:12: error: 'rsnd_suspend' defined but not used [-Werror=unused-function] static int rsnd_suspend(struct device *dev) This marks the as __maybe_unused to avoid the warning. Fixes: f8a9a29c ("ASoC: rsnd: set pm_ops in hibernate-compatible way") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 3月, 2018 1 次提交
-
-
由 Nikita Yushchenko 提交于
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: NNikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 2月, 2018 1 次提交
-
-
由 Kuninori Morimoto 提交于
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: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 12 2月, 2018 1 次提交
-
-
由 Kuninori Morimoto 提交于
Now platform can be replaced to component, let's do it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 11 12月, 2017 2 次提交
-
-
由 Kuninori Morimoto 提交于
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
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: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 09 12月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
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: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 11月, 2017 2 次提交
-
-
由 Kuninori Morimoto 提交于
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: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 11月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
commit 4821d914 ("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: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Tested-by: NRyo Kodama <ryo.kodama.vz@renesas.com> Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 01 11月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
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: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 31 10月, 2017 4 次提交
-
-
由 Kuninori Morimoto 提交于
Let's use more common style to checking running/working Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
clk_unprepare() is checking parameter by IS_ERR_OR_NULL(). clk NULL check is not needed on rsnd_mod_quit() Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Let's remove point less "continue" Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
We have rsnd_io_to_mod() macro. Let's use it Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 04 10月, 2017 2 次提交
-
-
由 Kuninori Morimoto 提交于
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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
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: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 18 8月, 2017 1 次提交
-
-
由 Bhumika Goyal 提交于
Make these const as they are only passed as the 2nd argument to the function snd_soc_set_runtime_hwparams, which is const. Done using Coccinelle. Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 8月, 2017 2 次提交
-
-
由 Arvind Yadav 提交于
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/soc.h> work with const snd_pcm_ops. So mark the non-const structs as const. Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Bhumika Goyal 提交于
Make these const as they are either passed as the 2nd argument to the function devm_snd_soc_register_platform or snd_soc_register_platform, and the arguments are of type const. Done using Coccinelle. Signed-off-by: NBhumika Goyal <bhumirks@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 10 8月, 2017 2 次提交
-
-
由 Markus Elfring 提交于
Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdfSigned-off-by: NMarkus Elfring <elfring@users.sourceforge.net> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
R-Car Gen3 sound device can use TDM 16ch, but its usage is very limited. It is not yet supported. Let's remove unexpected/unsupported channel settings for now. This patch makes xx_ADINR register settings sanity without runtime check. R-Car Gen3 datasheet 40.4.7 Note on Usage of the SSIU Module When an SSIU module is used in "TDM-16ch mode", only the transfer with the external memory is available. Reported-by: NNguyen Viet Dung <dung.nguyen.aj@renesas.com> Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 28 7月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
Current rsnd driver has snd_pcm_ops::open and snd_soc_dai_ops::startup, but, these are called from soc_pcm_open in same time. This patch merge these into rsnd_soc_dai_startup() Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 24 7月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
Current rsnd kctrl is using both .private_value (for rsnd_kctrl_cfg) and .private_data (for rsnd_mod) on snd_kcontrol. But only 1 private data (= rsnd_kctrl_cfg) can be enough if it has rsnd_mod pointer. This patch doesn't use private_value. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 30 6月, 2017 1 次提交
-
-
由 Arvind Yadav 提交于
dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by <linux/device.h> work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 8172 920 0 9092 2384 sound/soc/sh/rcar/core.o File size After adding 'const': text data bss dec hex filename 8364 728 0 9092 2384 sound/soc/sh/rcar/core.o Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 6月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
This patch fixes this WARNING sound/soc/sh/rcar/ssi.c:285:5-14: WARNING: Unsigned expression\ compared with zero: main_rate < 0 Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 6月, 2017 2 次提交
-
-
由 Kuninori Morimoto 提交于
Current Renesas sound driver is assuming that all Sampling rate and channles are possible to use, but these are depends on inputed clock and SSI connection situation. For example, if it is using 1 SSI, enabled TDM mode and has 12288000 input clock, 2ch output can support until 192000Hz, but 6ch output can support until 64000Hz, 8ch can support 48000Hz. To control these situation correctly, it needs to support hw_constraints / refine feature. To support such feature, this patch adds new rsnd_soc_hw_rule/constraint() which adds hw rule of Channel and Sampling Rate. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Current Renesas sound driver has slots and slots_num in struct rsnd_dai, but these are very un-understandable naming (It had named from TDM slots). In this driver, the "slots" means total usable channels, and "stot_num" means SSI lane number if Multi SSI was used. To more understandable code, this patch renames "slots" to "max_channels", and "slots_num" to "ssi_lane", and replaces related functions name. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 6月, 2017 3 次提交
-
-
由 Kuninori Morimoto 提交于
rsnd_dai_call() macro is using "priv" inside. Thus, if caller function doesn't have "priv" related operation, strange phenomenon occur which code is using "priv", but compiler indicates "unused variable 'priv'". >From code point of view, it is not problem, but it is very confusable. This patch removes "priv" from rsnd_dai_call() macro, and adds "priv" on caller function. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: NHiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Current SRC/DVC/CTU adds kctrl for each device, and SRC can adjust its sampling rate during playback, thus, this feature should be enabled only *during* playback. This patch controls it more clearly Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Renesas Sound device *Hardware* L/R and Linux *Software* L/R are inverted. Because of this background, it needs to convert L/R. Then, DVC needs *Hardware* L/R, and Linux needs *Software* L/R. Because Playback/Capture needs different timing, and there is no explanation about it on source code / git log, this patch adds it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 08 6月, 2017 1 次提交
-
-
由 Kuninori Morimoto 提交于
Current rsnd driver is sharing pointer related code between PIO / DMA. But, it is used only PIO mode now, no longer needed. This patch cleanup these. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-