Message ID | 20230128082744.41849-1-alex@shruggie.ro |
---|---|
State | Accepted |
Commit | 879142be618c05d234db31cbf69f101c53b7892f |
Headers | show |
Series | [v2,1/4] ASoC: codecs: tas5720: split a tas5720_mute_soc_component() function | expand |
On Sat, 28 Jan 2023 10:27:41 +0200, Alexandru Ardelean wrote: > This is to be re-used in tas5720_mute() (which is part of the dai_ops) and > also in the tas5720_fault_check_work() hook. > > The benefit here isn't too great (now). > It's only when we add support for a new device with a slightly different > regmap that this becomes more useful. > > [...] Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/4] ASoC: codecs: tas5720: split a tas5720_mute_soc_component() function commit: 879142be618c05d234db31cbf69f101c53b7892f [2/4] ASoC: codecs: tas5720: add support for TAS5720A-Q1 (automotive) variant commit: c24a62be09d8a0c7ede1c209055a4ac6760a45ee [3/4] ASoC: tas5720: set bit 7 in ANALOG_CTRL_REG for TAS5720A-Q1 during probe commit: 88f748e38b283702a620e635820f1864bf32db0e [4/4] ASoC: dt-bindings: add entry for TAS5720A-Q1 driver commit: 8d076a992eb86b99afb04980ac4b57e3a79f6704 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/codecs/tas5720.c b/sound/soc/codecs/tas5720.c index 3885c0bf0b01..0587c9bb3c4e 100644 --- a/sound/soc/codecs/tas5720.c +++ b/sound/soc/codecs/tas5720.c @@ -199,9 +199,8 @@ static int tas5720_set_dai_tdm_slot(struct snd_soc_dai *dai, return ret; } -static int tas5720_mute(struct snd_soc_dai *dai, int mute, int direction) +static int tas5720_mute_soc_component(struct snd_soc_component *component, int mute) { - struct snd_soc_component *component = dai->component; int ret; ret = snd_soc_component_update_bits(component, TAS5720_DIGITAL_CTRL2_REG, @@ -214,6 +213,11 @@ static int tas5720_mute(struct snd_soc_dai *dai, int mute, int direction) return 0; } +static int tas5720_mute(struct snd_soc_dai *dai, int mute, int direction) +{ + return tas5720_mute_soc_component(dai->component, mute); +} + static void tas5720_fault_check_work(struct work_struct *work) { struct tas5720_data *tas5720 = container_of(work, struct tas5720_data, @@ -318,8 +322,7 @@ static int tas5720_codec_probe(struct snd_soc_component *component) expected_device_id, device_id); /* Set device to mute */ - ret = snd_soc_component_update_bits(component, TAS5720_DIGITAL_CTRL2_REG, - TAS5720_MUTE, TAS5720_MUTE); + ret = tas5720_mute_soc_component(component, 1); if (ret < 0) goto error_snd_soc_component_update_bits;
This is to be re-used in tas5720_mute() (which is part of the dai_ops) and also in the tas5720_fault_check_work() hook. The benefit here isn't too great (now). It's only when we add support for a new device with a slightly different regmap that this becomes more useful. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro> --- Changelog v1 -> v2: - https://lore.kernel.org/alsa-devel/20230115193347.24190-1-alex@shruggie.ro/ - No change sound/soc/codecs/tas5720.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)