Bug 195760

Summary: sound(4): sys/tools/feeder_eq_mkfilter.awk parses FEEDER_EQ_PRESETS incorrectly
Product: Base System Reporter: Tim Creech <dezgotspam>
Component: kernAssignee: Hans Petter Selasky <hselasky>
Status: Closed FIXED    
Severity: Affects Some People CC: ariff, dezgotspam, emaste, hselasky
Priority: --- Keywords: easy
Version: CURRENTFlags: koobs: maintainer-feedback+
koobs: mfc-stable13-
koobs: mfc-stable12-
Hardware: Any   
OS: Any   
URL: https://people.freebsd.org/~ariff/SOUND_4.TXT.html
Attachments:
Description Flags
patch for head/sys/tools/feeder_eq_mkfilter.awk none

Description Tim Creech 2014-12-06 20:17:00 UTC
Created attachment 150285 [details]
patch for head/sys/tools/feeder_eq_mkfilter.awk

The sound mega-commit in 2009 (193640) introduced a parametric software equalizer, with the ability to customize its parameters at compile time using FEEDER_EQ_PRESETS in make.conf(5).

I believe the only documentation on the format of this is referenced in ariff's commit comment: http://people.freebsd.org/~ariff/SOUND_4.TXT.html

Going by that description of FEEDER_EQ_PRESETS, the build system parses it slightly incorrectly. I believe that the parsing tool is unchanged since its original introduction, so the attached patch should apply for all versions.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2022-08-19 00:24:34 UTC
^Triage: This looks like an easy win/rebase/fix if it hasn't been addressed already. Request feedback from folks who regularly play around sound(4).

Note also: It would be great to get documentation from ~ariff/SOUND_4.TXT.html into sound(4) manual page. The former is the only documentation of the feature and the knowledge is at risk of being lost in the longer term.
Comment 2 Hans Petter Selasky freebsd_committer freebsd_triage 2022-08-22 07:34:24 UTC
I'm good with this, but only for 14-current.
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-08-22 08:06:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e7314192cea3cfade4468c8656cd82f2a95837da

commit e7314192cea3cfade4468c8656cd82f2a95837da
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-08-22 07:41:05 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-08-22 08:04:26 +0000

    sound(4): Fix order of parameters for custom equalizer band pass filter.

    When specifying a custom band-pass filter for the sound(4) equalizer,
    use the same format as used by the resulting C-code define to avoid
    confusion.

    PR:             195760
    Sponsored by:   NVIDIA Networking

 sys/tools/sound/feeder_eq_mkfilter.awk | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2022-09-28 01:28:08 UTC
Thanks hps