FreeBSD Bugzilla – Attachment 173625 Details for
Bug 211684
audio/pulseaudio: Respect hw.snd.default_unit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed patch (since 419133 revision) for v8.0
pulseaudio_8.0.diff (text/plain), 3.46 KB, created by
lightside
on 2016-08-13 10:12:58 UTC
(
hide
)
Description:
Proposed patch (since 419133 revision) for v8.0
Filename:
MIME Type:
Creator:
lightside
Created:
2016-08-13 10:12:58 UTC
Size:
3.46 KB
patch
obsolete
>--- pulseaudio.orig/Makefile 2016-04-01 13:29:15 UTC >+++ pulseaudio/Makefile >@@ -6,6 +6,7 @@ > > PORTNAME= pulseaudio > PORTVERSION= 8.0 >+PORTREVISION= 1 > CATEGORIES= audio > MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/ > >--- pulseaudio.orig/files/patch-src_modules_module-detect.c 2016-07-26 16:51:15 UTC >+++ pulseaudio/files/patch-src_modules_module-detect.c >@@ -10,13 +10,52 @@ > > static const char* const valid_modargs[] = { > "just-one", >-@@ -157,8 +159,7 @@ static int detect_oss(pa_core *c, int ju >+@@ -157,11 +159,45 @@ static int detect_oss(pa_core *c, int ju > continue; > > } else if (sscanf(line, "pcm%u: ", &device) == 1) { > - /* FreeBSD support, the devices are named /dev/dsp0.0, dsp0.1 and so on */ > - pa_snprintf(args, sizeof(args), "device=/dev/dsp%u.0", device); > + pa_snprintf(args, sizeof(args), "device=/dev/dsp%u", device); >++ pa_module *m = pa_module_load(c, "module-oss", args); > >- if (!pa_module_load(c, "module-oss", args)) >+- if (!pa_module_load(c, "module-oss", args)) >++ if (!m) >++ continue; >++ >++ if (!pa_endswith(line, "default")) > continue; >++ >++ const char *p = strrchr(line, '>'); >++ >++ if (!p) >++ continue; >++ >++ if (!c->default_sink && strstr(p, "play")) { >++ uint32_t idx = PA_IDXSET_INVALID; >++ pa_sink *s; >++ PA_IDXSET_FOREACH(s, c->sinks, idx) { >++ if (s->module == m) { >++ if (!pa_namereg_set_default_sink(c, s)) >++ pa_log_error("failed to set default sink for device: /dev/dsp%u", device); >++ >++ break; >++ } >++ } >++ } >++ >++ if (!c->default_source && strstr(p, "rec")) { >++ uint32_t idx = PA_IDXSET_INVALID; >++ pa_source *s; >++ PA_IDXSET_FOREACH(s, c->sources, idx) { >++ if (s->module == m) { >++ if (!pa_namereg_set_default_source(c, s)) >++ pa_log_error("failed to set default source for device: /dev/dsp%u", device); >++ >++ break; >++ } >++ } >++ } >+ } >+ >+ n++; >--- pulseaudio.orig/files/pkg-message.in 2015-06-14 02:54:49 UTC >+++ pulseaudio/files/pkg-message.in >@@ -1,8 +1,10 @@ >+Pulseaudio tries to determine default values for FreeBSD OSS driver at first >+start, based on /dev/sndstat output. The hw.snd.default_unit sysctl may affect >+these values, but restart of the Pulseaudio might be needed to rescan it again, >+e.g. `pacmd exit`. > >-Pulseaudio doesn't know about the hw.snd.default_unit=3 sysctl for the >-FreeBSD OSS driver that is used to select the active input/output. So >-for Pulseaudio we also need to tell it which input/output to use. The >-difference is that Pulseaudio has separate input and output configure lines. >+Pulseaudio has separate input and output configure lines. You can change them >+with using following commands: > > To change the default sink (output): > # pacmd set-default-sink 3 >@@ -11,7 +13,7 @@ > > This can also be set in %%PREFIX%%/etc/pulse/default.pa > >-Replace the number '3' with the new default your want to set. >+Replace the number '3' with the new default you want to set. > > > The audio/freedesktop-sound-theme is needed if the default sound files
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 211684
:
173433
|
173479
|
173511
|
173513
|
173514
|
173515
|
173625
|
173626
|
173915
|
175354
|
176133
|
176143
|
176830
|
176833