sound: sdw: Add hw_params to SoundWire config helper function
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 23 Nov 2022 16:54:24 +0000 (16:54 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 28 Nov 2022 13:04:24 +0000 (13:04 +0000)
commite45875168d19051ebf0fc4b091da6256f3ea3669
tree163263baed456ecc48d067e1511570c96f011b36
parentd695d089e35e28f3f0ed4595a242922cc28f9b20
sound: sdw: Add hw_params to SoundWire config helper function

The vast majority of the current users of the SoundWire framework
have almost identical code for converting from hw_params to SoundWire
configuration. Whilst complex devices might require more, it is very
likely that most new devices will follow the same pattern. Save a
little code by factoring this out into a helper function.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221123165432.594972-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/sdw.h [new file with mode: 0644]