Many HD-audio controllers seem inaccurate about the IRQ timing of
PCM period updates. This has caused problems on audio quality; e.g.
JACK doesn't work with two periods.
This patch fixes the problem by checking the current DMA position
at IRQ handler and delays the period-update via a workq if it's
inaccurate.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
- figured out 'Digital(ly) Enhanced Game Port' functionality,
implemented support for it (eliminating gameport polling overhead)
- removed optional joystick activation, gameport now enabled unconditionally,
since we now support it via the PCI I/O space, not via conflict-prone
legacy I/O (which I was thus able to DISABLE now)!
- fix playback bug (a muted wave output would get unmuted upon start of
playback, of course this is not what we want, thus remember mute state)
- implement partial power management: when idle, lower clock rate and disable
codec (reduced noise!), and disable gameport circuit when unused
- instantiate OPL3 timer, too
- much better implementation of snd_azf3328_mixer_write_volume_gradually()
- slightly optimized interrupt handling
- lots of cleanup
This time, I also found a way to verify proper OPL3 operation
via MIDI file playback (emulation via synth hardware).
Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Add a constraint for the period time so that there are less than ten
seconds between interrupts so that ALSA does not assume that the device
is dead.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Introduce symbols for the buffer/period size constraints so that their
limits and relationships become clearer.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Move the setting of the output enable GPIO bit to a separate function.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Create separate functions for the code that initializes the hardware, as
opposed to initializing internal driver state, so that they can be
reused for resume support.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
When initializing the DAC volume registers, we can just use the generic
volume update functions instead of setting the registers manually.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Save the written values of all CMI8788 and AC97 registers and of some of
the DAC/ADC registers so that it is possible to restore the register
state later.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Remove another magic number - add a symbol for the size of the PCI I/O
range.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Adjust the MODULE_LICENSE strings to properly reflect the actual license.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The irq handler may be called before the proper initialization of hardware.
Call snd_aw2_saa7146_setup() before the irq handler registration.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Check that model->control_filter is set before trying to call it.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
I think that hda_verb array must have "terminator (empty array)".
But alc262_sony_unsol[] does not have it.
And it causes gcc-4.3's buggy behavior
with snd_hda_sequence_write().
Signed-off-by: Akio Idehara <zbe64533@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the Linux kernel is compiled with CONFIG_DEBUG_SHIRQ=y,
the Soundblaster Audigy2 ZS Notebook PCMCIA card causes the
system hang during boot (udev stage) or when the card is hot-plug.
The CONFIG_DEBUG_SHIRQ flag is by default 'y' with all Fedora
kernels since 2.6.23. The problem was reported as
https://bugzilla.redhat.com/show_bug.cgi?id=326411
The issue was hunted down to the snd_emu10k1_create() routine:
/* pseudo-code */
snd_emu10k1_create(...) {
...
request_irq(... IRQF_SHARED ...) {
register the irq handler
#ifdef CONFIG_DEBUG_SHIRQ
call the irq handler: snd_emu10k1_interrupt() {
poll I/O port // <---- !! system hangs
...
}
#endif
}
...
snd_emu10k1_cardbus_init(...) {
initialize I/O ports
}
...
}
The early access to I/O port in the interrupt handler causes
the freeze. Obviously it is necessary to init the I/O ports
before accessing them. This patch moves the registration of
the irq handler after the initialization of the I/O ports.
Signed-off-by: Jaroslav Franek <jarin.franek@post.cz>
Acked-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Use quirk table to assign ALC268_TOSHIBA to COMPAL IFL90/JFL-92 laptops.
No analog output on autoprobe.
Signed-off-by: Tony Vroon <tony@linx.net>
Tested-by: Guri <gurashka@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The mic pins are wrongly assigned on AD1884A mobile model.
The mic handling is fixed for the automatic mic selection, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix capture mute widget for STAC9250/9251 codecs. The widget 0x09
has no mute but 0x14 does actually.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Added IDs for the Foxconn P35AX-S mainboard to patch_realtek.c, so
that ALC883_6ST_DIG is used by default.
Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
We get quite noisy output on the right channel on VT1708 codec
when 24bit samples are used. Suppress the 24bit support until any
real fix is found.
https://bugzilla.novell.com/show_bug.cgi?id=390473
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added a config table entry for the ASUS P5K-E/WIFI-AP mainboard (ID
1043:8227) to use AD1988_6STACK_DIG
Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Corrected the model assignment for the ASUS P5GD1 w/SPDIF after reports of
surround sound not being possible.
Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
On boards with VT1617A codec, the sound disappears suddenly.
This looks like a problem with HPE-bit control that is supposed to be
set in patch_vt1617a(). However, on such problematic hardwares, the
bit is actually reset mysteriously.
The patch adds a workaround for the wrong quirk.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
FM801-tea575x tuner has a reverse selection to V4L1 and this causes
nasty dependency problems.
The patch simplifies the dependency with a normal
"depends on VIDEO_V4L1". This decreases the usability but fixes bugs,
yeah. If any better feature like "requires" is introduced to kbuild
in future, we'll be able to switch it...
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The sound boards with VT1724 and compatible chips may lock up when
MPU401 is accessed together with the PCM streaming.
This patch fixes the problem.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The irq handler of PCI drivers must be released before releasing other
resources since the handler for a shared irq can be still called and
may access the freed resource again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
free_irq() calls synchronize_irq() for you, so there is no need for
drivers to manually do the same thing (again). Thus, calls where
sync-irq immediately precedes free-irq can be simplified.
However, during this audit several bugs were noticed, where free-irq is
preceded by a "irq >= 0" check... but the sync-irq call is not covered
by the same check.
So, where sync-irq could not be eliminated completely, the missing check
was added.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Correct some arguments in calls to snd_ice1712_gpio_write_bits() from
ap192_set_rate_val().
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some calls to snd_ice1712_gpio_write() go wrong, if
snd_ice1712_gpio_write_bits() ran before and changed the gpio mask register.
Read the actual gpio value and combine it with the to be set bits in the cpu
instead.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Let "chip reset" become first. Increasement of the "chip reset" related timeout
leads to correctly read eeprom's contents here.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The last ALC889A hack may break on some devices with certain model presets
since patch_alc*() have different model tables. So, now it's handled in
the original patch_alc882() but fly to patch_alc883() in model=auto
appropriately.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Several 92hd7xxx and STAC9228 laptops have multiple headphone jacks,
the second headphone jack should be used for the 5.1 surround sound.
Add support for 'Headphone as Line Out' switch, which allows it be used
in 5.1 surround sound.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add a pointer for DAC volume TLV data to the model structure so that the
model driver do not need to manually assign it in their control filter.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Initialize the playback volume controls as being muted and having
minimal volume.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add fields for the DAC volume limits to the module structure so that
model drivers do not need to install their own control info handlers.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>