mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-04 10:46:53 +07:00
Merge remote-tracking branches 'asoc/topic/wm8711', 'asoc/topic/wm8728', 'asoc/topic/wm8731', 'asoc/topic/wm8737' and 'asoc/topic/wm8750' into asoc-next
This commit is contained in:
commit
d7e05f93bf
@ -350,19 +350,6 @@ static struct snd_soc_dai_driver wm8711_dai = {
|
|||||||
.ops = &wm8711_ops,
|
.ops = &wm8711_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int wm8711_suspend(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
snd_soc_write(codec, WM8711_ACTIVE, 0x0);
|
|
||||||
wm8711_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm8711_resume(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8711_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm8711_probe(struct snd_soc_codec *codec)
|
static int wm8711_probe(struct snd_soc_codec *codec)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -373,8 +360,6 @@ static int wm8711_probe(struct snd_soc_codec *codec)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
wm8711_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
|
||||||
|
|
||||||
/* Latch the update bits */
|
/* Latch the update bits */
|
||||||
snd_soc_update_bits(codec, WM8711_LOUT1V, 0x0100, 0x0100);
|
snd_soc_update_bits(codec, WM8711_LOUT1V, 0x0100, 0x0100);
|
||||||
snd_soc_update_bits(codec, WM8711_ROUT1V, 0x0100, 0x0100);
|
snd_soc_update_bits(codec, WM8711_ROUT1V, 0x0100, 0x0100);
|
||||||
@ -383,19 +368,11 @@ static int wm8711_probe(struct snd_soc_codec *codec)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* power down chip */
|
|
||||||
static int wm8711_remove(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8711_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct snd_soc_codec_driver soc_codec_dev_wm8711 = {
|
static struct snd_soc_codec_driver soc_codec_dev_wm8711 = {
|
||||||
.probe = wm8711_probe,
|
.probe = wm8711_probe,
|
||||||
.remove = wm8711_remove,
|
|
||||||
.suspend = wm8711_suspend,
|
|
||||||
.resume = wm8711_resume,
|
|
||||||
.set_bias_level = wm8711_set_bias_level,
|
.set_bias_level = wm8711_set_bias_level,
|
||||||
|
.suspend_bias_off = true,
|
||||||
|
|
||||||
.controls = wm8711_snd_controls,
|
.controls = wm8711_snd_controls,
|
||||||
.num_controls = ARRAY_SIZE(wm8711_snd_controls),
|
.num_controls = ARRAY_SIZE(wm8711_snd_controls),
|
||||||
.dapm_widgets = wm8711_dapm_widgets,
|
.dapm_widgets = wm8711_dapm_widgets,
|
||||||
|
@ -212,40 +212,10 @@ static struct snd_soc_dai_driver wm8728_dai = {
|
|||||||
.ops = &wm8728_dai_ops,
|
.ops = &wm8728_dai_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int wm8728_suspend(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8728_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm8728_resume(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8728_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm8728_probe(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
/* power on device */
|
|
||||||
wm8728_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm8728_remove(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8728_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct snd_soc_codec_driver soc_codec_dev_wm8728 = {
|
static struct snd_soc_codec_driver soc_codec_dev_wm8728 = {
|
||||||
.probe = wm8728_probe,
|
|
||||||
.remove = wm8728_remove,
|
|
||||||
.suspend = wm8728_suspend,
|
|
||||||
.resume = wm8728_resume,
|
|
||||||
.set_bias_level = wm8728_set_bias_level,
|
.set_bias_level = wm8728_set_bias_level,
|
||||||
|
.suspend_bias_off = true,
|
||||||
|
|
||||||
.controls = wm8728_snd_controls,
|
.controls = wm8728_snd_controls,
|
||||||
.num_controls = ARRAY_SIZE(wm8728_snd_controls),
|
.num_controls = ARRAY_SIZE(wm8728_snd_controls),
|
||||||
.dapm_widgets = wm8728_dapm_widgets,
|
.dapm_widgets = wm8728_dapm_widgets,
|
||||||
|
@ -562,25 +562,6 @@ static struct snd_soc_dai_driver wm8731_dai = {
|
|||||||
.symmetric_rates = 1,
|
.symmetric_rates = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
static int wm8731_suspend(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8731_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm8731_resume(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#define wm8731_suspend NULL
|
|
||||||
#define wm8731_resume NULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int wm8731_probe(struct snd_soc_codec *codec)
|
static int wm8731_probe(struct snd_soc_codec *codec)
|
||||||
{
|
{
|
||||||
struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
|
struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
|
||||||
@ -636,8 +617,6 @@ static int wm8731_remove(struct snd_soc_codec *codec)
|
|||||||
{
|
{
|
||||||
struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
|
struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
|
||||||
|
|
||||||
wm8731_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
|
|
||||||
regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
|
regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -646,9 +625,9 @@ static int wm8731_remove(struct snd_soc_codec *codec)
|
|||||||
static struct snd_soc_codec_driver soc_codec_dev_wm8731 = {
|
static struct snd_soc_codec_driver soc_codec_dev_wm8731 = {
|
||||||
.probe = wm8731_probe,
|
.probe = wm8731_probe,
|
||||||
.remove = wm8731_remove,
|
.remove = wm8731_remove,
|
||||||
.suspend = wm8731_suspend,
|
|
||||||
.resume = wm8731_resume,
|
|
||||||
.set_bias_level = wm8731_set_bias_level,
|
.set_bias_level = wm8731_set_bias_level,
|
||||||
|
.suspend_bias_off = true,
|
||||||
|
|
||||||
.dapm_widgets = wm8731_dapm_widgets,
|
.dapm_widgets = wm8731_dapm_widgets,
|
||||||
.num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets),
|
.num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets),
|
||||||
.dapm_routes = wm8731_intercon,
|
.dapm_routes = wm8731_intercon,
|
||||||
@ -683,8 +662,7 @@ static int wm8731_spi_probe(struct spi_device *spi)
|
|||||||
struct wm8731_priv *wm8731;
|
struct wm8731_priv *wm8731;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
wm8731 = devm_kzalloc(&spi->dev, sizeof(struct wm8731_priv),
|
wm8731 = devm_kzalloc(&spi->dev, sizeof(*wm8731), GFP_KERNEL);
|
||||||
GFP_KERNEL);
|
|
||||||
if (wm8731 == NULL)
|
if (wm8731 == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -277,17 +277,6 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||||||
{ "AIF", NULL, "ADCR" },
|
{ "AIF", NULL, "ADCR" },
|
||||||
};
|
};
|
||||||
|
|
||||||
static int wm8737_add_widgets(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
struct snd_soc_dapm_context *dapm = &codec->dapm;
|
|
||||||
|
|
||||||
snd_soc_dapm_new_controls(dapm, wm8737_dapm_widgets,
|
|
||||||
ARRAY_SIZE(wm8737_dapm_widgets));
|
|
||||||
snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* codec mclk clock divider coefficients */
|
/* codec mclk clock divider coefficients */
|
||||||
static const struct {
|
static const struct {
|
||||||
u32 mclk;
|
u32 mclk;
|
||||||
@ -548,23 +537,6 @@ static struct snd_soc_dai_driver wm8737_dai = {
|
|||||||
.ops = &wm8737_dai_ops,
|
.ops = &wm8737_dai_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
static int wm8737_suspend(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8737_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm8737_resume(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8737_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#define wm8737_suspend NULL
|
|
||||||
#define wm8737_resume NULL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static int wm8737_probe(struct snd_soc_codec *codec)
|
static int wm8737_probe(struct snd_soc_codec *codec)
|
||||||
{
|
{
|
||||||
struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec);
|
struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec);
|
||||||
@ -593,10 +565,6 @@ static int wm8737_probe(struct snd_soc_codec *codec)
|
|||||||
/* Bias level configuration will have done an extra enable */
|
/* Bias level configuration will have done an extra enable */
|
||||||
regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies);
|
regulator_bulk_disable(ARRAY_SIZE(wm8737->supplies), wm8737->supplies);
|
||||||
|
|
||||||
snd_soc_add_codec_controls(codec, wm8737_snd_controls,
|
|
||||||
ARRAY_SIZE(wm8737_snd_controls));
|
|
||||||
wm8737_add_widgets(codec);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_enable:
|
err_enable:
|
||||||
@ -605,18 +573,17 @@ static int wm8737_probe(struct snd_soc_codec *codec)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wm8737_remove(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8737_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct snd_soc_codec_driver soc_codec_dev_wm8737 = {
|
static struct snd_soc_codec_driver soc_codec_dev_wm8737 = {
|
||||||
.probe = wm8737_probe,
|
.probe = wm8737_probe,
|
||||||
.remove = wm8737_remove,
|
|
||||||
.suspend = wm8737_suspend,
|
|
||||||
.resume = wm8737_resume,
|
|
||||||
.set_bias_level = wm8737_set_bias_level,
|
.set_bias_level = wm8737_set_bias_level,
|
||||||
|
.suspend_bias_off = true,
|
||||||
|
|
||||||
|
.controls = wm8737_snd_controls,
|
||||||
|
.num_controls = ARRAY_SIZE(wm8737_snd_controls),
|
||||||
|
.dapm_widgets = wm8737_dapm_widgets,
|
||||||
|
.num_dapm_widgets = ARRAY_SIZE(wm8737_dapm_widgets),
|
||||||
|
.dapm_routes = intercon,
|
||||||
|
.num_dapm_routes = ARRAY_SIZE(intercon),
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct of_device_id wm8737_of_match[] = {
|
static const struct of_device_id wm8737_of_match[] = {
|
||||||
|
@ -686,18 +686,6 @@ static struct snd_soc_dai_driver wm8750_dai = {
|
|||||||
.ops = &wm8750_dai_ops,
|
.ops = &wm8750_dai_ops,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int wm8750_suspend(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8750_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm8750_resume(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8750_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm8750_probe(struct snd_soc_codec *codec)
|
static int wm8750_probe(struct snd_soc_codec *codec)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -708,9 +696,6 @@ static int wm8750_probe(struct snd_soc_codec *codec)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* charge output caps */
|
|
||||||
wm8750_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
|
|
||||||
|
|
||||||
/* set the update bits */
|
/* set the update bits */
|
||||||
snd_soc_update_bits(codec, WM8750_LDAC, 0x0100, 0x0100);
|
snd_soc_update_bits(codec, WM8750_LDAC, 0x0100, 0x0100);
|
||||||
snd_soc_update_bits(codec, WM8750_RDAC, 0x0100, 0x0100);
|
snd_soc_update_bits(codec, WM8750_RDAC, 0x0100, 0x0100);
|
||||||
@ -724,18 +709,10 @@ static int wm8750_probe(struct snd_soc_codec *codec)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int wm8750_remove(struct snd_soc_codec *codec)
|
|
||||||
{
|
|
||||||
wm8750_set_bias_level(codec, SND_SOC_BIAS_OFF);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct snd_soc_codec_driver soc_codec_dev_wm8750 = {
|
static struct snd_soc_codec_driver soc_codec_dev_wm8750 = {
|
||||||
.probe = wm8750_probe,
|
.probe = wm8750_probe,
|
||||||
.remove = wm8750_remove,
|
|
||||||
.suspend = wm8750_suspend,
|
|
||||||
.resume = wm8750_resume,
|
|
||||||
.set_bias_level = wm8750_set_bias_level,
|
.set_bias_level = wm8750_set_bias_level,
|
||||||
|
.suspend_bias_off = true,
|
||||||
|
|
||||||
.controls = wm8750_snd_controls,
|
.controls = wm8750_snd_controls,
|
||||||
.num_controls = ARRAY_SIZE(wm8750_snd_controls),
|
.num_controls = ARRAY_SIZE(wm8750_snd_controls),
|
||||||
|
Loading…
Reference in New Issue
Block a user