Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: rt1320-sdw: convert to snd_soc_dapm_xxx()

This patch converts below functions.

snd_soc_component_get_bias_level() -> snd_soc_dapm_get_bias_level()
snd_soc_component_get_dapm() -> snd_soc_component_to_dapm()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87344f3bko.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
77157cb4 35bffbe4

+11 -10
+11 -10
sound/soc/codecs/rt1320-sdw.c
··· 1246 1246 { 1247 1247 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 1248 1248 struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); 1249 - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(rt1320->component); 1249 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component); 1250 1250 int ret; 1251 1251 1252 1252 if (!rt1320->hw_init) ··· 1258 1258 1259 1259 rt1320->cali_done = false; 1260 1260 snd_soc_dapm_mutex_lock(dapm); 1261 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF && 1261 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF && 1262 1262 ucontrol->value.integer.value[0]) { 1263 1263 rt1320_calibrate(rt1320); 1264 1264 } ··· 1582 1582 short crc; 1583 1583 }; 1584 1584 1585 - struct snd_soc_dapm_context *dapm = 1586 - snd_soc_component_get_dapm(rt1320->component); 1585 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component); 1587 1586 struct device *dev = &rt1320->sdw_slave->dev; 1588 1587 unsigned int val, i, fw_offset, fw_ready; 1589 1588 unsigned int fw_status_addr; ··· 2387 2388 { 2388 2389 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2389 2390 struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); 2390 - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(rt1320->component); 2391 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component); 2391 2392 int ret; 2392 2393 2393 2394 if (!rt1320->hw_init) ··· 2402 2403 return ret; 2403 2404 2404 2405 snd_soc_dapm_mutex_lock(dapm); 2405 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { 2406 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) { 2406 2407 rt1320->r0_l_reg = ucontrol->value.integer.value[0]; 2407 2408 rt1320->r0_r_reg = ucontrol->value.integer.value[1]; 2408 2409 rt1320_calc_r0(rt1320); ··· 2446 2447 { 2447 2448 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2448 2449 struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); 2450 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 2449 2451 int ret; 2450 2452 2451 2453 if (!rt1320->hw_init) ··· 2456 2456 if (ret < 0 && ret != -EACCES) 2457 2457 return ret; 2458 2458 2459 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF && 2459 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF && 2460 2460 ucontrol->value.integer.value[0]) 2461 2461 rt1320_dspfw_load_code(rt1320); 2462 2462 ··· 2481 2481 { 2482 2482 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2483 2483 struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); 2484 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component); 2484 2485 int ret; 2485 2486 2486 2487 if (!rt1320->hw_init) ··· 2491 2490 if (ret < 0 && ret != -EACCES) 2492 2491 return ret; 2493 2492 2494 - if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF && 2493 + if (snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF && 2495 2494 ucontrol->value.integer.value[0] && rt1320->fw_load_done) 2496 2495 rt1320_rae_load(rt1320); 2497 2496 ··· 2517 2516 { 2518 2517 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); 2519 2518 struct rt1320_sdw_priv *rt1320 = snd_soc_component_get_drvdata(component); 2520 - struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(rt1320->component); 2519 + struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(rt1320->component); 2521 2520 int ret; 2522 2521 2523 2522 if (!rt1320->hw_init) ··· 2528 2527 return ret; 2529 2528 2530 2529 snd_soc_dapm_mutex_lock(dapm); 2531 - if ((snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) && 2530 + if ((snd_soc_dapm_get_bias_level(dapm) == SND_SOC_BIAS_OFF) && 2532 2531 ucontrol->value.integer.value[0] && ucontrol->value.integer.value[1]) 2533 2532 rt1320_t0_load(rt1320, ucontrol->value.integer.value[0], ucontrol->value.integer.value[1]); 2534 2533 snd_soc_dapm_mutex_unlock(dapm);