• Charles Keepax's avatar
    ASoC: compress: Clarify the intent of current compressed ops handling · 52cadf1f
    Charles Keepax authored
    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: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    52cadf1f
soc-compress.c 25.2 KB