Bug 13651 - Anyone know what happened with PC speaker in 2.6.30?
Summary: Anyone know what happened with PC speaker in 2.6.30?
Status: CLOSED DOCUMENTED
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Takashi Iwai
URL:
Keywords:
Depends on:
Blocks: 13070
  Show dependency tree
 
Reported: 2009-06-28 22:03 UTC by Rafael J. Wysocki
Modified: 2009-12-03 09:57 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.30
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments

Description Rafael J. Wysocki 2009-06-28 22:03:49 UTC
Subject    : PC speaker beeps in 2.6.30?
Submitter  : Michael Tokarev <mjt@tls.msk.ru>
Date       : 2009-06-15 14:41
References : http://marc.info/?l=linux-kernel&m=124507695427817&w=4
Notify-Also : Frans Pop <elendil@planet.nl>
Notify-Also : Ken Witherow <ken@krwtech.com>
Notify-Also : Takashi Iwai <tiwai@suse.de>

This entry is being used for tracking a regression from 2.6.29.  Please don't
close it until the problem is fixed in the mainline.
Comment 1 Michael Tokarev 2009-06-29 06:27:20 UTC
(Side note: I wonder how to modify bug "summary" line.  My original email's subject is good, but current bug entry is not.  Because now we know what happened :)

Ok, As has been found, PC speaker beep were replaced with HDA beep in 2.6.30. See several replies to my email, like for example:

 http://marc.info/?l=linux-kernel&m=124509023718903&w=4

(Another side note: this thread is larger than shown on lkml.org and marc.info.  Some replies were received via alsa-devel@ and even linux-input@ - I can't find those in the archives).

Here are some quotes from emails in this thread which I can't find in archives.

--- From Takashi Iwai ---
To avoid someone misunderstanding: the beep routed through HD-audio
can also go to the built-in speaker.  It's just mixed up with the
normal audio output, and the volume is controlled via ALSA mixer 
volume element.

But, once after it's hooked up to the codec, the beep can't be output
separately to the speaker.  It's always with other audio signal to the
same output target.

Or, on some systems (mostly laptops), the beep is hooked up to the
codec automatically no matter whether you set
CONFIG_SND_HDA_INPUT_BEEP once when the codec chip is initialized.
So, the behavior depends pretty much on the hardware implementation.
--- end ---

--- from Paul Vojta ---
> Try 2.6.31-rc1.  There was a fix regarding beep frequency.

Not necessarily.  Based on the OP's original post, as well as his mails
to the LKML (Google the subject line to find them), he has a desktop
system with external powered speakers connected to a sound card, and also
a small PC speaker inside the system case.  He wants to hear the beeps
coming out of the small speaker, since the external speakers (and/or sound
card) are not always turned on.

For that, try turning off SND_HDA_INPUT_BEEP.

(Regarding the beep frequency issue, the patch in 2.6.31-rc1 works for
all HDA codecs *EXCEPT* sigmatel/idt.  For sigmatel/idt, please see the
patch in bug #0004556.)
--- end ---

--- From Michael Tokarev ---
Ok, I finally see what's going on.  PC speaker is still present on
"input" bus, and it IS used - beeps are working.  But when loading
snd_hda_* modules, there's another "beep device" gets registered
on the same "input" bus, named "HDA Digital PCBeep", and the real
PC speaker is not used anymore.  Unloading the modules makes internal
speaker work again.

It was not the case with kernels prior to 2.6.30, even when
SND_HDA_INPUT_BEEP was set.  So it's (somewhat) new behavior in
2.6.30.

I wonder if it's possible to control this at runtime.  "This" being
the choice of control which gets used for "beeps" - be it the internal
speaker or hda.

Thanks Paul for clearing it all up!
--- end ---

So to sum it all up - yes, it's sorta unexpected, it's change in behavour compared with 2.6.29-, but I'm not sure it's a bug.  The config symbol in question (SND_HDA_INPUT_BEEP) is not new in 2.6.30, but in previous kernels it did not disable PC speaker, while in 2.6.30 it does.  Maybe it's a lack of feature or runtime option.

Thanks!
Comment 2 mymaha 2009-12-03 09:57:15 UTC
A simple solution to use the internal speaker without redirection to "HDA Digital PCBeep": reload module pcspkr after snd_hda_* modules are loaded.
rmmod pcspkr
modprobe pcspkr

Thanks to point in the right direction!

Note You need to log in before you can comment on or make changes to this bug.