Re: [PATCH] ASoC: soc-pcm: fixup soc_pcm_params_symmetry()

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

 



Hi Mark

> commit 3a9067211122 ("ASoC: soc-pcm: cleanup soc_pcm_params_symmetry()")
> cleanups soc_pcm_params_symmetry() by addig new
> __soc_pcm_params_symmetry() macro.
> 
> It checks symmetry first, and checks each DAI settings if symmetry
> was true.
> But original code checked
> 
> 	symmetric_rate		: DAI_Link / CPU         (A)
> 	symmetric_channels	: DAI_Link / CPU / Codec (B)
> 	symmetric_sample_bits	: DAI_Link / CPU / Codec (B)
> 
> 	(A) was using for_each_rtd_cpu_dais()
> 	(B) was using for_each_rtd_dais()
> 
> Current code is using (B) for all symmetric_xxx. This is bug.

Oops ?
More older verion was

	symmetric_rate		: DAI_Link / CPU / Codec (B)
	symmetric_channels	: DAI_Link / CPU / Codec (B)
	symmetric_sample_bits	: DAI_Link / CPU / Codec (B)

but commit c840f7698d26 ("ASoC: soc-pcm: Merge for_each_rtd_cpu/codec_dais()")
had bug, and code become

	symmetric_rate		: DAI_Link / CPU         (A)
	symmetric_channels	: DAI_Link / CPU / Codec (B)
	symmetric_sample_bits	: DAI_Link / CPU / Codec (B)

And commit 3a9067211122 ("ASoC: soc-pcm: cleanup soc_pcm_params_symmetry()")
back again

	symmetric_rate		: DAI_Link / CPU / Codec (B)
	symmetric_channels	: DAI_Link / CPU / Codec (B)
	symmetric_sample_bits	: DAI_Link / CPU / Codec (B)

Does this issue had been happen since older versoin ??

	# aplay 44100.wav
	# aplay 44100.wav
=>	[kernel] be.ak4613-hifi: ASoC: unmatched rate symmetry: 44100 - 48000
	[kernel] be.ak4613-hifi: ASoC: hw_params BE failed -22

If so, correct solution should be (A2)

	(A1) Symmetric checks CPU only
	(A2) Symmetric checks both CPU / Codec, but ignores dummy-DAI

Thank you for your help !!

Best regards
---
Kuninori Morimoto



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux