Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Aug 2016 14:25:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        gnome@FreeBSD.org
Subject:   [Bug 211684] audio/pulseaudio: Respect hw.snd.default_unit
Message-ID:  <bug-211684-6497-fQ4KTxNQlT@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-211684-6497@https.bugs.freebsd.org/bugzilla/>
References:  <bug-211684-6497@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211684

--- Comment #4 from lightside <lightside@gmx.com> ---
Created attachment 173511
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D173511&action=
=3Dedit
Proposed patch (since 419133 revision) for v8.0

(In reply to comment #3)
> I think, the other possible approach is following:
> If user didn't set-default-sink (or other possible value(s)), then try to
> determine the hw.snd.default_unit and change it accordingly.
I created new patch for mentioned approach, which also parses "play" and "r=
ec"
strings to determine the default sink and/or source device(s).
While testing I noticed, that PulseAudio may decide to use previously chang=
ed
default sink, in case of source only device, for example:
# sysctl hw.snd.default_unit=3D0
hw.snd.default_unit: 0 -> 0
% cat /dev/sndstat | sed -e 's|<.*>|<Some device>|'
Installed devices:
pcm0: <Some device> (play/rec) default
pcm1: <Some device> (play)
pcm2: <Some device> (rec)
% echo -n | paplay --raw
% pacmd dump | grep set-default-s
set-default-sink oss_output.dsp0
set-default-source oss_input.dsp0
% pacmd exit

# sysctl hw.snd.default_unit=3D1
hw.snd.default_unit: 0 -> 1
% cat /dev/sndstat | sed -e 's|<.*>|<Some device>|'
Installed devices:
pcm0: <Some device> (play/rec)
pcm1: <Some device> (play) default
pcm2: <Some device> (rec)
% echo -n | paplay --raw
% pacmd dump | grep set-default-s
set-default-sink oss_output.dsp1
set-default-source oss_input.dsp0
% pacmd exit

# sysctl hw.snd.default_unit=3D2
hw.snd.default_unit: 1 -> 2
% cat /dev/sndstat | sed -e 's|<.*>|<Some device>|'
Installed devices:
pcm0: <Some device> (play/rec)
pcm1: <Some device> (play)
pcm2: <Some device> (rec) default
% echo -n | paplay --raw
% pacmd dump | grep set-default-s
set-default-sink oss_output.dsp1
set-default-source oss_input.dsp2
% pacmd exit

# sysctl hw.snd.default_unit=3D0
hw.snd.default_unit: 2 -> 0
% echo -n | paplay --raw
% pacmd dump | grep set-default-s
set-default-sink oss_output.dsp0
set-default-source oss_input.dsp0
% pacmd exit

# sysctl hw.snd.default_unit=3D2
hw.snd.default_unit: 0 -> 2
% echo -n | paplay --raw
% pacmd dump | grep set-default-s
set-default-sink oss_output.dsp0
set-default-source oss_input.dsp2
% pacmd exit

# sysctl hw.snd.default_unit=3D0
hw.snd.default_unit: 2 -> 0
% echo -n | paplay --raw
% pacmd dump | grep set-default-s
set-default-sink oss_output.dsp0
set-default-source oss_input.dsp0
% pacmd exit

--=20
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211684-6497-fQ4KTxNQlT>