ASoC: soc-pcm: Preserve hw parameters from components in dpcm_runtime_setup_fe#5561
Conversation
|
In essence this patch extends With IPC4 and 5.1 equipment (audio extractor) on HDMI: With stereo: With 7.1: With IPC3 with stereo, 5.1 or 7.1: |
|
I will send this upstream for comments early next week, but I wanted to ask here opinions also. |
kv2019i
left a comment
There was a problem hiding this comment.
Very good addition again!
Minor style nit, but upstream kernel is full of this "true/false in caller" usages, so it's probably just me.
sound/soc/soc-pcm.c
Outdated
| int i; | ||
|
|
||
| soc_pcm_hw_init(hw); | ||
| soc_pcm_hw_init(hw, false); |
There was a problem hiding this comment.
Again, not a huge fan of these boolean parameters. The calling side readability suffers. Maybe soc_pcm_init_preserve_config() that hides the "true" case?
There was a problem hiding this comment.
or do this without a function, inline of dpcm_runtime_setup_fe()
…_setup_fe Component drivers can prepare snd_pcm_hardware struct based on the hardware capabilities which information should not be discarded. Only touch the rates, channels_max and formats if they were left to 0, otherwise keep the provided configuration intact for the parameter cross checking decision. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
6ada9f1 to
b5f4f02
Compare
|
Changes since v1:
|
singalsu
left a comment
There was a problem hiding this comment.
Worked OK in my test with HDA topology with all formats enabled.
|
We will get this back from upstream if accepted, closing it here. |
Component drivers can prepare snd_pcm_hardware struct based on the hardware capabilities which information should not be discarded.
Only touch the rates, channels_max and formats if they were left to 0, otherwise keep the provided configuration intact for the parameter cross checking decision.