Re: [PATCH v2 13/16] ASoC: remove snd_soc_dai_link_set_capabilities()

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



Hi Pierre-Louis

Thank you for your feedback.

> >>> 	void snd_soc_dai_link_set_capabilities(...)
> >>> 	{
> >>> 		...
> >>> (X)		for_each_pcm_streams(direction) {
> >>> 			...
> >>> (Y)			for_each_link_cpus(dai_link, i, cpu) {
> >>> 				...
> >>> (A)				if (... snd_soc_dai_stream_valid(...)) {
> >>> 					...
> >>> 				}
> >>> 			}
> >>> (Z)			for_each_link_codecs(dai_link, i, codec) {
> >>> 				...
> >>> (A)				if (... snd_soc_dai_stream_valid(...)) {
> >>> 					...
> >>> 				}
> >>> 			}
> >>> 			...
> >>> 		}
> >>>
> >>> (a)		dai_link->dpcm_playback = supported[...];
> >>> (a)		dai_link->dpcm_capture  = supported[...];
> >>> 	}
(snip)
> It's very hard to review because it comes as the 13th patch of a series
> and you've already removed similar code earlier which precisely checked
> the consistency between dailink and dais.

Ah, OK, I see.
Indeed this patch can be merged into [01/16] patch, or can be [02/16].

> In this function, it's a similar case btw where the settings provided by
> the machine drivers are overridden by the framework, so that's another
> case of collision between machine driver and framework. Which of the two
> should be trusted?

I couldn't understand this comment, either.

	In this function, it's a similar case btw where the settings
	provided by the machine drivers are overridden by the framework,

Do you mean dai_link->dpcm_xxx which was set by machine drivers
is overridden/overwritten by this function
(= snd_soc_dai_link_set_capabilities()) ??

I think CPU/Codec driver can't set dai_link. And this function is
basically called from Card driver, not from framework.
And dpcm_xxx is no longer needed anyway, no collision happen any more by
this patch. But am I misunderstanding ?

Thank you for your help !!

Best regards
---
Renesas Electronics
Ph.D. Kuninori Morimoto




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux