if(!codec)
return;
+ mutex_lock(&codec->mutex);
if(on){
DBG("snd_soc_dapm_enable_pin\n");
snd_soc_dapm_enable_pin(&codec->dapm, "Headphone Jack");
snd_soc_dapm_disable_pin(&codec->dapm, "Ext Spk");
}
snd_soc_dapm_sync(&codec->dapm);
+ mutex_unlock(&codec->mutex);
}
#include "../codecs/rt3261.h"\r
#include "rk29_pcm.h"\r
#include "rk29_i2s.h"\r
+
\r
#if 0\r
#define DBG(x...) printk(KERN_INFO x)\r
snd_soc_dapm_enable_pin(dapm, "Headset Jack");\r
snd_soc_dapm_enable_pin(dapm, "Ext Spk");\r
snd_soc_dapm_enable_pin(dapm, "Headphone Jack");\r
+#ifdef CONFIG_HDMI
+ extern int hdmi_is_insert(void);
+ extern void codec_set_spk(bool on);
+ if(hdmi_is_insert())
+ codec_set_spk(false);
+#endif
+
+#ifdef CONFIG_HDMI_RK30
+ extern int hdmi_get_hotplug(void);
+ if(hdmi_get_hotplug() == 2/*HDMI_HPD_ACTIVED*/)
+ codec_set_spk(false);
+#endif
+
snd_soc_dapm_sync(dapm);\r
\r
return 0;\r