[tvos] Use only supported AVAudioSession options on tvOS [chromium/src : main]

0 views
Skip to first unread message

Abhijeet Kandalkar (Gerrit)

unread,
Jul 7, 2025, 1:53:33 PM7/7/25
to Thomas Guilbert, Raphael Kubo da Costa, Gyuyoung Kim, Julie Jeongeun Kim, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, cobalt-...@google.com, feature-me...@chromium.org, ios-r...@chromium.org
Attention needed from Raphael Kubo da Costa and Thomas Guilbert

Abhijeet Kandalkar voted and added 3 comments

Votes added by Abhijeet Kandalkar

Commit-Queue+1

3 comments

File media/audio/ios/audio_session_manager_ios.mm
Line 33, Patchset 3: NSString* category;
Raphael Kubo da Costa . resolved
```suggestion
AVAudioSessionCategory category;
```
Abhijeet Kandalkar

Done

Line 41, Patchset 3: options = 0;
Raphael Kubo da Costa . resolved

This is a larger change that's not explained in the commit message; why shouldn't the other options be used on tvOS? Does it work if you don't touch the existing assignment?

Abhijeet Kandalkar

I have updated commit message. It works but gives an error on console for Bluetooth related options as below :
```
Failed to set audio session category with error: The operation couldn’t be completed. (OSStatus error -50.).
```

Line 93, Patchset 3: CHECK([currentRoute.outputs count] > 0) << "No audio output route found";
Raphael Kubo da Costa . resolved

This wasn't in the previous patch sets; any particular reason for introducing this now? My advice is to make this CL as small and self-contained as possible, and introduce new `CHECK`s separately to avoid mixing changes and discussions.

Abhijeet Kandalkar

Acknowledged

Open in Gerrit

Related details

Attention is currently required from:
  • Raphael Kubo da Costa
  • Thomas Guilbert
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7df6dccc0eddd2822d649d91a997587c08cff2c1
Gerrit-Change-Number: 6704423
Gerrit-PatchSet: 5
Gerrit-Owner: Abhijeet Kandalkar <abhi...@igalia.com>
Gerrit-Reviewer: Abhijeet Kandalkar <abhi...@igalia.com>
Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
Gerrit-CC: Gyuyoung Kim <gyuy...@igalia.com>
Gerrit-CC: Julie Jeongeun Kim <jk...@igalia.com>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Thomas Guilbert <tgui...@chromium.org>
Gerrit-Attention: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Comment-Date: Mon, 07 Jul 2025 17:53:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Raphael Kubo da Costa <ku...@igalia.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Thomas Guilbert (Gerrit)

unread,
Jul 7, 2025, 2:17:54 PM7/7/25
to Abhijeet Kandalkar, Thomas Guilbert, Raphael Kubo da Costa, Gyuyoung Kim, Julie Jeongeun Kim, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, cobalt-...@google.com, feature-me...@chromium.org, ios-r...@chromium.org
Attention needed from Abhijeet Kandalkar and Raphael Kubo da Costa

Thomas Guilbert voted and added 1 comment

Votes added by Thomas Guilbert

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Thomas Guilbert . resolved

LGTM, with the caveat that I am not very familiar with tvOS. These changes still look sensible to me.

Open in Gerrit

Related details

Attention is currently required from:
  • Abhijeet Kandalkar
  • Raphael Kubo da Costa
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7df6dccc0eddd2822d649d91a997587c08cff2c1
Gerrit-Change-Number: 6704423
Gerrit-PatchSet: 5
Gerrit-Owner: Abhijeet Kandalkar <abhi...@igalia.com>
Gerrit-Reviewer: Abhijeet Kandalkar <abhi...@igalia.com>
Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
Gerrit-CC: Gyuyoung Kim <gyuy...@igalia.com>
Gerrit-CC: Julie Jeongeun Kim <jk...@igalia.com>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Abhijeet Kandalkar <abhi...@igalia.com>
Gerrit-Attention: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Comment-Date: Mon, 07 Jul 2025 18:17:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Abhijeet Kandalkar (Gerrit)

unread,
Jul 7, 2025, 9:20:40 PM7/7/25
to Thomas Guilbert, Raphael Kubo da Costa, Gyuyoung Kim, Julie Jeongeun Kim, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, cobalt-...@google.com, feature-me...@chromium.org, ios-r...@chromium.org
Attention needed from Raphael Kubo da Costa

Abhijeet Kandalkar added 1 comment

Patchset-level comments
Abhijeet Kandalkar . resolved

Thanks for review Thomas and Raphael.

Open in Gerrit

Related details

Attention is currently required from:
  • Raphael Kubo da Costa
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7df6dccc0eddd2822d649d91a997587c08cff2c1
Gerrit-Change-Number: 6704423
Gerrit-PatchSet: 5
Gerrit-Owner: Abhijeet Kandalkar <abhi...@igalia.com>
Gerrit-Reviewer: Abhijeet Kandalkar <abhi...@igalia.com>
Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
Gerrit-CC: Gyuyoung Kim <gyuy...@igalia.com>
Gerrit-CC: Julie Jeongeun Kim <jk...@igalia.com>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Attention: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-Comment-Date: Tue, 08 Jul 2025 01:20:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
open
diffy

Abhijeet Kandalkar (Gerrit)

unread,
Jul 7, 2025, 9:20:44 PM7/7/25
to Thomas Guilbert, Raphael Kubo da Costa, Gyuyoung Kim, Julie Jeongeun Kim, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, cobalt-...@google.com, feature-me...@chromium.org, ios-r...@chromium.org
Attention needed from Raphael Kubo da Costa

Abhijeet Kandalkar voted Commit-Queue+2

Commit-Queue+2
Gerrit-Comment-Date: Tue, 08 Jul 2025 01:20:24 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Jul 7, 2025, 9:23:16 PM7/7/25
to Abhijeet Kandalkar, Thomas Guilbert, Raphael Kubo da Costa, Gyuyoung Kim, Julie Jeongeun Kim, AyeAye, chromium...@chromium.org, cobalt-...@google.com, feature-me...@chromium.org, ios-r...@chromium.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
[tvos] Use only supported AVAudioSession options on tvOS

This change ensures that only valid audio session categories and options
are used for tvOS, preventing runtime and compile-time errors, and
improving platform reliability and correctness.

- Fixes audio unit initialization failure on tvOS by ensuring
AVAudioSessionCategoryPlayback is used. tvOS does not support
AVAudioSessionCategoryPlayAndRecord or any recording functionality.
This change ensures AVAudioSessionCategoryPlayAndRecord is only used
on iOS.

- Avoids setting unsupported AVAudioSessionCategoryOptions on tvOS:
1. AVAudioSessionCategoryOptionDefaultToSpeaker is not available on
tvOS and will cause a compile-time error if used.
2. AVAudioSessionCategoryOptionAllowBluetooth and
AVAudioSessionCategoryOptionAllowBluetoothA2DP are not supported
on tvOS. Attempting to use them results in a runtime error
(OSStatus -50) because tvOS does not support Bluetooth audio
output.
3. AVAudioSessionCategoryOptionMixWithOthers is not meaningful on
tvOS, since only one app can play audio at a time; there is no
background audio mixing. The only valid and supported options
value on tvOS is 0.

- Clarifies output port override logic for tvOS:
- tvOS hardware only supports a single output route (HDMIOutput),
which is always the default and cannot be overridden
programmatically.The overrideOutputAudioPort API and related options
are not applicable on tvOS.
Bug: 391914246
Change-Id: I7df6dccc0eddd2822d649d91a997587c08cff2c1
Reviewed-by: Thomas Guilbert <tgui...@chromium.org>
Commit-Queue: Abhijeet Kandalkar <abhi...@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1483481}
Files:
Change size: S
Delta: 1 file changed, 27 insertions(+), 12 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Thomas Guilbert
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I7df6dccc0eddd2822d649d91a997587c08cff2c1
Gerrit-Change-Number: 6704423
Gerrit-PatchSet: 6
Gerrit-Owner: Abhijeet Kandalkar <abhi...@igalia.com>
Gerrit-Reviewer: Abhijeet Kandalkar <abhi...@igalia.com>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Thomas Guilbert <tgui...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages