Bug 526751
Summary: | xset b as well as setterm -bfreq set beep to wrong pitch with CONFIG_HDA_INPUT_BEEP | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Jay Berkenbilt <ejb> |
Component: | kernel | Assignee: | John Feeney <jfeeney> |
Status: | CLOSED ERRATA | QA Contact: | Red Hat Kernel QE team <kernel-qe> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 5.5 | CC: | cmeadors, dzickus, jkysela, syeghiay |
Target Milestone: | rc | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-03-30 07:42:57 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 525390 | ||
Bug Blocks: | 526948 |
Description
Jay Berkenbilt
2009-10-01 16:50:12 UTC
The "xset b" command should work. The frequency is handled in the HDA driver and duration is handled in the drivers/char/keyboard.c . Could you try this test on your system? TERM="linux" setterm -bfreq 1600 -blength 800 > /dev/console < /dev/console echo -e "\a" Unfortunately, it seems that beep is generated only on last registered device according to keyboard.c - routine kd_mksound() - look for break in the list_for_each_prev() loop. I will try to make usage of HDA Beep functionality optional in 5.5. The above commands run with no errors but have no effect. However, I notice the bell pitch sounded by gdm upon restart is different, so something somewhere is able to successfully change the pitch. I'll try to look into it a little more and see if I can figure out what's breaking down. I can also create a generic local account on my system and run that. Unfortunately, I can't chvt to a non-X virtual terminal...for whatever reason, with my video card and drivers, I get a blank screen when I do that. I hadn't actually noticed that until now. I am running with radeonhd drivers I compiled myself, so there's no additional bug to report at this time..... I'll post more information if/when I have it. Although I can't see what I'm typing on a text virtual console, I can still type the commands and get beeps. I can also have something in my X environment generate a beep while my current VC is not the one with the X display. Results: setterm -bfreq n does in fact change the pitch of the beep, but not to the frequency specified. The actual frequency is inversely related to the number, and pitches are set to discrete blocks. For example, setterm -bfreq n for n in the inclusive range of 1313 to 1359 sets the bell pitch to 440 Hz. 1360 sets the pitch to approximately 415 Hz, half a tone lower than 440 Hz. 2700 sets the pitch to 220. These are the pitches generated by running echo -e "\a" (or, actually, print "\a" from perl) on the VC. Doing echo -e "\a" > /dev/console generates still a different pitch and duration. Also, beeps generated from X keep the same pitch and duration even as setterm changes the frequency of the beeps on the text vc. If I run a script that beeps on the console, those beep pitches remain fixed regardless of whether X is running on my current VC. None of this is unexpected...I'm just confirming that which VC is current has no impact on the pitch. The only thing that impacts it is where the \a is sent. Okay, the deal is that xset b DOES change the pitch, but it doesn't set it to the actual specified frequency. It behaves just like what I described above. So by beep command, xset b 20 2068 120, sets the beep pitch to approximately 280 Hz. Given the discrete bell pitches, the closest I can get to my desired frequency (which is close enough) is xset b 20 328 120 which sets the pitch to 2400 Hz. adjusting bug title The latest ALSA HDA driver for RHEL 5.5 is available here: http://people.redhat.com/~jkysela/RHEL5/ Please, report back test results. The HDA Beep can be completely disabled with "Beep" mute in alsamixer or any ALSA-aware mixer application in this update (Beep will be generated using internal PC speaker as in previous RHEL releases). Confirmed on both counts. When I boot with the x86_64 kernel you made available (171), with HDA beep enabled, I get a pitch from among the available discrete frequency choices that is close to the requested frequency. With beep muted in alsamixer, the beep reverts to the PC speaker and is the exact pitch as expected based on the beep frequency. Thanks! Marking as duplicate of parent bug#525390 . Please, re-open this bug in case of any related issues with future RHEL 5.5 kernels. *** This bug has been marked as a duplicate of bug 525390 *** This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. From #rhel5.5 channel: <lwang> sly 526751 is part of the bug 525390. so that one will move to ON_QA and put in the advisory Changed status to MODIFIED in preparation to add to kernel advisory. Followed the steps in initial comment and the pitch of the beep changed. With no speakers/headphones plugged in (on a laptop) the sound comes from the internal speaker. If I plug in headphones, beep, with the correct pitch, comes through the headphones. Is this is what is expected? BTW, I have no Beep contol in alsamixer. Sound device is ICH9 (8086:293e) with Conexant CX20561 codec. (In reply to comment #15) > Followed the steps in initial comment and the pitch of the beep changed. With > no speakers/headphones plugged in (on a laptop) the sound comes from the > internal speaker. If I plug in headphones, beep, with the correct pitch, comes > through the headphones. Is this is what is expected? BTW, I have no Beep > contol in alsamixer. Sound device is ICH9 (8086:293e) with Conexant CX20561 > codec. Unfortunately, this hardware (Conexant CS20561) does not have the digital HDA beep widget, so this issue cannot be tested with it. The described behaviour is correct. Thanks Jaroslav for comment #16. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0178.html |