[alsa-devel] [PATCH 2/2] ASoC: rx1950_uda1380: Don't modify runtime->hw

Lars-Peter Clausen lars at metafoo.de
Mon Feb 3 17:24:22 CET 2014


Individual components are not supposed to modify the runtime->hw struct itself
as it is manged by the ASoC core. If a component wants to limit the list of
supported rates it should set a rate constraint. The rx1950_uda1380 already does
this, so it is safe to just remove the code that modifies runtime->hw.

Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
---
 sound/soc/samsung/rx1950_uda1380.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c
index f69da8f..2311c88 100644
--- a/sound/soc/samsung/rx1950_uda1380.c
+++ b/sound/soc/samsung/rx1950_uda1380.c
@@ -131,10 +131,6 @@ static int rx1950_startup(struct snd_pcm_substream *substream)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 
-	runtime->hw.rate_min = hw_rates.list[0];
-	runtime->hw.rate_max = hw_rates.list[hw_rates.count - 1];
-	runtime->hw.rates = SNDRV_PCM_RATE_KNOT;
-
 	return snd_pcm_hw_constraint_list(runtime, 0,
 					SNDRV_PCM_HW_PARAM_RATE,
 					&hw_rates);
-- 
1.8.0



More information about the Alsa-devel mailing list