static int msm8960_spkramp_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { #if defined (CONFIG_MACH_MSM8960_SIRIUSLTE) int ret; #endif pr_debug("%s() %x\n", __func__, SND_SOC_DAPM_EVENT_ON(event)); if (SND_SOC_DAPM_EVENT_ON(event)) { if (!strncmp(w->name, "Ext Spk Bottom Pos", 18)) msm8960_ext_spk_power_amp_on(BOTTOM_SPK_AMP_POS); else if (!strncmp(w->name, "Ext Spk Bottom Neg", 18)) msm8960_ext_spk_power_amp_on(BOTTOM_SPK_AMP_NEG); else if (!strncmp(w->name, "Ext Spk Top Pos", 15)) msm8960_ext_spk_power_amp_on(TOP_SPK_AMP_POS); else if (!strncmp(w->name, "Ext Spk Top Neg", 15)) msm8960_ext_spk_power_amp_on(TOP_SPK_AMP_NEG); else { pr_err("%s() Invalid Speaker Widget = %s\n", __func__, w->name); return -EINVAL; } #if defined (CONFIG_MACH_MSM8960_SIRIUSLTE) if (SND_SOC_DAPM_EVENT_ON(event) == SND_SOC_DAPM_POST_PMU) { ret = snd_subsystem_sp_poweron(); if (ret < 0) { pr_err("[ak7811] spkamp_event SPK ON fail...\n"); return -EINVAL; } } #endif } else { #if defined (CONFIG_MACH_MSM8960_SIRIUSLTE) ret = snd_subsystem_standby(SYSTEM_OFF); if (ret < 0) { pr_err("[ak7811] spkamp_event SPK OFF fail...\n"); return -EINVAL; } #endif if (!strncmp(w->name, "Ext Spk Bottom Pos", 18)) msm8960_ext_spk_power_amp_off(BOTTOM_SPK_AMP_POS); else if (!strncmp(w->name, "Ext Spk Bottom Neg", 18)) msm8960_ext_spk_power_amp_off(BOTTOM_SPK_AMP_NEG); else if (!strncmp(w->name, "Ext Spk Top Pos", 15)) msm8960_ext_spk_power_amp_off(TOP_SPK_AMP_POS); else if (!strncmp(w->name, "Ext Spk Top Neg", 15)) msm8960_ext_spk_power_amp_off(TOP_SPK_AMP_NEG); else { pr_err("%s() Invalid Speaker Widget = %s\n", __func__, w->name); return -EINVAL; } } return 0; }
void snd_extamp_api_call_fab_path(void) { int fab_path = 0; int fab_set = 0; fab_set = 1;//gpio_get_value(GPIO_SUBSYSTEM_ENABLE); //HDJ TEMP if(fab_set){ fab_path = snd_subsystem_get_device(); //HDJ TEMP //fab2210_set_default_data(); switch(fab_path){ /* case DEVICE_HANDSET_RX: printk("FAB_path handset_RX\n"); //snd_subsystem_sp_hp_poweron(); break; */ case DEVICE_SPEAKER_RX: printk("FAB_path speaker_RX\n"); snd_subsystem_sp_poweron(); //snd_subsystem_sp_poweron_postProc(); break; case DEVICE_HEADPHONE_RX: printk("FAB_path HEADPHONE_RX\n"); snd_subsystem_hp_poweron(); //snd_subsystem_hp_poweron_postProc(); break; case DEVICE_SPEAKER_HEADPHONE_RX: printk("FAB_path speaker headphone\n"); //snd_subsystem_tty_hp_poweron(); break; case 5://DEVICE_SND_DEVICE_VOICE_HEADSET_RX: //snd_subsystem_voice_hp_poweron(); //snd_subsystem_voice_hp_poweron_postProc(); break; default: break; } } }
void snd_extamp_api_call_fab_path(void) { int fab_path = 0; int fab_set = 0; //uint32_t audience_device = 0; //int audience_path_on = 0; #if 0//def CONFIG_PANTECH_LASER2_AUDIENCE2020 #ifdef FEATURE_SKY_SND_EXTAMPCTRL int audience_path_on = ext_audience_get_path_on(); uint32_t audience_device = ext_audience_get_device(); if(audience_path_on){ switch(audience_device){ case EXTAMP_NR_ON_CT: audience_a2020_ct_on(); break; case EXTAMP_NR_ON_FT: audience_a2020_ft_on(); break; case EXTAMP_NR_ON_DV: audience_a2020_dv_on(); break; default: break; } } #endif #endif fab_set = gpio_get_value(GPIO_SUBSYSTEM_ENABLE); if(fab_set){ fab_path = snd_subsystem_get_device(); fab2200_set_default_data(); switch(fab_path){ case DEVICE_SPEAKER_RX: snd_subsystem_sp_poweron(); break; case DEVICE_HEADSET_RX: snd_subsystem_hp_poweron(); break; case DEVICE_TTY_HEADSET_MONO_RX: snd_subsystem_tty_hp_poweron(); break; case DEVICE_SPEAKER_HEADSET_RX: snd_subsystem_sp_hp_poweron(); break; #ifdef CONFIG_PANTECH_LASER2_AUDIENCE2020 case DEVICE_SND_DEVICE_NR_FT_RX: snd_subsystem_nr_ft_poweron(); break; case DEVICE_SND_DEVICE_NR_OFF_FT_RX: snd_subsystem_nr_off_ft_poweron(); break; case DEVICE_SND_DEVICE_NR_DV_RX: snd_subsystem_nr_dv_poweron(); break; case DEVICE_SND_DEVICE_NR_OFF_DV_RX: snd_subsystem_nr_off_dv_poweron(); break; #endif default: break; } } }