Age | Commit message (Collapse) | Author |
|
The recent change for supporting dynamic beep device allocation caused
a problem resulting in Oops at reloading the driver. Also, it ignores
the error from input device registration.
This patch fixes the wrong check in snd_hda_detach_beep_device(), and
returns an error when the input device registration fails properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
The beep control verbs don't need to be cached for resume.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
The beep_mode option value was wrongly defined: it must be 0 = off and
1 = on.
Also, evaluate the beep_mode value at snd_hda_attach_beep_device()
properly so that no device is created when beep_mode=0 is given.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
The beep_mode parameter for snd-hda-intel module allows to choose among
different digital beep device registation to the input layer.
0 = do not register to the input layer
1 = register to the input layer all time
2 = use "Beep Switch" control exported to user space mixer applications
Also, introduce CONFIG_SND_HDA_INPUT_BEEP_MODE for default value.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
The unregister work should be also canceled in snd_hda_detach_beep_device()
function.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
The massive register/unregister calls for input device layer might be
overkill. Delay unregister call by one HZ as workaround.
Also, as benefit, beep->enabled variable is changed immediately now
(not from workqueue).
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Original implementation was keeping registered input device for SND_BEEP
and SND_TONE events all time. This patch changes this behaviour:
If digital PC Beep is turned off using universal control switch,
the input device is unregistered.
Explanation: The kd_mksound() send SND_BEEP and SND_TONE only to last
registered device acceping those events. It means that the HDA Intel
audio driver blocks also the internal PC Speaker device (pcspkr.c
driver) even if the HDA Beep is muted. The user can easy disable
all beeps using 'setterm -blength 0' or 'xset b off' command.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Conflicts:
sound/pci/hda/patch_realtek.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
In the beep tone calculation for IDT/STAC codecs, lower numbers correspond
to higher frequencies and vice versa. The current code has this backwards,
resulting in beep frequencies which are way too high (and sound bad on
tinny laptop speakers, resulting in complaints).
[Also added hz <= 0 check by tiwai]
Signed-off-by: Paul Vojta <vojta@math.berkeley.edu>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Check the hint "beep" in snd_hda_attach_beep_device() to avoid the beep
device creation if user doesn't want.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
The digital beep tone is calculated in two different ways depending
on the codec chip. The standard one is using a divider, and another
one is a linear tone for IDT/STAC codecs. Currently, only the
latter type is used for all codecs, which resulted in a wrong tone
pitch.
This patch adds the calculation of the standard HD-audio type.
Also clean-up the fields in hda_beep struct.
Reference: bko#13162
http://bugzilla.kernel.org/show_bug.cgi?id=13162
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Clear codec->beep field in snd_hda_detach_beep_device() to be sure.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
snd-hda-intel driver used schedule_work() fot the delayed DMA pointer
updates, but this has several potential problems:
- it may block other eventsd works longer
- it may deadlock when probing fails and flush_scheduled_work() is
called during probe callback (as probe callback itself could be
invoked from eventd)
This patch adds an own workq for each driver instance to solve these
problems.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
The global functions in hda_codec.c and other core parts are only
for HD-audio codec and controller drivers. When the HD-audio driver
is built in kernel, all stuff have to be statically linked, thus
we don't need any exports.
This patch introduces a conditional macro to do export only
when needed.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Split the monolithc HD-audio driver into several pieces:
- snd-hda-intel HD-audio PCI controller driver; loaded via udev
- snd-hda-codec HD-audio codec bus driver
- snd-hda-codec-* Specific HD-audio codec drivers
When built as modules, snd-hda-codec (that is invoked by snd-hda-intel)
looks up the codec vendor ID and loads the corresponding codec module
automatically via request_module().
When built in a kernel, each codec drivers are statically hooked up
before probing the PCI.
This patch adds appropriate EXPORT_SYMBOL_GPL()'s and the module
information for each driver, and driver-linking codes between
codec-bus and codec drivers.
TODO:
- Avoid EXPORT_SYMBOL*() when built-in kernel
- Restore __devinit appropriately depending on the condition
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Added a NULL check of input_allocate_device() in hda_beep.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
The digital beep widget may have no mute control, and always enabling
the beep is ofen pretty annoying, especially on laptops.
This patch adds a mixer control "PC Beep Playback Switch" when there
is no mixer amp mute is found, and controls it on software.
Reference: Novell bnc#444572
https://bugzilla.novell.com/show_bug.cgi?id=444572
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Use input_free_devce() correctly instead of kfree() at error path.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
|
Added digital pc-beep support using linear tone generation for hd-codecs along
with initial support for several IDT codecs.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|