View | Details | Raw Unified | Return to bug 211684 | Differences between
and this patch

Collapse All | Expand All

(-)pulseaudio/Makefile (+1 lines)
Lines 6-11 Link Here
6
6
7
PORTNAME=	pulseaudio
7
PORTNAME=	pulseaudio
8
PORTVERSION=	9.0
8
PORTVERSION=	9.0
9
PORTREVISION=	1
9
CATEGORIES=	audio
10
CATEGORIES=	audio
10
MASTER_SITES=	http://freedesktop.org/software/pulseaudio/releases/
11
MASTER_SITES=	http://freedesktop.org/software/pulseaudio/releases/
11
12
(-)pulseaudio/files/patch-src_modules_module-detect.c (-2 / +41 lines)
Lines 1-12 Link Here
1
--- src/modules/module-detect.c.orig	2016-05-10 12:28:04 UTC
1
--- src/modules/module-detect.c.orig	2016-05-10 12:28:04 UTC
2
+++ src/modules/module-detect.c
2
+++ src/modules/module-detect.c
3
@@ -160,8 +160,7 @@ static int detect_oss(pa_core *c, int ju
3
@@ -160,11 +160,45 @@ static int detect_oss(pa_core *c, int ju
4
                 continue;
4
                 continue;
5
 
5
 
6
         } else if (sscanf(line, "pcm%u: ", &device) == 1) {
6
         } else if (sscanf(line, "pcm%u: ", &device) == 1) {
7
-            /* FreeBSD support, the devices are named /dev/dsp0.0, dsp0.1 and so on */
7
-            /* FreeBSD support, the devices are named /dev/dsp0.0, dsp0.1 and so on */
8
-            pa_snprintf(args, sizeof(args), "device=/dev/dsp%u.0", device);
8
-            pa_snprintf(args, sizeof(args), "device=/dev/dsp%u.0", device);
9
+            pa_snprintf(args, sizeof(args), "device=/dev/dsp%u", device);
9
+            pa_snprintf(args, sizeof(args), "device=/dev/dsp%u", device);
10
+            pa_module *m = pa_module_load(c, "module-oss", args);
10
 
11
 
11
             if (!pa_module_load(c, "module-oss", args))
12
-            if (!pa_module_load(c, "module-oss", args))
13
+            if (!m)
14
+                continue;
15
+
16
+            if (!pa_endswith(line, "default"))
17
+                continue;
18
+
19
+            const char *p = strrchr(line, '(');
20
+
21
+            if (!p)
12
                 continue;
22
                 continue;
23
+
24
+            if (!c->default_sink && (strstr(p, "play") || (strstr(p, "p:") && !strstr(p, "(0p:")))) {
25
+                uint32_t idx = PA_IDXSET_INVALID;
26
+                pa_sink *s;
27
+                PA_IDXSET_FOREACH(s, c->sinks, idx) {
28
+                    if (s->module == m) {
29
+                        if (!pa_namereg_set_default_sink(c, s))
30
+                            pa_log_error("failed to set default sink for device: /dev/dsp%u", device);
31
+
32
+                        break;
33
+                    }
34
+                }
35
+            }
36
+
37
+            if (!c->default_source && (strstr(p, "rec") || (strstr(p, "r:") && !strstr(p, "/0r:")))) {
38
+                uint32_t idx = PA_IDXSET_INVALID;
39
+                pa_source *s;
40
+                PA_IDXSET_FOREACH(s, c->sources, idx) {
41
+                    if (s->module == m) {
42
+                        if (!pa_namereg_set_default_source(c, s))
43
+                            pa_log_error("failed to set default source for device: /dev/dsp%u", device);
44
+
45
+                        break;
46
+                    }
47
+                }
48
+            }
49
         }
50
 
51
         n++;
(-)pulseaudio/files/pkg-message.in (-5 / +7 lines)
Lines 1-8 Link Here
1
Pulseaudio tries to determine default values for FreeBSD OSS driver at first
2
start, based on /dev/sndstat output. The hw.snd.default_unit sysctl may affect
3
these values, but restart of the Pulseaudio might be needed to rescan it again,
4
e.g. `pacmd exit`.
1
5
2
Pulseaudio doesn't know about the hw.snd.default_unit=3 sysctl for the
6
Pulseaudio has separate input and output configure lines. You can change them
3
FreeBSD OSS driver that is used to select the active input/output. So
7
with using following commands:
4
for Pulseaudio we also need to tell it which input/output to use. The
5
difference is that Pulseaudio has separate input and output configure lines.
6
8
7
To change the default sink (output):
9
To change the default sink (output):
8
# pacmd set-default-sink 3
10
# pacmd set-default-sink 3
Lines 11-17 Link Here
11
13
12
This can also be set in %%PREFIX%%/etc/pulse/default.pa
14
This can also be set in %%PREFIX%%/etc/pulse/default.pa
13
15
14
Replace the number '3' with the new default your want to set.
16
Replace the number '3' with the new default you want to set.
15
17
16
18
17
The audio/freedesktop-sound-theme is needed if the default sound files
19
The audio/freedesktop-sound-theme is needed if the default sound files

Return to bug 211684