Skip to content

Firefox 127 not playing audio out Channels assigned in Audio MIDI setup #232

Closed
@ChunMinChang

Description

@ChunMinChang

This issue is mirrored from BMO 1904734, as detailed in comments #6 and #7.

On my Cubilux Surround Sound Card (CA7), the channel layout is set to [BackLeft, BackRight, FrontCenter, LowFrequency, FrontLeft, FrontRight]. However, audio only comes out of the first two channels when tested in Firefox and with test_tone. With a 2-channel input and a 6-channel output, a Mixer should be created to upmix the audio.

I am not sure what kAudioUnitProperty_AudioChannelLayout setting is supposed to do, but it doesn't seem to change my Cubilux device setting. Instead, it sets maybe_need_mixer to false, preventing the mixer from being created.

Commenting out the kAudioUnitProperty_AudioChannelLayout setting doesn't solve the problem, as the output_dev_desc's mChannelsPerFrame still reports 2. This leads to creating a 2-channel output mixer, even though the device_layout correctly reflects the channel layout.

The channels of output_dev_desc are defined by output_hw_desc.mChannelsPerFrame, which is expected to reflect the hardware information. However, it also reports 2 in this case. The output_hw_desc is queried from the kAudioUnitProperty_StreamFormat property. Changing the query scope from kAudioUnitScope_Input to kAudioUnitScope_Output makes output_hw_desc report the expected mChannelsPerFrame value of 6, resulting in an output_dev_desc setting that allows the creation of a 6-channel output mixer.

In summary, commenting out the kAudioUnitProperty_AudioChannelLayout setting and changing the query scope for kAudioUnitProperty_StreamFormat fixes the issue. These changes were introduced in PR #220 and PR #222. However, there were no comments or explanations detailing the issues they were meant to address. Without this context, I am unsure if reverting these changes is the right approach or if it might lead to other regressions.

@Pehrsons, @padenot, do you remember what those settings do? I'd like to leave some discussion here or on the bug for future reference. Feel free to comment with your thoughts about the right approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions