card: Use VSID profiles only for debugging.
This commit is contained in:
parent
c895311db5
commit
2d1a50d450
1 changed files with 6 additions and 7 deletions
|
|
@ -171,7 +171,7 @@ struct profile_data {
|
||||||
struct virtual_profile virtual;
|
struct virtual_profile virtual;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef DROID_AUDIO_HAL_USE_VSID
|
#ifdef DROID_AUDIO_HAL_DEBUG_VSID
|
||||||
|
|
||||||
/* From hal/voice_extn/voice_extn.c */
|
/* From hal/voice_extn/voice_extn.c */
|
||||||
#define AUDIO_PARAMETER_KEY_VSID "vsid"
|
#define AUDIO_PARAMETER_KEY_VSID "vsid"
|
||||||
|
|
@ -215,7 +215,7 @@ static bool voicecall_vowlan_vsid_profile_event_cb(struct userdata *u, pa_droid_
|
||||||
static bool voicecall_voicemmode1_vsid_profile_event_cb(struct userdata *u, pa_droid_profile *p, bool enabling);
|
static bool voicecall_voicemmode1_vsid_profile_event_cb(struct userdata *u, pa_droid_profile *p, bool enabling);
|
||||||
static bool voicecall_voicemmode2_vsid_profile_event_cb(struct userdata *u, pa_droid_profile *p, bool enabling);
|
static bool voicecall_voicemmode2_vsid_profile_event_cb(struct userdata *u, pa_droid_profile *p, bool enabling);
|
||||||
|
|
||||||
#endif /* DROID_AUDIO_HAL_USE_VSID */
|
#endif /* DROID_AUDIO_HAL_DEBUG_VSID */
|
||||||
|
|
||||||
static void add_disabled_profile(pa_hashmap *profiles) {
|
static void add_disabled_profile(pa_hashmap *profiles) {
|
||||||
pa_card_profile *cp;
|
pa_card_profile *cp;
|
||||||
|
|
@ -449,7 +449,7 @@ static bool voicecall_profile_event_cb(struct userdata *u, pa_droid_profile *p,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DROID_AUDIO_HAL_USE_VSID
|
#ifdef DROID_AUDIO_HAL_DEBUG_VSID
|
||||||
static bool voicecall_vsid(struct userdata *u, pa_droid_profile *p, uint32_t vsid, bool enabling)
|
static bool voicecall_vsid(struct userdata *u, pa_droid_profile *p, uint32_t vsid, bool enabling)
|
||||||
{
|
{
|
||||||
char *setparam;
|
char *setparam;
|
||||||
|
|
@ -498,7 +498,7 @@ static bool voicecall_voicemmode2_vsid_profile_event_cb(struct userdata *u, pa_d
|
||||||
{
|
{
|
||||||
return voicecall_vsid(u, p, VOICEMMODE2_VSID, enabling);
|
return voicecall_vsid(u, p, VOICEMMODE2_VSID, enabling);
|
||||||
}
|
}
|
||||||
#endif /* DROID_AUDIO_HAL_USE_VSID */
|
#endif /* DROID_AUDIO_HAL_DEBUG_VSID */
|
||||||
|
|
||||||
static void virtual_event(struct userdata *u, struct profile_data *profile, bool enabling) {
|
static void virtual_event(struct userdata *u, struct profile_data *profile, bool enabling) {
|
||||||
pa_assert(u);
|
pa_assert(u);
|
||||||
|
|
@ -789,14 +789,13 @@ int pa__init(pa_module *m) {
|
||||||
add_virtual_profile(u, RINGTONE_PROFILE_NAME, RINGTONE_PROFILE_DESC,
|
add_virtual_profile(u, RINGTONE_PROFILE_NAME, RINGTONE_PROFILE_DESC,
|
||||||
AUDIO_MODE_RINGTONE, NULL,
|
AUDIO_MODE_RINGTONE, NULL,
|
||||||
PA_AVAILABLE_YES, NULL, data.profiles);
|
PA_AVAILABLE_YES, NULL, data.profiles);
|
||||||
#ifdef DROID_AUDIO_HAL_USE_VSID
|
#ifdef DROID_AUDIO_HAL_DEBUG_VSID
|
||||||
add_virtual_profile(u, VOICE_SESSION_VOICE1_PROFILE_NAME, VOICE_SESSION_VOICE1_PROFILE_DESC,
|
add_virtual_profile(u, VOICE_SESSION_VOICE1_PROFILE_NAME, VOICE_SESSION_VOICE1_PROFILE_DESC,
|
||||||
AUDIO_MODE_IN_CALL, voicecall_voice1_vsid_profile_event_cb,
|
AUDIO_MODE_IN_CALL, voicecall_voice1_vsid_profile_event_cb,
|
||||||
PA_AVAILABLE_YES, voicecall, data.profiles);
|
PA_AVAILABLE_YES, voicecall, data.profiles);
|
||||||
add_virtual_profile(u, VOICE_SESSION_VOICE2_PROFILE_NAME, VOICE_SESSION_VOICE2_PROFILE_DESC,
|
add_virtual_profile(u, VOICE_SESSION_VOICE2_PROFILE_NAME, VOICE_SESSION_VOICE2_PROFILE_DESC,
|
||||||
AUDIO_MODE_IN_CALL, voicecall_voice2_vsid_profile_event_cb,
|
AUDIO_MODE_IN_CALL, voicecall_voice2_vsid_profile_event_cb,
|
||||||
PA_AVAILABLE_YES, voicecall, data.profiles);
|
PA_AVAILABLE_YES, voicecall, data.profiles);
|
||||||
/* TODO: Probably enabled state needs to be determined dynamically for VOLTE and friends. */
|
|
||||||
add_virtual_profile(u, VOICE_SESSION_VOLTE_PROFILE_NAME, VOICE_SESSION_VOLTE_PROFILE_DESC,
|
add_virtual_profile(u, VOICE_SESSION_VOLTE_PROFILE_NAME, VOICE_SESSION_VOLTE_PROFILE_DESC,
|
||||||
AUDIO_MODE_IN_CALL, voicecall_volte_vsid_profile_event_cb,
|
AUDIO_MODE_IN_CALL, voicecall_volte_vsid_profile_event_cb,
|
||||||
PA_AVAILABLE_YES, voicecall, data.profiles);
|
PA_AVAILABLE_YES, voicecall, data.profiles);
|
||||||
|
|
@ -812,7 +811,7 @@ int pa__init(pa_module *m) {
|
||||||
add_virtual_profile(u, VOICE_SESSION_VOICEMMODE2_PROFILE_NAME, VOICE_SESSION_VOICEMMODE2_PROFILE_DESC,
|
add_virtual_profile(u, VOICE_SESSION_VOICEMMODE2_PROFILE_NAME, VOICE_SESSION_VOICEMMODE2_PROFILE_DESC,
|
||||||
AUDIO_MODE_IN_CALL, voicecall_voicemmode2_vsid_profile_event_cb,
|
AUDIO_MODE_IN_CALL, voicecall_voicemmode2_vsid_profile_event_cb,
|
||||||
PA_AVAILABLE_YES, voicecall, data.profiles);
|
PA_AVAILABLE_YES, voicecall, data.profiles);
|
||||||
#endif /* DROID_AUDIO_HAL_USE_VSID */
|
#endif /* DROID_AUDIO_HAL_DEBUG_VSID */
|
||||||
|
|
||||||
add_disabled_profile(data.profiles);
|
add_disabled_profile(data.profiles);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue