alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Sergej Sawazki <ce3a@gmx.de>
To: broonie@kernel.org, lgirdwood@gmail.com,
	ckeepax@opensource.wolfsonmicro.com
Cc: Sergej Sawazki <ce3a@gmx.de>,
	alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com
Subject: [PATCH] ASoC: wm8741: Remove unneeded startup() callback
Date: Sat, 28 Jan 2017 00:35:45 +0100	[thread overview]
Message-ID: <1485560145-12908-1-git-send-email-ce3a@gmx.de> (raw)

Do not apply rate constraints in the startup() callback. The machine driver
can change the sysclk and hence the supported frame rates in its hw_params().
This callback is unneeded since commit e369bd006fd6 ("ASoC: wm8741: Allow
master clock switching").

Signed-off-by: Sergej Sawazki <ce3a@gmx.de>
---
 sound/soc/codecs/wm8741.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/sound/soc/codecs/wm8741.c b/sound/soc/codecs/wm8741.c
index b8c1940..d6e540a 100644
--- a/sound/soc/codecs/wm8741.c
+++ b/sound/soc/codecs/wm8741.c
@@ -176,20 +176,6 @@ static const struct snd_pcm_hw_constraint_list constraints_36864 = {
 	.list	= rates_36864,
 };
 
-static int wm8741_startup(struct snd_pcm_substream *substream,
-			  struct snd_soc_dai *dai)
-{
-	struct snd_soc_codec *codec = dai->codec;
-	struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec);
-
-	if (wm8741->sysclk)
-		snd_pcm_hw_constraint_list(substream->runtime, 0,
-				SNDRV_PCM_HW_PARAM_RATE,
-				wm8741->sysclk_constraints);
-
-	return 0;
-}
-
 static int wm8741_hw_params(struct snd_pcm_substream *substream,
 			    struct snd_pcm_hw_params *params,
 			    struct snd_soc_dai *dai)
@@ -360,7 +346,6 @@ static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai,
 			SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
 
 static const struct snd_soc_dai_ops wm8741_dai_ops = {
-	.startup	= wm8741_startup,
 	.hw_params	= wm8741_hw_params,
 	.set_sysclk	= wm8741_set_dai_sysclk,
 	.set_fmt	= wm8741_set_dai_fmt,
-- 
2.7.4

             reply	other threads:[~2017-01-27 23:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 23:35 Sergej Sawazki [this message]
2017-01-30  9:22 ` [PATCH] ASoC: wm8741: Remove unneeded startup() callback Charles Keepax
2017-01-30 22:56   ` Sergej Sawazki
2017-01-31  9:49     ` Charles Keepax
2017-01-31 20:38       ` Sergej Sawazki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485560145-12908-1-git-send-email-ce3a@gmx.de \
    --to=ce3a@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.wolfsonmicro.com \
    --cc=lgirdwood@gmail.com \
    --cc=patches@opensource.wolfsonmicro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).