FreeBSD Bugzilla – Attachment 213026 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]
[patch]
Proposed patch (since 516738 revision, v3)
pulseaudio_v3.diff (text/plain), 2.37 KB, created by
lightside
on 2020-04-03 18:10:11 UTC
(
hide
)
Description:
Proposed patch (since 516738 revision, v3)
Filename:
MIME Type:
Creator:
lightside
Created:
2020-04-03 18:10:11 UTC
Size:
2.37 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 516738) >+++ Makefile (working copy) >@@ -6,6 +6,7 @@ > > PORTNAME= pulseaudio > PORTVERSION= 13.0 >+PORTREVISION= 1 > CATEGORIES= audio > MASTER_SITES= http://freedesktop.org/software/pulseaudio/releases/ > >Index: files/patch-src_modules_oss_oss-util.c >=================================================================== >--- files/patch-src_modules_oss_oss-util.c (revision 516738) >+++ files/patch-src_modules_oss_oss-util.c (working copy) >@@ -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 @@ > >@@ -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 >+ } >+ >+ while (!feof(f)) { >+- char line[64]; >++ char line[1024]; >+ int device; >+ >+ if (!fgets(line, sizeof(line), f)) >+@@ -357,14 +373,22 @@ int pa_oss_get_hw_description(const char >+ line[strcspn(line, "\r\n")] = 0; >+ >+ if (!b) { >++#ifdef __FreeBSD__ >++ b = pa_streq(line, "Installed devices:"); >++#else >+ b = pa_streq(line, "Audio devices:"); >++#endif >+ continue; >+ } >+ >+ if (line[0] == 0) >+ break; >+ >++#ifdef __FreeBSD__ >++ if (sscanf(line, "pcm%i: ", &device) != 1) >++#else >+ if (sscanf(line, "%i: ", &device) != 1) >++#endif >+ continue; >+ >+ if (device == n) { >+@@ -376,7 +400,17 @@ int pa_oss_get_hw_description(const char >+ if (pa_endswith(k, " (DUPLEX)")) >+ k[strlen(k)-9] = 0; >+ >+- pa_strlcpy(name, k, l); >++ if (k[0] == '<') { >++ const char *e = strrchr(k, '>'); >++ >++ if (e) { >++ const size_t q = strlen(k) - strlen(e); >++ k[q] = 0; >++ ++k; >++ } >++ } >++ // Include the number to disambiguate devices with the same name >++ pa_snprintf(name, l, "%d: %s", device, 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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 245156
:
212817
|
212838
|
212854
|
212855
|
212875
|
212876
|
212877
|
212878
|
213004
|
213005
|
213006
|
213025
|
213026
|
213050
|
213051
|
213052
|
228663
|
228708