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

Collapse All | Expand All

(-)Makefile (+1 lines)
Lines 6-11 Link Here
6
6
7
PORTNAME=	pulseaudio
7
PORTNAME=	pulseaudio
8
PORTVERSION=	13.0
8
PORTVERSION=	13.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
(-)files/patch-src_modules_oss_oss-util.c (-1 / +48 lines)
Lines 1-7 Link Here
1
Support 24bit audio see Comment 6 of 
1
Support 24bit audio see Comment 6 of 
2
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198567
2
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198567
3
3
4
--- src/modules/oss/oss-util.c.orig	2015-09-10 04:51:41 UTC
4
--- src/modules/oss/oss-util.c.orig	2018-07-13 19:06:14 UTC
5
+++ src/modules/oss/oss-util.c
5
+++ src/modules/oss/oss-util.c
6
@@ -39,6 +39,22 @@
6
@@ -39,6 +39,22 @@
7
 
7
 
Lines 37-39 Link Here
37
         [PA_SAMPLE_S24_32LE] = AFMT_QUERY, /* not supported */
37
         [PA_SAMPLE_S24_32LE] = AFMT_QUERY, /* not supported */
38
         [PA_SAMPLE_S24_32BE] = AFMT_QUERY, /* not supported */
38
         [PA_SAMPLE_S24_32BE] = AFMT_QUERY, /* not supported */
39
     };
39
     };
40
@@ -348,7 +364,7 @@ int pa_oss_get_hw_description(const char
41
     }
42
 
43
     while (!feof(f)) {
44
-        char line[64];
45
+        char line[1024];
46
         int device;
47
 
48
         if (!fgets(line, sizeof(line), f))
49
@@ -357,26 +373,31 @@ int pa_oss_get_hw_description(const char
50
         line[strcspn(line, "\r\n")] = 0;
51
 
52
         if (!b) {
53
-            b = pa_streq(line, "Audio devices:");
54
+            b = pa_streq(line, "Installed devices:");
55
             continue;
56
         }
57
 
58
         if (line[0] == 0)
59
             break;
60
 
61
-        if (sscanf(line, "%i: ", &device) != 1)
62
+        if (sscanf(line, "pcm%i: ", &device) != 1)
63
             continue;
64
 
65
         if (device == n) {
66
             char *k = strchr(line, ':');
67
             pa_assert(k);
68
             k++;
69
-            k += strspn(k, " ");
70
+            k += strspn(k, " <");
71
+            const char *e = strrchr(k, '>');
72
 
73
-            if (pa_endswith(k, " (DUPLEX)"))
74
-                k[strlen(k)-9] = 0;
75
+            if (!e)
76
+                break;
77
 
78
-            pa_strlcpy(name, k, l);
79
+            const size_t len = strlen(k) - strlen(e);
80
+            char m[len];
81
+            strncpy(m, k, len);
82
+
83
+            pa_snprintf(name, l, "pcm%d: %s", n, m);
84
             r = 0;
85
             break;
86
         }

Return to bug 245156