/* Check dual_out option */
if (option & AVSYS_AUDIO_PATH_OPTION_DUAL_OUT) {
debug_log("MFLD: Set audio path to dual out");
+ MMSoundMgrPulseSetDefaultSink (DEVICE_API_ALSA, DEVICE_BUS_WIRED);
ret = set_dual_out();
return ret;
/* Check output device */
int headset_route;
debug_fenter();
- /* check if switching to headset: numid=34 "Headset Playback Route" */
- err = sound_card_ctrl_get(34, &headset_route);
+
+ /* set dual out: numid=35 "Speaker Mux Playback Route" 1,1 */
+ err = sound_card_ctrl_set(35, 1);
if (err < 0) {
- debug_error("MFLD: failed to get alsa element for headset route");
+ debug_error("MFLD: failed to set alsa element for dual out");
return 1;
}
-
- if (headset_route == 0) {
- debug_log("MFLD: headset is inserted, set dual out");
- /* set dual out: numid=35 "Speaker Mux Playback Route" 1,1 */
- err = sound_card_ctrl_set(35, 1);
- if (err < 0) {
- debug_error("MFLD: failed to set alsa element for dual out");
- return 1;
- }
- debug_log("MFLD: set dual out successfully");
- }
- else {
- debug_log("MFLD: headset is not inserted, skip the set");
- }
+ debug_log("MFLD: set dual out successfully");
debug_fleave();
return 0;