diff options
| -rw-r--r-- | sound/soc/codecs/ssm2518.c | 2 | ||||
| -rw-r--r-- | sound/soc/codecs/ssm2602.c | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/ssm4567.c | 2 | ||||
| -rw-r--r-- | sound/soc/generic/simple-card.c | 16 |
4 files changed, 18 insertions, 6 deletions
diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c index 13c6ab0f7af0..f30de7639bb9 100644 --- a/sound/soc/codecs/ssm2518.c +++ b/sound/soc/codecs/ssm2518.c | |||
| @@ -510,7 +510,7 @@ static int ssm2518_set_bias_level(struct snd_soc_codec *codec, | |||
| 510 | case SND_SOC_BIAS_PREPARE: | 510 | case SND_SOC_BIAS_PREPARE: |
| 511 | break; | 511 | break; |
| 512 | case SND_SOC_BIAS_STANDBY: | 512 | case SND_SOC_BIAS_STANDBY: |
| 513 | if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) | 513 | if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) |
| 514 | ret = ssm2518_set_power(ssm2518, true); | 514 | ret = ssm2518_set_power(ssm2518, true); |
| 515 | break; | 515 | break; |
| 516 | case SND_SOC_BIAS_OFF: | 516 | case SND_SOC_BIAS_OFF: |
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c index 296a140b8c35..69a773aeb13d 100644 --- a/sound/soc/codecs/ssm2602.c +++ b/sound/soc/codecs/ssm2602.c | |||
| @@ -523,8 +523,8 @@ static int ssm2602_resume(struct snd_soc_codec *codec) | |||
| 523 | 523 | ||
| 524 | static int ssm2602_codec_probe(struct snd_soc_codec *codec) | 524 | static int ssm2602_codec_probe(struct snd_soc_codec *codec) |
| 525 | { | 525 | { |
| 526 | struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); | ||
| 526 | struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); | 527 | struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); |
| 527 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
| 528 | int ret; | 528 | int ret; |
| 529 | 529 | ||
| 530 | regmap_update_bits(ssm2602->regmap, SSM2602_LOUT1V, | 530 | regmap_update_bits(ssm2602->regmap, SSM2602_LOUT1V, |
| @@ -548,7 +548,7 @@ static int ssm2602_codec_probe(struct snd_soc_codec *codec) | |||
| 548 | 548 | ||
| 549 | static int ssm2604_codec_probe(struct snd_soc_codec *codec) | 549 | static int ssm2604_codec_probe(struct snd_soc_codec *codec) |
| 550 | { | 550 | { |
| 551 | struct snd_soc_dapm_context *dapm = &codec->dapm; | 551 | struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); |
| 552 | int ret; | 552 | int ret; |
| 553 | 553 | ||
| 554 | ret = snd_soc_dapm_new_controls(dapm, ssm2604_dapm_widgets, | 554 | ret = snd_soc_dapm_new_controls(dapm, ssm2604_dapm_widgets, |
diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c index 643bcff4a919..938d2cb6d78b 100644 --- a/sound/soc/codecs/ssm4567.c +++ b/sound/soc/codecs/ssm4567.c | |||
| @@ -353,7 +353,7 @@ static int ssm4567_set_bias_level(struct snd_soc_codec *codec, | |||
| 353 | case SND_SOC_BIAS_PREPARE: | 353 | case SND_SOC_BIAS_PREPARE: |
| 354 | break; | 354 | break; |
| 355 | case SND_SOC_BIAS_STANDBY: | 355 | case SND_SOC_BIAS_STANDBY: |
| 356 | if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) | 356 | if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) |
| 357 | ret = ssm4567_set_power(ssm4567, true); | 357 | ret = ssm4567_set_power(ssm4567, true); |
| 358 | break; | 358 | break; |
| 359 | case SND_SOC_BIAS_OFF: | 359 | case SND_SOC_BIAS_OFF: |
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 33feee9ca8c3..c87e58504a62 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c | |||
| @@ -307,6 +307,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, | |||
| 307 | struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, idx); | 307 | struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, idx); |
| 308 | struct simple_dai_props *dai_props = simple_priv_to_props(priv, idx); | 308 | struct simple_dai_props *dai_props = simple_priv_to_props(priv, idx); |
| 309 | struct device_node *cpu = NULL; | 309 | struct device_node *cpu = NULL; |
| 310 | struct device_node *plat = NULL; | ||
| 310 | struct device_node *codec = NULL; | 311 | struct device_node *codec = NULL; |
| 311 | char *name; | 312 | char *name; |
| 312 | char prop[128]; | 313 | char prop[128]; |
| @@ -320,6 +321,9 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, | |||
| 320 | snprintf(prop, sizeof(prop), "%scpu", prefix); | 321 | snprintf(prop, sizeof(prop), "%scpu", prefix); |
| 321 | cpu = of_get_child_by_name(node, prop); | 322 | cpu = of_get_child_by_name(node, prop); |
| 322 | 323 | ||
| 324 | snprintf(prop, sizeof(prop), "%splat", prefix); | ||
| 325 | plat = of_get_child_by_name(node, prop); | ||
| 326 | |||
| 323 | snprintf(prop, sizeof(prop), "%scodec", prefix); | 327 | snprintf(prop, sizeof(prop), "%scodec", prefix); |
| 324 | codec = of_get_child_by_name(node, prop); | 328 | codec = of_get_child_by_name(node, prop); |
| 325 | 329 | ||
| @@ -352,8 +356,16 @@ static int asoc_simple_card_dai_link_of(struct device_node *node, | |||
| 352 | goto dai_link_of_err; | 356 | goto dai_link_of_err; |
| 353 | } | 357 | } |
| 354 | 358 | ||
| 355 | /* Simple Card assumes platform == cpu */ | 359 | if (plat) { |
| 356 | dai_link->platform_of_node = dai_link->cpu_of_node; | 360 | struct of_phandle_args args; |
| 361 | |||
| 362 | ret = of_parse_phandle_with_args(plat, "sound-dai", | ||
| 363 | "#sound-dai-cells", 0, &args); | ||
| 364 | dai_link->platform_of_node = args.np; | ||
| 365 | } else { | ||
| 366 | /* Assumes platform == cpu */ | ||
| 367 | dai_link->platform_of_node = dai_link->cpu_of_node; | ||
| 368 | } | ||
| 357 | 369 | ||
| 358 | /* DAI link name is created from CPU/CODEC dai name */ | 370 | /* DAI link name is created from CPU/CODEC dai name */ |
| 359 | name = devm_kzalloc(dev, | 371 | name = devm_kzalloc(dev, |
