FreeBSD Bugzilla – Attachment 212838 Details for
Bug 245156
audio/pulseaudio: parse /dev/sndstat correctly to get device name
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
2nd versin of the patch
pa_devname2.patch (text/plain), 2.99 KB, created by
Henry Hu
on 2020-03-29 16:32:33 UTC
(
hide
)
Description:
2nd versin of the patch
Filename:
MIME Type:
Creator:
Henry Hu
Created:
2020-03-29 16:32:33 UTC
Size:
2.99 KB
patch
obsolete
>diff -ruN /usr/ports/audio/pulseaudio/Makefile ./Makefile >--- /usr/ports/audio/pulseaudio/Makefile 2019-11-04 15:39:51.000000000 -0500 >+++ ./Makefile 2020-03-29 02:29:50.880390000 -0400 >@@ -6,6 +6,7 @@ > > PORTNAME= pulseaudio > PORTVERSION= 13.0 >+PORTREVISION= 1 > CATEGORIES= audio > MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/ > >diff -ruN /usr/ports/audio/pulseaudio/files/patch-src_modules_oss_oss-util.c ./files/patch-src_modules_oss_oss-util.c >--- /usr/ports/audio/pulseaudio/files/patch-src_modules_oss_oss-util.c 2016-07-26 12:51:15.000000000 -0400 >+++ ./files/patch-src_modules_oss_oss-util.c 2020-03-29 12:24:56.519948000 -0400 >@@ -1,7 +1,7 @@ > Support 24bit audio see Comment 6 of > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198567 > >---- src/modules/oss/oss-util.c.orig 2015-09-10 04:51:41 UTC >+--- src/modules/oss/oss-util.c.orig 2018-07-13 19:06:14 UTC > +++ src/modules/oss/oss-util.c > @@ -39,6 +39,22 @@ > >@@ -26,7 +26,7 @@ > int pa_oss_open(const char *device, int *mode, int* pcaps) { > int fd = -1; > int caps; >-@@ -164,8 +180,8 @@ int pa_oss_auto_format(int fd, pa_sample >+@@ -164,8 +180,8 @@ int pa_oss_auto_format(int fd, pa_sample_spec *ss) { > [PA_SAMPLE_FLOAT32BE] = AFMT_QUERY, /* not supported */ > [PA_SAMPLE_S32LE] = AFMT_QUERY, /* not supported */ > [PA_SAMPLE_S32BE] = AFMT_QUERY, /* not supported */ >@@ -37,3 +37,54 @@ > [PA_SAMPLE_S24_32LE] = AFMT_QUERY, /* not supported */ > [PA_SAMPLE_S24_32BE] = AFMT_QUERY, /* not supported */ > }; >+@@ -348,7 +364,7 @@ int pa_oss_get_hw_description(const char *dev, char *n >+ } >+ >+ while (!feof(f)) { >+- char line[64]; >++ char line[1024]; >+ int device; >+ >+ if (!fgets(line, sizeof(line), f)) >+@@ -357,14 +373,14 @@ int pa_oss_get_hw_description(const char *dev, char *n >+ line[strcspn(line, "\r\n")] = 0; >+ >+ if (!b) { >+- b = pa_streq(line, "Audio devices:"); >++ b = pa_streq(line, "Installed devices:"); >+ continue; >+ } >+ >+ if (line[0] == 0) >+ break; >+ >+- if (sscanf(line, "%i: ", &device) != 1) >++ if (sscanf(line, "pcm%i: ", &device) != 1) >+ continue; >+ >+ if (device == n) { >+@@ -373,10 +389,21 @@ int pa_oss_get_hw_description(const char *dev, char *n >+ k++; >+ k += strspn(k, " "); >+ >+- if (pa_endswith(k, " (DUPLEX)")) >+- k[strlen(k)-9] = 0; >++ if (pa_endswith(k, " default")) >++ k[strlen(k)-8] = 0; >+ >+- pa_strlcpy(name, k, l); >++ if (pa_endswith(k, " (play/rec)")) >++ k[strlen(k)-11] = 0; >++ >++ if (pa_endswith(k, " (play)")) >++ k[strlen(k)-7] = 0; >++ >++ if (pa_startswith(k, "<") && pa_endswith(k, ">")) { >++ k++; >++ k[strlen(k)-1] = 0; >++ } >++ >++ pa_snprintf(name, l, "pcm%d: %s", n, k); >+ r = 0; >+ break; >+ }
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 Raw
Actions:
View
Attachments on
bug 245156
:
212817
|
212838
|
212854
|
212855
|
212875
|
212876
|
212877
|
212878
|
213004
|
213005
|
213006
|
213025
|
213026
|
213050
|
213051
|
213052
|
228663
|
228708