From nobody Wed Sep 25 15:06:19 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XDKn75vC7z5XLGr for ; Wed, 25 Sep 2024 15:06:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XDKn72wsGz4KGh for ; Wed, 25 Sep 2024 15:06:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727276779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ousDEUo13nJ14qDH0GNRCL9heglVGJqrGORhkYDlMR4=; b=hpp5SGdrGdfGex0iV7bvbbcog0Seugk/Tw9Ldgj+0n7UH5howCDFnQTEwOxHAzDGaZCuA4 iibJQmI1KIcUHwTLuI+IZSKXjDX58hxfsmpfTNpQiSDY50jjuMvxwmOkuyvt2q2tuk6rlZ 6XbLykswdHyvSDsKT2nqfygNERkLZ9OxA0K/YFunNgwo6s/pthAxlW1QDSRhHhy7TluiKN 6bfJyqhs/jemtpAtnFP8iIQivuQ57z5A6/TJUXhTu1TK3ML/s7c27WOKAyfQZXyMD/16jc zlFtyRhSqCgxk35HFXXZ2F4sWW6cqQuNttVSIcjoGXr3NJFupwTQbJdsThITpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727276779; a=rsa-sha256; cv=none; b=nIuiPbGsJijB3mynEifHKRUHTkf8DGpXVvTx7KVzEjmWFwsHAdSq1N3tYbvLqzfVaCTb0a mKMsjyXdifXFE15WPcgPPp071rlKVSNoniTbiVofI9i1V3wIu+ZJUazsnk6DWq339FWKH6 Y5dMv3c6RvRgdskKIMVF56flsJB5a8FsrKpdWC9JzABI7CccGQtIlEeLeGPQRO8A+hzKCw i9PRVHMO4EdREr/l2uqfi5UkUbbPepV+Prx99R3hs5EuYWtvgRhNRTmu6Y6lrz8+5h8aVX YzKyG8J5r1aK+2cZhgQ8vkDtc3C5j1PfWYNvcAQ7Uaux9iTYeP7Li0cxykrOgQ== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XDKn72HPyzHbJ for ; Wed, 25 Sep 2024 15:06:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 48PF6JYj004084 for ; Wed, 25 Sep 2024 15:06:19 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 48PF6J8D004083 for bugs@FreeBSD.org; Wed, 25 Sep 2024 15:06:19 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 281713] kbdcontrol -b to set bell frequency is inverted vs sc Date: Wed, 25 Sep 2024 15:06:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: divVerent@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D281713 Bug ID: 281713 Summary: kbdcontrol -b to set bell frequency is inverted vs sc Product: Base System Version: 14.1-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: divVerent@gmail.com Note: this bug kinda implies that https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D204837 has been "fixed"= - the command definitely does something now, just not the right thing. Running these shell commands in order: ``` kbdcontrol -b 300.440 sleep 0.1 printf '\a' sleep 0.4 kbdcontrol -b 300.554 sleep 0.1 printf '\a' sleep 0.4 kbdcontrol -b 300.659 sleep 0.1 printf '\a' ``` should play an increasing chords, as the frequencies are the ones of the no= tes A, C# and E. And it does this fine when booting with `kern.vty=3Dsc`. However, it actually plays a decreasing, and too high pitched, chord when in `vt`! According to audacity, the frequencies actually played are 2659Hz, 21= 49Hz and 1804Hz. This can be repro'd right on the "disc1" image. There is a frequency division here in `kbdcontrol`: https://github.com/freebsd/freebsd-src/blob/main/usr.sbin/kbdcontrol/kbdcon= trol.c#L1042 Removing this division statement makes it sound exactly as it should. And in fact, when multiplying intended and measured frequencies, I get 1169960, 1190546 and 1188836, respectively - all really close to the magic constant = in that division. Thus, I suspect one of two things is the case: - vt intentionally changed the meaning of the `ESC [ =3D pitch ; duration B` escape sequence to now express pitch in Hertz, not 8254 timer ticks, but it= was forgotten to make `kbdcontrol` detect whether it's running on vt or syscons= and respond accordingly. - vt accidentally changed the meaning of the sequence, and should get a fix added to match up with syscons. --=20 You are receiving this mail because: You are the assignee for the bug.=