linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: doc: update codec example code
@ 2021-10-24 15:17 John Keeping
  2021-10-25 16:39 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: John Keeping @ 2021-10-24 15:17 UTC (permalink / raw)
  To: alsa-devel
  Cc: John Keeping, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Jonathan Corbet, linux-doc, linux-kernel

As the codec API has evolved the documentation has not kept up and still
uses old fields that have been removed.  Update the examples to
represent the current API.

Signed-off-by: John Keeping <john@metanate.com>
---
 Documentation/sound/soc/codec.rst | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Documentation/sound/soc/codec.rst b/Documentation/sound/soc/codec.rst
index 8a9737eb7597..57df149acafc 100644
--- a/Documentation/sound/soc/codec.rst
+++ b/Documentation/sound/soc/codec.rst
@@ -40,7 +40,7 @@ e.g.
 	.prepare	= wm8731_pcm_prepare,
 	.hw_params	= wm8731_hw_params,
 	.shutdown	= wm8731_shutdown,
-	.digital_mute	= wm8731_mute,
+	.mute_stream	= wm8731_mute,
 	.set_sysclk	= wm8731_set_dai_sysclk,
 	.set_fmt	= wm8731_set_dai_fmt,
   };
@@ -60,7 +60,7 @@ e.g.
 		.rates = WM8731_RATES,
 		.formats = WM8731_FORMATS,},
 	.ops = &wm8731_dai_ops,
-	.symmetric_rates = 1,
+	.symmetric_rate = 1,
   };
 
 
@@ -177,10 +177,10 @@ when the mute is applied or freed.
 i.e.
 ::
 
-  static int wm8974_mute(struct snd_soc_dai *dai, int mute)
+  static int wm8974_mute(struct snd_soc_dai *dai, int mute, int direction)
   {
 	struct snd_soc_component *component = dai->component;
-	u16 mute_reg = snd_soc_component_read32(component, WM8974_DAC) & 0xffbf;
+	u16 mute_reg = snd_soc_component_read(component, WM8974_DAC) & 0xffbf;
 
 	if (mute)
 		snd_soc_component_write(component, WM8974_DAC, mute_reg | 0x40);
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: doc: update codec example code
  2021-10-24 15:17 [PATCH] ASoC: doc: update codec example code John Keeping
@ 2021-10-25 16:39 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2021-10-25 16:39 UTC (permalink / raw)
  To: John Keeping, alsa-devel
  Cc: Mark Brown, linux-doc, linux-kernel, Jaroslav Kysela,
	Jonathan Corbet, Liam Girdwood, Takashi Iwai

On Sun, 24 Oct 2021 16:17:31 +0100, John Keeping wrote:
> As the codec API has evolved the documentation has not kept up and still
> uses old fields that have been removed.  Update the examples to
> represent the current API.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: doc: update codec example code
      commit: a6d968a3e8f01bdc09fc397697ce27ef75392ce7

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-25 16:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-24 15:17 [PATCH] ASoC: doc: update codec example code John Keeping
2021-10-25 16:39 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).