分类: LINUX
2009-11-25 14:47:10
2.6.31内核加入了mini2440的默认配置,移植要简单些了,弄差不多的时候发现没有声音,上网搜了下解决方法可以出声了,但是很卡,有时会突然正常,驱动还有问题吧?
解决方法:
补丁:
===========================================================
--- a/sound/soc/codecs/uda134x.c 2009-10-07 19:48:17.000000000 +0300
+++ b/sound/soc/codecs/uda134x.c 2009-10-15 22:24:00.000000000 +0300
@@ -163,7 +163,7 @@
else
mute_reg &= ~(1<<2);
- uda134x_write(codec, UDA134X_DATA010, mute_reg & ~(1<<2));
+ uda134x_write(codec, UDA134X_DATA010, mute_reg);
return 0;
}
@@ -419,6 +419,16 @@
SOC_SINGLE("DC Filter Enable Switch", UDA134X_STATUS0, 0, 1, 0),
};
+int uda134x_soc_dummy_power_check(struct snd_soc_dapm_widget *w)
+{
+ return 1;
+}
+
+static const struct snd_soc_dapm_widget uda134x_dummy_dapm_widget = {
+ .id = snd_soc_dapm_vmid,
+ .power_check = uda134x_soc_dummy_power_check
+};
+
static const struct snd_kcontrol_new uda1340_snd_controls[] = {
SOC_SINGLE("Master Playback Volume", UDA134X_DATA000, 0, 0x3F, 1),
@@ -562,6 +572,9 @@
goto pcm_err;
}
+ snd_soc_dapm_new_controls(codec, &uda134x_dummy_dapm_widget, 1);
+ snd_soc_dapm_new_widgets(codec);
+
ret = snd_soc_init_card(socdev);
if (ret < 0) {
printk(KERN_ERR "UDA134X: failed to register card\n");
===========================================================