Re: [alsa-devel] [PATCH resend 25/47] ASoC: samsung: snow: don't select unnecessary Platform

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Kuninori,

On 2019-06-26 03:15, Kuninori Morimoto wrote:
> Hi Marek, again
>
>> Thank you for your test.
>> And so sorry to bother you.
>> I will fixup this issue.
>>
>>>>>> I have no idea so far, but one capability is that if your system
>>>>>> used / based dummy platform, and if your CPU driver didn't use/have
>>>>>> snd_soc_set_runtime_hwparams() / snd_pcm_lib_ioctl,
>>>>>> it might be happen, but this patch seems not related to it...
>>>>> Reverting this patch fixes the issue, so it is definitely related somehow.
>>>> Ahh... OK now I think I could understand your issue.
>>>> Your CPU is using devm_snd_dmaengine_pcm_register() with same *dev.
>>>> In such case, indeed this patch breaks sound card.
> I'm now negotiating to Mark to reverting issue patches.
> But, as alternative idea, I think below patch can solve this issue.
> Can you please test it ?
>
> ----------------------
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index 358f1fb..79b9cc4 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -931,9 +931,11 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
>   	rtd->codec_dai = rtd->codec_dais[0];
>   
>   	/* Find PLATFORM from registered PLATFORMs */
> +	/* CPU driver might has both DAI and PLATFORM */
>   	for_each_component(component) {
>   		if (!snd_soc_is_matching_component(dai_link->platforms,
> -						   component))
> +						   component) &&
> +		    !snd_soc_is_matching_component(dai_link->cpus, component))
>   			continue;
>   
>   		snd_soc_rtdcom_add(rtd, component);
> ----------------------

Yes, the above change fixes the issue on Samsung Snow, Peach-Pit and 
Peach-Pi Chromebooks, but causes regression on the other boards, for 
example here is the log from Odroid U3:

max98090 1-0010: MAX98090 REVID=0x43
max98090 1-0010: use default 2.8v micbias
odroid-audio sound: snd-soc-dummy-dai <-> samsung-i2s mapping ok
odroid-audio sound: multicodec <-> snd-soc-dummy-dai mapping ok
------------[ cut here ]------------
WARNING: CPU: 3 PID: 88 at fs/proc/generic.c:361 proc_register+0xf8/0x12c
proc_dir_entry 'sub0/prealloc' already registered
Modules linked in:
CPU: 3 PID: 88 Comm: kworker/3:1 Not tainted 
5.2.0-rc6-next-20190624-00004-g5611edb05c36-dirty #6233
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
Workqueue: events deferred_probe_work_func
[<c0112548>] (unwind_backtrace) from [<c010e004>] (show_stack+0x10/0x14)
usb 1-3: new high-speed USB device number 3 using exynos-ehci
[<c010e004>] (show_stack) from [<c0aa63bc>] (dump_stack+0x98/0xc4)
[<c0aa63bc>] (dump_stack) from [<c01274d8>] (__warn+0x10c/0x124)
[<c01274d8>] (__warn) from [<c0127534>] (warn_slowpath_fmt+0x44/0x68)
[<c0127534>] (warn_slowpath_fmt) from [<c031f8b8>] 
(proc_register+0xf8/0x12c)
[<c031f8b8>] (proc_register) from [<c031fb88>] (proc_create_data+0x38/0x44)
[<c031fb88>] (proc_create_data) from [<c07a88a4>] 
(snd_info_register+0xe4/0x13c)
[<c07a88a4>] (snd_info_register) from [<c07a8804>] 
(snd_info_register+0x44/0x13c)
irq event stamp: 12923
hardirqs last  enabled at (12941): [<c01976a8>] console_unlock+0x4b8/0x6a8
hardirqs last disabled at (12958): [<c01972bc>] console_unlock+0xcc/0x6a8
softirqs last  enabled at (12956): [<c01026d8>] __do_softirq+0x4f0/0x5e0
softirqs last disabled at (12977): [<c012f6f8>] irq_exit+0x160/0x16c
---[ end trace 9e0864d90e2e08ab ]---
odroid-audio sound: ASoC: failed to register soundcard -12
odroid-audio sound: snd_soc_register_card() failed: -12
odroid-audio: probe of sound failed with error -12

here is the component list reported by your previous patch for that board:

[    3.012781] -----3830000.i2s : samsung-i2s
[    3.015736] -----snd-soc-dummy : (null)
[    3.019588] -----3830000.i2s : snd_dmaengine_pcm
[    3.024122] -----snd-soc-dummy : (null)
[    3.027991] -----hdmi-audio-codec.0.auto : (null)
[    3.032620] -----max98090.1-0010 : (null)
[    3.078865] max98090 1-0010: MAX98090 REVID=0x43
[    3.085038] max98090 1-0010: use default 2.8v micbias
[    3.113438] odroid-audio sound: snd-soc-dummy-dai <-> samsung-i2s 
mapping ok
[    3.123849] odroid-audio sound: multicodec <-> snd-soc-dummy-dai 
mapping ok
[    3.263208] ALSA device list:
[    3.264234]   #0: Odroid-U3

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux