Closed Bug 1468381 Opened 4 years ago Closed 2 years ago

Firefox does not respect system audio settings in MacOS

Categories

(Core :: Audio/Video: Playback, defect, P3)

61 Branch
x86
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox-esr60 --- unaffected
firefox-esr68 --- wontfix
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox72 --- wontfix
firefox73 --- fixed

People

(Reporter: janne.himanka, Assigned: chunmin)

References

Details

(Keywords: regression, regressionwindow-wanted, Whiteboard: [need info reporter 2018-06-25])

Attachments

(1 file)

58 bytes, text/x-github-pull-request
Details | Review
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0
Build ID: 20180607135512

Steps to reproduce:

Entered a site that attempts to play audio


Actual results:

I have a 2012 Macbook Pro, MacOS 10.13.5 (17F77), with MOTU Traveler Mk3 audio interface. MOTU has several analogue and digital outputs. I normally use just the AES/EBU digital outputs, and the analogue outputs are not connected to anything. This is the system default and all audio-using applications that I use, including Chrome and Safari, respect this default and use the AES/EBU output, except Firefox. From MOTU's software mixer I see that whenever I play audio with Firefox, it goes to the first two analogue channels of the MOTU. I have carefully gone through all OS and MOTU settings that could pertain to this and set them to use AES/EBU. Firefox is version 61.0b12 developer edition. 


With version 60, most sites that want to play audio work. Soundcloud does not. 


Expected results:

Firefox should respect the system default settings.
Component: Untriaged → Audio/Video: Playback
OS: Unspecified → Mac OS X
Product: Firefox → Core
Hardware: Unspecified → x86
Alex is this a known problem? Can you help me triage this?
Rank: 25
Flags: needinfo?(achronop)
Priority: -- → P3
I believe it's a problem with the new multichannel configuration in cubeb. @jya can you please verify?
Flags: needinfo?(achronop) → needinfo?(jyavenard)
I have no bandwidth to check into that.
Flags: needinfo?(jyavenard)
FWIW, no changes were made on which device to use, the new code use the existing device that was already opened. If the default output selection was broken, it can't be due to the multi-channels configuration, which only checks on the number of channels that particular device use.
Can you please provide the output of about:support page. You can use the "Copy raw data to clipboard" button and attach it to the bug. Thanks.
Flags: needinfo?(janne.himanka)
Whiteboard: [need info reporter 2018-06-20]
{
  "application": {
    "name": "Firefox",
    "osVersion": "Darwin 17.6.0",
    "version": "61.0b14",
    "buildID": "20180614135649",
    "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:61.0) Gecko/20100101 Firefox/61.0",
    "safeMode": false,
    "updateChannel": "aurora",
    "supportURL": "https://support.mozilla.org/1/firefox/61.0/Darwin/en-US/",
    "numTotalWindows": 2,
    "numRemoteWindows": 2,
    "remoteAutoStart": true,
    "currentContentProcesses": 5,
    "maxContentProcesses": 4,
    "autoStartStatus": 1,
    "policiesStatus": 0,
    "keyGoogleFound": true,
    "keyMozillaFound": true
  },
  "securitySoftware": {
    "registeredAntiVirus": "",
    "registeredAntiSpyware": "",
    "registeredFirewall": ""
  },
  "modifiedPreferences": {
    "accessibility.typeaheadfind.flashBar": 0,
    "browser.cache.disk.filesystem_reported": 1,
    "browser.cache.frecency_experiment": 2,
    "browser.cache.disk.smart_size.first_run": false,
    "browser.cache.disk.capacity": 358400,
    "browser.places.smartBookmarksVersion": 8,
    "browser.search.update": false,
    "browser.sessionstore.upgradeBackup.latestBuildID": "20180614135649",
    "browser.startup.homepage_override.mstone": "61.0",
    "browser.startup.homepage_override.buildID": "20180614135649",
    "browser.urlbar.lastSuggestionsPromptDate": 20170926,
    "browser.urlbar.placeholderName": "DuckDuckGo",
    "browser.urlbar.timesBeforeHidingSuggestionsHint": 0,
    "browser.urlbar.matchBuckets": "general:5,suggestion:Infinity",
    "dom.push.userAgentID": "def3775e858048829551758dd083dac1",
    "extensions.lastAppVersion": "61.0",
    "font.name.serif.x-western": "Monaco",
    "font.internaluseonly.changed": false,
    "general.autoScroll": false,
    "media.webrtc.debug.log_file": "/var/folders/mz/m89d4w7n5x33c22tx4z59fd80000gn/T/WebRTC.log",
    "media.benchmark.vp9.versioncheck": 2,
    "media.gmp-widevinecdm.lastUpdate": 1506448255,
    "media.gmp-gmpopenh264.lastUpdate": 1511423538,
    "media.gmp.storage.version.observed": 1,
    "media.gmp-widevinecdm.version": "1.4.8.1008",
    "media.gmp-gmpopenh264.abi": "x86_64-gcc3",
    "media.gmp-manager.lastCheck": 1529346267,
    "media.gmp-widevinecdm.abi": "x86_64-gcc3",
    "media.benchmark.vp9.fps": 176,
    "media.gmp-gmpopenh264.version": "1.7.1",
    "media.gmp-manager.buildID": "20180614135649",
    "network.prefetch-next": false,
    "network.dns.disablePrefetch": true,
    "network.http.speculative-parallel-limit": 0,
    "network.predictor.enabled": false,
    "network.predictor.cleaned-up": true,
    "network.cookie.prefsMigrated": true,
    "places.history.expiration.transient_current_max_pages": 135176,
    "places.database.lastMaintenance": 1529346566,
    "plugin.disable_full_page_plugin_for_types": "application/pdf",
    "privacy.sanitize.pending": "[{\"id\":\"newtab-container\",\"itemsToClear\":[],\"options\":{}}]",
    "security.sandbox.content.tempDirSuffix": "{ed027427-7584-0246-8517-d3b9a6626dda}",
    "services.sync.declinedEngines": "tabs",
    "services.sync.lastPing": 1529433662,
    "services.sync.lastSync": "Wed Jun 20 2018 19:37:28 GMT+0300 (EEST)",
    "services.sync.engine.passwords.validation.lastTime": 1527352552,
    "services.sync.engine.tabs": false,
    "services.sync.engine.bookmarks.validation.lastTime": 1527352552,
    "services.sync.engine.prefs.modified": false,
    "storage.vacuum.last.places.sqlite": 1527915574,
    "storage.vacuum.last.index": 1
  },
  "lockedPreferences": {},
  "media": {
    "currentAudioBackend": "audiounit",
    "currentMaxAudioChannels": 8,
    "currentPreferredSampleRate": 44100,
    "audioOutputDevices": [
      {
        "name": "Internal Speakers",
        "groupId": "AppleHDAEngineOutput:1B,0,1,1:0",
        "vendor": "Apple Inc.",
        "type": 2,
        "state": 2,
        "preferred": 0,
        "supportedFormat": 12336,
        "defaultFormat": 4096,
        "maxChannels": 2,
        "defaultRate": 44100,
        "maxRate": 96000,
        "minRate": 44100,
        "maxLatency": 4177,
        "minLatency": 95
      },
      {
        "name": "MOTU Traveler mk3",
        "groupId": "com_motu_driver_FWA_Engine:00000919b1",
        "vendor": "MOTU",
        "type": 2,
        "state": 2,
        "preferred": 15,
        "supportedFormat": 12336,
        "defaultFormat": 4096,
        "maxChannels": 14,
        "defaultRate": 44100,
        "maxRate": 192000,
        "minRate": 44100,
        "maxLatency": 1170,
        "minLatency": 32
      }
    ],
    "audioInputDevices": [
      {
        "name": "Internal Microphone",
        "groupId": "AppleHDAEngineInput:1B,0,1,0:1",
        "vendor": "Apple Inc.",
        "type": 1,
        "state": 2,
        "preferred": 0,
        "supportedFormat": 12336,
        "defaultFormat": 4096,
        "maxChannels": 2,
        "defaultRate": 44100,
        "maxRate": 96000,
        "minRate": 32000,
        "maxLatency": 4106,
        "minLatency": 24
      },
      {
        "name": "MOTU Traveler mk3",
        "groupId": "com_motu_driver_FWA_Engine:00000919b1",
        "vendor": "MOTU",
        "type": 1,
        "state": 2,
        "preferred": 15,
        "supportedFormat": 12336,
        "defaultFormat": 4096,
        "maxChannels": 20,
        "defaultRate": 44100,
        "maxRate": 192000,
        "minRate": 44100,
        "maxLatency": 1171,
        "minLatency": 33
      }
    ]
  },
  "javaScript": {
    "incrementalGCEnabled": true
  },
  "accessibility": {
    "isActive": false,
    "forceDisabled": 0,
    "handlerUsed": false,
    "instantiator": ""
  },
  "libraryVersions": {
    "NSPR": {
      "minVersion": "4.19",
      "version": "4.19"
    },
    "NSS": {
      "minVersion": "3.37.3",
      "version": "3.37.3"
    },
    "NSSUTIL": {
      "minVersion": "3.37.3",
      "version": "3.37.3"
    },
    "NSSSSL": {
      "minVersion": "3.37.3",
      "version": "3.37.3"
    },
    "NSSSMIME": {
      "minVersion": "3.37.3",
      "version": "3.37.3"
    }
  },
  "userJS": {
    "exists": false
  },
  "intl": {
    "localeService": {
      "requested": [
        "en-US"
      ],
      "available": [
        "en-US"
      ],
      "supported": [
        "en-US"
      ],
      "regionalPrefs": [
        "en-GB",
        "en-FI",
        "fi-FI"
      ],
      "defaultLocale": "en-US"
    },
    "osPrefs": {
      "systemLocales": [
        "en-GB",
        "en-FI",
        "fi-FI"
      ],
      "regionalPrefsLocales": [
        "en-GB",
        "en-FI",
        "fi-FI"
      ]
    }
  },
  "crashes": {
    "submitted": [],
    "pending": 0
  },
  "sandbox": {
    "contentSandboxLevel": 3,
    "effectiveContentSandboxLevel": 3
  },
  "graphics": {
    "numTotalWindows": 2,
    "numAcceleratedWindows": 2,
    "windowLayerManagerType": "OpenGL",
    "windowLayerManagerRemote": true,
    "windowUsingAdvancedLayers": false,
    "adapterDescription": "",
    "adapterVendorID": "0x8086",
    "adapterDeviceID": "0x0166",
    "adapterRAM": "",
    "adapterDrivers": "",
    "driverVersion": "",
    "driverDate": "",
    "usesTiling": true,
    "contentUsesTiling": true,
    "offMainThreadPaintEnabled": true,
    "offMainThreadPaintWorkerCount": 3,
    "webgl1Renderer": "NVIDIA Corporation -- NVIDIA GeForce GT 650M OpenGL Engine",
    "webgl1Version": "4.1 NVIDIA-10.30.33 355.11.10.10.35.101",
    "webgl1DriverExtensions": "GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_depth_bounds_test GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_mirror_clamp GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier",
    "webgl1Extensions": "ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_frag_depth EXT_sRGB EXT_shader_texture_lod EXT_texture_filter_anisotropic EXT_disjoint_timer_query OES_element_index_uint OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context",
    "webgl1WSIInfo": "CGL",
    "webgl2Renderer": "NVIDIA Corporation -- NVIDIA GeForce GT 650M OpenGL Engine",
    "webgl2Version": "4.1 NVIDIA-10.30.33 355.11.10.10.35.101",
    "webgl2DriverExtensions": "GL_ARB_blend_func_extended GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_ES2_compatibility GL_ARB_explicit_attrib_location GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader5 GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_occlusion_query2 GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_separate_shader_objects GL_ARB_shader_bit_encoding GL_ARB_shader_subroutine GL_ARB_shading_language_include GL_ARB_tessellation_shader GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_cube_map_array GL_ARB_texture_gather GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_vertex_attrib_64bit GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_depth_bounds_test GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_mirror_clamp GL_EXT_texture_sRGB_decode GL_APPLE_client_storage GL_APPLE_container_object_shareable GL_APPLE_flush_render GL_APPLE_object_purgeable GL_APPLE_rgb_422 GL_APPLE_row_bytes GL_APPLE_texture_range GL_ATI_texture_mirror_once GL_NV_texture_barrier",
    "webgl2Extensions": "EXT_color_buffer_float EXT_texture_filter_anisotropic EXT_disjoint_timer_query OES_texture_float_linear WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context",
    "webgl2WSIInfo": "CGL",
    "info": {
      "AzureCanvasBackend": "skia",
      "AzureFallbackCanvasBackend": "none",
      "AzureContentBackend": "skia",
      "AzureCanvasAccelerated": 1,
      "ApzWheelInput": 1,
      "ApzDragInput": 1,
      "ApzKeyboardInput": 1,
      "ApzAutoscrollInput": 1,
      "TileHeight": 1024,
      "TileWidth": 1024
    },
    "featureLog": {
      "features": [
        {
          "name": "HW_COMPOSITING",
          "description": "Compositing",
          "status": "available",
          "log": [
            {
              "type": "default",
              "status": "available"
            }
          ]
        },
        {
          "name": "OPENGL_COMPOSITING",
          "description": "OpenGL Compositing",
          "status": "available",
          "log": [
            {
              "type": "default",
              "status": "available"
            }
          ]
        },
        {
          "name": "WEBRENDER",
          "description": "WebRender",
          "status": "unavailable",
          "log": [
            {
              "type": "default",
              "status": "opt-in",
              "message": "WebRender is an opt-in feature"
            },
            {
              "type": "runtime",
              "status": "unavailable",
              "message": "Build doesn't include WebRender"
            }
          ]
        },
        {
          "name": "OMTP",
          "description": "Off Main Thread Painting",
          "status": "available",
          "log": [
            {
              "type": "default",
              "status": "available"
            }
          ]
        }
      ],
      "fallbacks": []
    },
    "crashGuards": []
  },
  "extensions": [
    {
      "name": "DuckDuckGo Privacy Essentials",
      "version": "2018.5.24",
      "isActive": true,
      "id": "jid1-ZAdIEUB7XOzOJw@jetpack"
    },
    {
      "name": "Oxford English Dictionary",
      "version": "1.0",
      "isActive": true,
      "id": "oxford-english-dictionary@mozilla.org"
    },
    {
      "name": "React Developer Tools",
      "version": "3.2.3",
      "isActive": true,
      "id": "@react-devtools"
    },
    {
      "name": "Shortkeys (Custom Keyboard Shortcuts)",
      "version": "2.2.7",
      "isActive": true,
      "id": "Shortkeys@Shortkeys.com"
    },
    {
      "name": "Test Pilot",
      "version": "3.0.3vfd65300",
      "isActive": true,
      "id": "@testpilot-addon"
    },
    {
      "name": "uBlock Origin",
      "version": "1.16.10",
      "isActive": true,
      "id": "uBlock0@raymondhill.net"
    }
  ],
  "features": [
    {
      "name": "Activity Stream",
      "version": "2018.05.30.0900-c6d48b86",
      "id": "activity-stream@mozilla.org"
    },
    {
      "name": "Application Update Service Helper",
      "version": "2.0",
      "id": "aushelper@mozilla.org"
    },
    {
      "name": "Firefox Screenshots",
      "version": "32.1.0",
      "id": "screenshots@mozilla.org"
    },
    {
      "name": "Follow-on Search Telemetry",
      "version": "0.9.7",
      "id": "followonsearch@mozilla.com"
    },
    {
      "name": "Form Autofill",
      "version": "1.0",
      "id": "formautofill@mozilla.org"
    },
    {
      "name": "Photon onboarding",
      "version": "1.0",
      "id": "onboarding@mozilla.org"
    },
    {
      "name": "Pocket",
      "version": "1.0.5",
      "id": "firefox@getpocket.com"
    },
    {
      "name": "Web Compat",
      "version": "2.0",
      "id": "webcompat@mozilla.org"
    },
    {
      "name": "WebCompat Reporter",
      "version": "1.0.0",
      "id": "webcompat-reporter@mozilla.org"
    }
  ]
}
Flags: needinfo?(janne.himanka)
To recap what is going on here on Firefox 60 most of the sites works well, which means that they use the AES/EBU digital output, but Soundcloud is not working well, which means it is using the analog output.

On the other hand, on Firefox 61 none of the sites work well which means that playback, in every case, goes through the analog output.

If that's the case can you please run mozregression [1] to find out which commit, between 60 and 61, has changed the behavior? 

[1] https://mozilla.github.io/mozregression/quickstart.html
Flags: needinfo?(janne.himanka)
Whiteboard: [need info reporter 2018-06-20] → [need info reporter 2018-06-25]
The regression is probably jya's patches that manually map to the first two channels. We should have a look at how we used to do things and revert back to this, while still allowing multichannel output.
(In reply to Paul Adenot (:padenot) from comment #8)
> The regression is probably jya's patches that manually map to the first two
> channels. We should have a look at how we used to do things and revert back
> to this, while still allowing multichannel output.

but this isn't related to how many channels are used but that an audio device different to the one selected is being used  (going to the analog output rather than the digital one).
This is related to the fact that we're using the first two channels of a device regardless of how the device is setup. It is possible to configure a device such that the stereo output is not the first two channels.

The Web Audio API and anything else that uses a MediaStreamGraph uses UNDEFINED mapping, and then it goes wrong.
See Also: → 1475145
I have the same problem in Firefox 64.0 on MacOS Mojave, using 18-channel Roland MX-1 as audio output (channels 17 and 18 are the stereo outputs I have configured in Mac audio settings). This is how Firefox sees the device:

      {
        "name": "MX-1",
        "groupId": "jp_co_roland_RDUSB01A3Dev_AudioEngine:00311000:0",
        "vendor": "Roland",
        "type": 2,
        "state": 2,
        "preferred": 15,
        "supportedFormat": 12336,
        "defaultFormat": 4096,
        "maxChannels": 18,
        "defaultRate": 96000,
        "maxRate": 96000,
        "minRate": 96000,
        "maxLatency": 4106,
        "minLatency": 39
      },

It seems that Firefox ignores the system audio setting and outputs only to channels 1 and 2. When using a 2-channel audio device it works fine.
(In reply to Paul Adenot (:padenot) from comment #8)
> The regression is probably jya's patches that manually map to the first two
> channels. We should have a look at how we used to do things and revert back
> to this, while still allowing multichannel output.

Based on this it's a 61 regression (bug 1432779 or bug 1431221).

Hello, though I am not a developer I am a passionate FireFox user. I am seeing this same issue while using FireFox 69.0.3 on macOS Mohavi with a Universal Audio Apollo x8 interface. When I configure the main macOS audio to route out interface output channels (i.e. channels 5/6), all apps route correctly through the macOS settings (i.e. Chrome, Safari, iTunes, Virtual Instruments, DAW software, etc). FireFox still routes out the main channels 1 and 2.

Is this issue able to be fixed? Is there any manual workaround I can use. I would love to continue to use FireFox on my recording workstation but this issue prevents this.

Thank you!

With multiple reports I'll confirm this. Chunmin, do you have bandwidth enough to put this on your plate?

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(cchang)

I will take a look.

Assignee: nobody → cchang
Flags: needinfo?(cchang)
See Also: → 1552928
Attached file GitHub Pull Request

Creating a new mixer that would follow the user-defined channel settings.

bug 1605471 will import the new mixer (Attachment 9106610 [details]) in the rust backend to see if this can be solved.

Depends on: 1605471

Can people here try again in a Nightly build? We've made some modifications recently that has fixed similar problems for other people, that had opened other bugs about this.

Flags: needinfo?(janne.himanka)

I was able to download the Nightly build (74.0a1 2020-01-09 64-bit) and test this on a Mac (macOS Mojave 10.14.6). I can confirm this is working properly and FireFox's audio now recognizes and correctly routes audio through the assigned Mac OS output channels.

Great job... thank you for addressing this!

A nice addition would be to allow users to select the output device and output channels FireFox uses (for users with systems that have multiple interfaces or outputs).

Cheers!

The new mixer is the MacOS Rust backend only for now, but it will be set as the default backend on MacOS soon.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.