Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d144d7a authored by Alice Kuo's avatar Alice Kuo
Browse files

Check context type with AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING usage

As dial pad tone sound, the usage would be AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING with context type unknown. When bt stack receive this usage metadata during media streaming, it would trigger the reconfiguration to conversational, because the conversational is higher priority than media in the general case. So we check context type with AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING as well to avoid the unexpected reconfiguration

Bug: 231411704
Test: during media stream, and make the dial pad tone simultaneously, make
sure the media streaming normal

Change-Id: If14658e94282644d837bedff089e4029c7fc334c
parent 6480052c
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -3070,9 +3070,13 @@ class LeAudioClientImpl : public LeAudioClient {
      case AUDIO_USAGE_MEDIA:
      case AUDIO_USAGE_MEDIA:
        return LeAudioContextType::MEDIA;
        return LeAudioContextType::MEDIA;
      case AUDIO_USAGE_VOICE_COMMUNICATION:
      case AUDIO_USAGE_VOICE_COMMUNICATION:
      case AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING:
      case AUDIO_USAGE_CALL_ASSISTANT:
      case AUDIO_USAGE_CALL_ASSISTANT:
        return LeAudioContextType::CONVERSATIONAL;
        return LeAudioContextType::CONVERSATIONAL;
      case AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING:
        if (content_type == AUDIO_CONTENT_TYPE_SPEECH)
          return LeAudioContextType::CONVERSATIONAL;
        else
          return LeAudioContextType::MEDIA;
      case AUDIO_USAGE_GAME:
      case AUDIO_USAGE_GAME:
        return LeAudioContextType::GAME;
        return LeAudioContextType::GAME;
      case AUDIO_USAGE_NOTIFICATION:
      case AUDIO_USAGE_NOTIFICATION: