[ALSA] No sound in html5 video/audio with simple /etc/asound.conf (cubeb)

NEW
Unassigned

Status

()

Core
Audio/Video: cubeb
P4
normal
5 years ago
8 months ago

People

(Reporter: Octoploid, Unassigned)

Tracking

Trunk
All
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 (Beta/Release)
Build ID: 20130614113703

Steps to reproduce:

Play an html5 video (e.g. http://camendesign.com/code/video_for_everybody/test.html)



Actual results:

No sound is produced.
I use a TOSLINK connection to my DAC and a simple asound.conf:

pcm.!default {
  type hw
  card 0
  device 3
}

ctl.!default {
  type hw
  card 0
  device 3
}

to have bit-perfect playback (no resampling).
 
The DAC doesn't support FLOAT_LE:

 % aplay -v -c 2 -r 44100 -f FLOAT_LE /dev/zero
Playing raw data '/dev/zero' : Float 32 bit Little Endian, Rate 44100 Hz, Stereo
aplay: set_params:1233: Sample format non available
Available formats:
- S16_LE
- S32_LE

Changing my asound.conf to:

pcm.dsp {
    type plug
    slave.pcm "dmix"
}

"fixes" the issue, but then I don't have bit-perfect playback
anymore due to the resampling of dmix.

Updated

5 years ago
Component: Untriaged → Video/Audio
Product: Firefox → Core

Comment 1

4 years ago
Still present in current nightly. I have a vanilla sound setup (intel HDA integrated dsp, using default dmix).

My /etc/asound.conf literally does nothing to the sound stream (it specifies the default output is to dmix, which is the case even without an asound.conf):

pcm.!default {
    slave.pcm "plug:dmix"
}

Yet, with this file I get no sound from Firefox (every other alsa app works). If I remove the file and restart firefox, sound starts working again.
(Reporter)

Comment 2

4 years ago
This is still not fixed. I'm forced to use chromium for html5 videos because of this bug.
Severity: normal → major
Hardware: x86_64 → All
Version: 24 Branch → Trunk

Updated

4 years ago
Summary: No sound in html5 video/audio with simple /etc/asound.conf → [ALSA] No sound in html5 video/audio with simple /etc/asound.conf

Comment 3

3 years ago
Same here

Comment 4

3 years ago
In this config:
pcm.!default {
	type asym
	<placeholder>
	capture.pcm{
		type plug
		slave.pcm "BoostedMicrophone"
	}
}

These work when placed in <placeholder>:
	playback.pcm{ type plug
		slave.pcm "48k" #DMIX running at 48000
	}
	playback.pcm{ type plug
		slave.pcm "48k" #DMIX running at 48000
		slave.rate 48000
	}
These don't work, and the following line appears:
** (firefox:1937): CRITICAL **: gst_app_src_set_size: assertion 'GST_IS_APP_SRC (appsrc)' failed
	playback.pcm{ type plug
		slave.pcm "44k" #DMIX running at 44100
	}
	playback.pcm{ type hw
		card 0
	}
	playback.pcm{ type hw
		card 0
		rate 48000
	}
NOTE: all configs work with mplayer

Comment 5

3 years ago
Solution: use plughw (or plug + hw ) not HW directly, it does no rate convertion
Component: Audio/Video → Audio/Video: MSG/cubeb/GMP
Summary: [ALSA] No sound in html5 video/audio with simple /etc/asound.conf → [ALSA] No sound in html5 video/audio with simple /etc/asound.conf (cubeb)
Component: Audio/Video: MediaStreamGraph → Audio/Video: cubeb

Updated

2 years ago
Severity: major → normal
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Mass change P3->P4 to align with new Mozilla triage process.
Priority: P3 → P4
You need to log in before you can comment on or make changes to this bug.