aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cx2072x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/cx2072x.c')
-rw-r--r--sound/soc/codecs/cx2072x.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/sound/soc/codecs/cx2072x.c b/sound/soc/codecs/cx2072x.c
index 1f5c57fab1d8..5deceaa89282 100644
--- a/sound/soc/codecs/cx2072x.c
+++ b/sound/soc/codecs/cx2072x.c
@@ -710,22 +710,19 @@ static int cx2072x_config_i2spcm(struct cx2072x_priv *cx2072x)
regdbt2.ulval = 0xac;
- /* set master/slave */
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
- case SND_SOC_DAIFMT_CBM_CFM:
+ switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
+ case SND_SOC_DAIFMT_CBP_CFP:
reg2.r.tx_master = 1;
reg3.r.rx_master = 1;
- dev_dbg(dev, "Sets Master mode\n");
break;
- case SND_SOC_DAIFMT_CBS_CFS:
+ case SND_SOC_DAIFMT_CBC_CFC:
reg2.r.tx_master = 0;
reg3.r.rx_master = 0;
- dev_dbg(dev, "Sets Slave mode\n");
break;
default:
- dev_err(dev, "Unsupported DAI master mode\n");
+ dev_err(dev, "Unsupported DAI clocking mode\n");
return -EINVAL;
}
@@ -1009,9 +1006,9 @@ static int cx2072x_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
dev_dbg(dev, "set_dai_fmt- %08x\n", fmt);
/* set master/slave */
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
- case SND_SOC_DAIFMT_CBM_CFM:
- case SND_SOC_DAIFMT_CBS_CFS:
+ switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) {
+ case SND_SOC_DAIFMT_CBP_CFP:
+ case SND_SOC_DAIFMT_CBC_CFC:
break;
default:
@@ -1527,6 +1524,7 @@ static const struct snd_soc_component_driver soc_codec_driver_cx2072x = {
.num_dapm_widgets = ARRAY_SIZE(cx2072x_dapm_widgets),
.dapm_routes = cx2072x_intercon,
.num_dapm_routes = ARRAY_SIZE(cx2072x_intercon),
+ .endianness = 1,
};
/*
@@ -1626,8 +1624,7 @@ static int __maybe_unused cx2072x_runtime_resume(struct device *dev)
return clk_prepare_enable(cx2072x->mclk);
}
-static int cx2072x_i2c_probe(struct i2c_client *i2c,
- const struct i2c_device_id *id)
+static int cx2072x_i2c_probe(struct i2c_client *i2c)
{
struct cx2072x_priv *cx2072x;
unsigned int ven_id, rev_id;
@@ -1676,10 +1673,9 @@ static int cx2072x_i2c_probe(struct i2c_client *i2c,
return 0;
}
-static int cx2072x_i2c_remove(struct i2c_client *i2c)
+static void cx2072x_i2c_remove(struct i2c_client *i2c)
{
pm_runtime_disable(&i2c->dev);
- return 0;
}
static const struct i2c_device_id cx2072x_i2c_id[] = {
@@ -1710,7 +1706,7 @@ static struct i2c_driver cx2072x_i2c_driver = {
.acpi_match_table = ACPI_PTR(cx2072x_acpi_match),
.pm = &cx2072x_runtime_pm,
},
- .probe = cx2072x_i2c_probe,
+ .probe_new = cx2072x_i2c_probe,
.remove = cx2072x_i2c_remove,
.id_table = cx2072x_i2c_id,
};