Message ID | 20220818165336.76403-1-povik+lin@cutebit.org (mailing list archive) |
---|---|
State | Accepted |
Commit | ceff365a29aaf275c0cd1bb7edaf57dcf254bc77 |
Headers | show |
Series | ASoC: Change handling of unimplemented set_bclk_ratio | expand |
On Thu, 18 Aug 2022 18:53:36 +0200, Martin Povišer wrote: > If a 'set_bclk_ratio' call is attempted on a DAI not implementing the > method, make it an -ENOSUPP error instead of -EINVAL. Assume the DAI can > still be okay with the ratio, just does not care to register a handler. > > No current in-tree users of snd_soc_dai_set_bclk_ratio seem to inspect > the return value, but -ENOSUPP disables an error print from within the > common soc_dai_ret return filter. With the new behavior a machine > driver can do a blanket 'set_bclk_ratio' on all DAIs on a bus, some of > which may care about the ratio, some of which may not. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: Change handling of unimplemented set_bclk_ratio commit: ceff365a29aaf275c0cd1bb7edaf57dcf254bc77 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c index d530e8c2b77b..49752af0e205 100644 --- a/sound/soc/soc-dai.c +++ b/sound/soc/soc-dai.c @@ -124,7 +124,7 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_pll); */ int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio) { - int ret = -EINVAL; + int ret = -ENOTSUPP; if (dai->driver->ops && dai->driver->ops->set_bclk_ratio)
If a 'set_bclk_ratio' call is attempted on a DAI not implementing the method, make it an -ENOSUPP error instead of -EINVAL. Assume the DAI can still be okay with the ratio, just does not care to register a handler. No current in-tree users of snd_soc_dai_set_bclk_ratio seem to inspect the return value, but -ENOSUPP disables an error print from within the common soc_dai_ret return filter. With the new behavior a machine driver can do a blanket 'set_bclk_ratio' on all DAIs on a bus, some of which may care about the ratio, some of which may not. Signed-off-by: Martin Povišer <povik+lin@cutebit.org> --- sound/soc/soc-dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)