]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: compress: Clarify the intent of current compressed ops handling
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 5 Feb 2019 11:18:12 +0000 (11:18 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 6 Feb 2019 15:50:50 +0000 (15:50 +0000)
commit475dc16969475bf499ab1b207efaedd8e320688c
tree4830d17993296c4df81a861133d44a43afbea03b
parent8c9f3e33730df6f75ce56709a575332dc91f6a3d
ASoC: compress: Clarify the intent of current compressed ops handling

For callbacks configuring the state of the components (trigger,
set_params, ack and set_metadata) simplify the code a little and make
intention clearer by aborting as soon as an error is encountered. The
operation has already failed and there is nothing to be gained from
processing the callbacks on additional components. The operations
currently abort after the callbacks, so this simply shortens the
error path.

For callbacks returning information from the driver (copy,
get_metadata, pointer, get_codec_caps, get_caps and get_params)
only look for the first callback provided, currently the code will
call every callback only returning the information provided by the
last. Since we can only return one set of data, it makes no sense to
request the data from every component. Again this just makes the
currently supported feature set a little more clear.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-compress.c