未验证 提交 5259b17b 编写于 作者: M Mark Brown

Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/rt5659',...

Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/rt5659', 'asoc/fix/ssm2602' and 'asoc/fix/topology' into asoc-linus
......@@ -22,7 +22,7 @@ Optionnal properties:
Example:
sound {
compatible = "rockchip,rockchip-audio-es8388";
compatible = "rockchip,rk3288-hdmi-analog";
rockchip,model = "Analog audio output";
rockchip,i2s-controller = <&i2s>;
rockchip,audio-codec = <&es8388>;
......
......@@ -2500,9 +2500,9 @@ static const struct snd_soc_dapm_widget rt5659_dapm_widgets[] = {
RT5659_PWR_ADC_L1_BIT, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY("ADC1 R Power", RT5659_PWR_DIG_1,
RT5659_PWR_ADC_R1_BIT, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY("ADC2 L Power", RT5659_PWR_DIG_2,
SND_SOC_DAPM_SUPPLY("ADC2 L Power", RT5659_PWR_DIG_1,
RT5659_PWR_ADC_L2_BIT, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY("ADC2 R Power", RT5659_PWR_DIG_2,
SND_SOC_DAPM_SUPPLY("ADC2 R Power", RT5659_PWR_DIG_1,
RT5659_PWR_ADC_R2_BIT, 0, NULL, 0),
SND_SOC_DAPM_SUPPLY("ADC1 clock", SND_SOC_NOPM, 0, 0, set_adc_clk,
SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
......
......@@ -1008,7 +1008,7 @@
#define RT5659_PWR_ADC_R1 (0x1 << 3)
#define RT5659_PWR_ADC_R1_BIT 3
#define RT5659_PWR_ADC_L2 (0x1 << 2)
#define RT5659_PWR_ADC_L2_BIT 4
#define RT5659_PWR_ADC_L2_BIT 2
#define RT5659_PWR_ADC_R2 (0x1 << 1)
#define RT5659_PWR_ADC_R2_BIT 1
#define RT5659_PWR_CLS_D (0x1)
......
......@@ -54,10 +54,17 @@ struct ssm2602_priv {
* using 2 wire for device control, so we cache them instead.
* There is no point in caching the reset register
*/
static const u16 ssm2602_reg[SSM2602_CACHEREGNUM] = {
0x0097, 0x0097, 0x0079, 0x0079,
0x000a, 0x0008, 0x009f, 0x000a,
0x0000, 0x0000
static const struct reg_default ssm2602_reg[SSM2602_CACHEREGNUM] = {
{ .reg = 0x00, .def = 0x0097 },
{ .reg = 0x01, .def = 0x0097 },
{ .reg = 0x02, .def = 0x0079 },
{ .reg = 0x03, .def = 0x0079 },
{ .reg = 0x04, .def = 0x000a },
{ .reg = 0x05, .def = 0x0008 },
{ .reg = 0x06, .def = 0x009f },
{ .reg = 0x07, .def = 0x000a },
{ .reg = 0x08, .def = 0x0000 },
{ .reg = 0x09, .def = 0x0000 }
};
......@@ -620,8 +627,8 @@ const struct regmap_config ssm2602_regmap_config = {
.volatile_reg = ssm2602_register_volatile,
.cache_type = REGCACHE_RBTREE,
.reg_defaults_raw = ssm2602_reg,
.num_reg_defaults_raw = ARRAY_SIZE(ssm2602_reg),
.reg_defaults = ssm2602_reg,
.num_reg_defaults = ARRAY_SIZE(ssm2602_reg),
};
EXPORT_SYMBOL_GPL(ssm2602_regmap_config);
......
......@@ -155,7 +155,7 @@ static struct snd_soc_dai_link_component rk_codecs[] = {
{ },
{
.name = "hdmi-audio-codec.2.auto",
.dai_name = "hdmi-hifi.0",
.dai_name = "i2s-hifi",
},
};
......
......@@ -523,6 +523,7 @@ static void remove_widget(struct snd_soc_component *comp,
kfree(se->dobj.control.dtexts[j]);
kfree(se);
kfree(w->kcontrol_news[i].name);
}
kfree(w->kcontrol_news);
} else {
......@@ -540,6 +541,7 @@ static void remove_widget(struct snd_soc_component *comp,
*/
kfree((void *)kcontrol->private_value);
snd_ctl_remove(card, kcontrol);
kfree(w->kcontrol_news[i].name);
}
kfree(w->kcontrol_news);
}
......@@ -1233,7 +1235,9 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_dmixer_create(
dev_dbg(tplg->dev, " adding DAPM widget mixer control %s at %d\n",
mc->hdr.name, i);
kc[i].name = mc->hdr.name;
kc[i].name = kstrdup(mc->hdr.name, GFP_KERNEL);
if (kc[i].name == NULL)
goto err_str;
kc[i].private_value = (long)sm;
kc[i].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
kc[i].access = mc->hdr.access;
......@@ -1278,8 +1282,10 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_dmixer_create(
err_str:
kfree(sm);
err:
for (--i; i >= 0; i--)
for (--i; i >= 0; i--) {
kfree((void *)kc[i].private_value);
kfree(kc[i].name);
}
kfree(kc);
return NULL;
}
......@@ -1310,7 +1316,9 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_denum_create(
dev_dbg(tplg->dev, " adding DAPM widget enum control %s\n",
ec->hdr.name);
kc[i].name = ec->hdr.name;
kc[i].name = kstrdup(ec->hdr.name, GFP_KERNEL);
if (kc[i].name == NULL)
goto err_se;
kc[i].private_value = (long)se;
kc[i].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
kc[i].access = ec->hdr.access;
......@@ -1386,6 +1394,7 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_denum_create(
kfree(se->dobj.control.dtexts[j]);
kfree(se);
kfree(kc[i].name);
}
err:
kfree(kc);
......@@ -1424,7 +1433,9 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_dbytes_create(
"ASoC: adding bytes kcontrol %s with access 0x%x\n",
be->hdr.name, be->hdr.access);
kc[i].name = be->hdr.name;
kc[i].name = kstrdup(be->hdr.name, GFP_KERNEL);
if (kc[i].name == NULL)
goto err;
kc[i].private_value = (long)sbe;
kc[i].iface = SNDRV_CTL_ELEM_IFACE_MIXER;
kc[i].access = be->hdr.access;
......@@ -1454,8 +1465,10 @@ static struct snd_kcontrol_new *soc_tplg_dapm_widget_dbytes_create(
return kc;
err:
for (--i; i >= 0; i--)
for (--i; i >= 0; i--) {
kfree((void *)kc[i].private_value);
kfree(kc[i].name);
}
kfree(kc);
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册