diff options
author | Kirill Marinushkin <[email protected]> | 2020-11-15 13:23:05 +0100 |
---|---|---|
committer | Mark Brown <[email protected]> | 2020-11-16 20:03:24 +0000 |
commit | 26b97d95a05d0346e1ad6096deedac3f24a4607b (patch) | |
tree | 69476d00f0bfe7082818262e9ca0c8eeb89367f5 /lib/mpi/mpi-mod.c | |
parent | 798714b6121d833c8abe4161761a94fdd1e73a90 (diff) |
ASoC: pcm512x: Move format check into `set_fmt()`
I would like to describe the reasoning by quoting Peter Ujfalusi
<[email protected]> from his review of this patch series v1 [1]:
> When you bind a link you will use set_fmt for the two sides to see if
> they can agree, that both can support what has been asked.
>
> The pcm512x driver just saves the fmt and say back to that card:
> whatever, I'm fine with it. But runtime during hw_params it can fail due
> to unsupported bus format, which it actually acked to be ok.
>
> This is the difference.
>
> Sure, some device have constraint based on the fmt towards the hw_params
> and it is perfectly OK to do such a checks and rejections or build
> rules/constraints based on fmt, but failing hw_params just because
> set_fmt did not checked that the bus format is not even supported is not
> a nice thing to do.
[1] https://patchwork.kernel.org/project/alsa-devel/patch/
[email protected]/
Signed-off-by: Kirill Marinushkin <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: Matthias Reichl <[email protected]>
Cc: Kuninori Morimoto <[email protected]>
Cc: Peter Ujfalusi <[email protected]>
Cc: [email protected]
Cc: [email protected]
Reviewed-by: Peter Ujfalusi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-mod.c')
0 files changed, 0 insertions, 0 deletions