Skip to contentSkip to conversation

ASoC: Remove impossible case from wm8994_hw_params

PATCH Applied Axel Lin 2 participants 2 messages Oct 11, 2011 – Oct 12, 2011

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH v2 1/1 ASoC: Remove impossible case from wm8994_hw_params

We set hw_params callback for wm8994_aif3_dai_ops to wm8994_aif3_hw_params. Thus no need to check wm8994-aif3 in wm8994_hw_params.

---
v2: original patch does not apply after commit 81204c84c "ASoC: Add WM1811 support".

 sound/soc/codecs/wm8994.c |   10 ----------
 1 files changed, 0 insertions(+), 10 deletions(-)
sound/soc/codecs/wm8994.c +0 -10
index 16542de..68e769e 100644
@@ -2235,7 +2235,6 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream,
 			    struct snd_soc_dai *dai)
 {
 	struct snd_soc_codec *codec = dai->codec;
-	struct wm8994 *control = codec->control_data;
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
 	int aif1_reg;
 	int aif2_reg;
@@ -2278,15 +2277,6 @@ static int wm8994_hw_params(struct snd_pcm_substream *substream,
 			dev_dbg(codec->dev, "AIF2 using split LRCLK\n");
 		}
 		break;
-	case 3:
-		switch (control->type) {
-		case WM1811:
-		case WM8958:
-			aif1_reg = WM8958_AIF3_CONTROL_1;
-			break;
-		default:
-			return 0;
-		}
 	default:
 		return -EINVAL;
 	}
Signature · 1 line
1.7.4.1
Applied
#1 lore raw
Quoted 2 lines · Axel Lin

We set hw_params callback for wm8994_aif3_dai_ops to wm8994_aif3_hw_params. Thus no need to check wm8994-aif3 in wm8994_hw_params.

Applied, thanks.