← Back to team overview

ubuntu-phone team mailing list archive

Re: baresip for BQ E4.5 and M10 with working audio

 

El día Wednesday, June 15, 2016 a las 10:34:53AM +0200, Reiner Klenk escribió:

> Mixer GUI could be useful, but generally everything should work without it.
> You don't want to change the sink volume because that affects all possible
> sound sources.

Correct. Using this effects as well for example the browser-app playing
a stream.

> The way it works now ist that an app creates a playback
> device in pulseaudio and the volume rocker changes the volume of that
> specific playback device as long as the app is in focus. That way the
> volume can be set differently for each app. In addition there is a slider
> to change the ringtone volume in settings. I don't know how this creation
> of a playback device and attaching it to the volume rocker is done.

When playing a stream with the browser-app the output of 'pactl list sink-inputs'
looks like this. The Sink Input #0 is always there, even if no other app
is running, while the #88 is of the browser:

$ pactl list sink-inputs

Sink Input #0
	Driver: protocol-native.c
	Owner Module: 11
	Client: 7
	Sink: 0
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Format: pcm, format.sample_format = "\"s16le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
	Corked: yes
	Mute: no
	Volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	Buffer Latency: 31383 usec
	Sink Latency: 92000 usec
	Resample method: n/a
	Properties:
		media.name = "QtPulseSample-2853-10483936"
		application.name = "QtPulseAudio:2853"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "30"
		media.role = "feedbacksound"
		application.process.id = "2853"
		application.process.user = "phablet"
		application.process.host = "ubuntu-phablet"
		application.process.binary = "maliit-server"
		application.language = "en_GB.UTF-8"
		application.process.machine_id = "ubuntu-phablet"
		application.process.session_id = "c1"
		module-stream-restore.id = "sink-input-by-media-role:feedbacksound"

Sink Input #88
	Driver: protocol-native.c
	Owner Module: 11
	Client: 161
	Sink: 0
	Sample Specification: s16le 2ch 44100Hz
	Channel Map: front-left,front-right
	Format: pcm, format.sample_format = "\"s16le\""  format.rate = "44100"  format.channels = "2"  format.channel_map = "\"front-left,front-right\""
	Corked: no
	Mute: no
	Volume: front-left: 65535 / 100% / -0.00 dB,   front-right: 65535 / 100% / -0.00 dB
	        balance 0.00
	Buffer Latency: 69659 usec
	Sink Latency: 92000 usec
	Resample method: n/a
	Properties:
		application.icon_name = "chromium-browser"
		media.role = "multimedia"
		media.name = "Playback"
		application.name = "Browser"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "30"
		application.process.id = "7296"
		application.process.user = "phablet"
		application.process.host = "ubuntu-phablet"
		application.process.binary = "webbrowser-app"
		application.language = "en_GB.UTF-8"
		application.process.machine_id = "ubuntu-phablet"
		application.process.session_id = "c1"
		module-stream-restore.id = "sink-input-by-media-role:multimedia"

When 'baresip' is running, there is no other Sink input, only the number #0 is shown.

> The
> problem with baresip seems to be that the volume rocker ist not attached to
> its pulseaudio playback device. You can list the playback devices with
> "pactl list sink-inputs". Could be that if you make a GUI wrapper for
> baresip this would work automatically.

I started a small QML app I wrote. This by its own does not create a
new Sink. There must be more logic behind the scene.



-- 
Matthias Apitz, ✉ guru@xxxxxxxxxxx, ⌂ http://www.unixarea.de/  ☎ +49-176-38902045
"Die Verkaufsschlager des Buchmarkts geben Auskunft über den Zustand einer Gesellschaft bzw.
sind, was diese Zeiten angeht, Gradmesser fortschreitenden Schwachsinns. ..." (jW 19.05.2016)


Follow ups

References