diff mbox series

ASoC: soc-pcm: merge soc_pcm_hw_update_format/subformat()

Message ID 87v7soz664.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State Accepted
Commit b92bc4d6e21f1802a39975e3c7cc4f76f591d46f
Headers show
Series ASoC: soc-pcm: merge soc_pcm_hw_update_format/subformat() | expand

Commit Message

Kuninori Morimoto March 5, 2025, 12:12 a.m. UTC
format() and subformat() should be handled in the same time, no need to
have each functions. Let's merge these

	soc_pcm_hw_update_format()
	soc_pcm_hw_update_subformat()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Cezary Rojewski <cezary.rojewski@intel.com>
Cc: Jaroslav Kysela <perex@perex.cz>
---
 sound/soc/soc-pcm.c | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

Comments

Cezary Rojewski March 5, 2025, 11:21 a.m. UTC | #1
On 2025-03-05 1:12 AM, Kuninori Morimoto wrote:
> format() and subformat() should be handled in the same time, no need to
> have each functions. Let's merge these
> 
> 	soc_pcm_hw_update_format()
> 	soc_pcm_hw_update_subformat()
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Cc: Cezary Rojewski <cezary.rojewski@intel.com>
> Cc: Jaroslav Kysela <perex@perex.cz>

Looks good.

Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Mark Brown March 5, 2025, 4:43 p.m. UTC | #2
On Wed, 05 Mar 2025 00:12:52 +0000, Kuninori Morimoto wrote:
> format() and subformat() should be handled in the same time, no need to
> have each functions. Let's merge these
> 
> 	soc_pcm_hw_update_format()
> 	soc_pcm_hw_update_subformat()
> 
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: soc-pcm: merge soc_pcm_hw_update_format/subformat()
      commit: b92bc4d6e21f1802a39975e3c7cc4f76f591d46f

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 mbox series

Patch

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 2a53a2eb4acd..c2d4becf0c3d 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -603,13 +603,8 @@  static void soc_pcm_hw_update_chan(struct snd_pcm_hardware *hw,
 static void soc_pcm_hw_update_format(struct snd_pcm_hardware *hw,
 				     const struct snd_soc_pcm_stream *p)
 {
-	hw->formats &= p->formats;
-}
-
-static void soc_pcm_hw_update_subformat(struct snd_pcm_hardware *hw,
-					const struct snd_soc_pcm_stream *p)
-{
-	hw->subformats &= p->subformats;
+	hw->formats	&= p->formats;
+	hw->subformats	&= p->subformats;
 }
 
 /**
@@ -650,7 +645,6 @@  int snd_soc_runtime_calc_hw(struct snd_soc_pcm_runtime *rtd,
 		soc_pcm_hw_update_chan(hw, cpu_stream);
 		soc_pcm_hw_update_rate(hw, cpu_stream);
 		soc_pcm_hw_update_format(hw, cpu_stream);
-		soc_pcm_hw_update_subformat(hw, cpu_stream);
 	}
 	cpu_chan_min = hw->channels_min;
 	cpu_chan_max = hw->channels_max;
@@ -672,7 +666,6 @@  int snd_soc_runtime_calc_hw(struct snd_soc_pcm_runtime *rtd,
 		soc_pcm_hw_update_chan(hw, codec_stream);
 		soc_pcm_hw_update_rate(hw, codec_stream);
 		soc_pcm_hw_update_format(hw, codec_stream);
-		soc_pcm_hw_update_subformat(hw, codec_stream);
 	}
 
 	/* Verify both a valid CPU DAI and a valid CODEC DAI were found */
@@ -1765,7 +1758,6 @@  static void dpcm_runtime_setup_fe(struct snd_pcm_substream *substream)
 		soc_pcm_hw_update_rate(hw, cpu_stream);
 		soc_pcm_hw_update_chan(hw, cpu_stream);
 		soc_pcm_hw_update_format(hw, cpu_stream);
-		soc_pcm_hw_update_subformat(hw, cpu_stream);
 	}
 
 }
@@ -1803,7 +1795,6 @@  static void dpcm_runtime_setup_be_format(struct snd_pcm_substream *substream)
 			codec_stream = snd_soc_dai_get_pcm_stream(dai, stream);
 
 			soc_pcm_hw_update_format(hw, codec_stream);
-			soc_pcm_hw_update_subformat(hw, codec_stream);
 		}
 	}
 }