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 Intel DX58SO board works fine with model ALC883_3ST_6ch_INTEL.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix the following lockdep warning by not reusing the hda_codec.spdif_mutex.
ALSA sound/pci/hda/hda_codec.c:882: hda_codec_cleanup_stream: NID=0x2
=======================================================
[ INFO: possible circular locking dependency detected ]
2.6.28-next-20090102 #33
-------------------------------------------------------
mplayer/3151 is trying to acquire lock:
(&pcm->open_mutex){--..}, at: [<ffffffffa004ced3>] snd_pcm_release+0x43/0xd0 [snd_pcm]
but task is already holding lock:
(&mm->mmap_sem){----}, at: [<ffffffff810c0252>] sys_munmap+0x42/0x80
which lock already depends on the new lock.
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is a patch which adds correct auto detection of model for
snd-hda-intel for Acer Aspire 5930G and 6930G. Tested on my 5930G. It
finally adds hp jack sense and 5.1 speaker system sliders.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added functions to report jack sense.
As CXT5051_PORTB_EVENT has the same value as CONEXANT_MIC_EVENT two input
devices for the microphone will be created if using CXT5051.
Signed-off-by: Ulrich Dangel <uli@spamt.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Move the more specific preset for ALC1200 above the general one for
ALC888, so that it will have the chance to get matched and selected.
Reported-by: Thomas Schneider <nailstudio@gmx.net>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add check to determine if dinput_mux is set by any of patch_stac*() functions,
otherwise a invalid pointer my be referenced causing gibberish to mixer values.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When no jack detection is available, the pins should be always
turned on since it can't be turned on/off dynamically via unsol
events.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added probe_only module option to hd-audio driver.
This option specifies whether the driver creates and initializes the
codec-parser after probing. When this option is set, the driver skips
the codec parsing and initialization but gives you proc and other
accesses. It's useful to see the initial codec state for debugging.
The default of this value is off, so the default behavior is as same
as before.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the line_out has only one DAC and it's unique (i.e. not shared
by other outputs), assign a more reasonable and distinct mixer name
such as "Headphone" or "Speaker".
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The current auto-configuration code has several problems especially
for the new IDT codecs, e.g. wrong assignment of pins and DACs or
coupled volume for speaker and headphone.
This patch is a fairly large rewrite of the auto-configuration code.
Some remaks
- mic_switch and line_switch contain NIDs instead of bool
- dac_list isn't fixed for IDT 92HD* codecs now, they are all probed
- extra HP and speakers are stored in extra_dacs[].
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The previous commit re-enabled hp_nid setup for IDT92HD73*, but
it's unneeded indeed for Dell laptops that have multiple headphones.
Setting the extra hp_nid results in a non-working "Headpohne" mixer
control. Thus hp_nid should be 0 for these dell models.
Also, the automatic addition of hp_nid should check whether it's
a dual-HP model or not. For dual-HPs, the pins are already checked
by the early workaround.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fixed the call of snd_ctl_add() by replacing with snd_hda_ctl_add()
so that this mixer element can be tracked for re-configuration.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The re-initializations of codec amp and verb caches are missing
at reconfig, which may cause Oops occasionally.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added the model without the jack-detection for some desktops that
have really no jack-detection. The recent driver caused regressions
regarding the sound output on such machines.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This reverts commit 07f455f779.
ALSA: hda: removed unneeded hp_nid references
Removed unneeded hp_nid references for 92hd73xx codec family.
This caused the silent output on some Intel desktops due to missing
routing of widget 0x0a and 0x0d.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Remove codec vendor names from the codec name strings.
The vendor name is already given from the vendor name table, so
displayed doubly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some desktops seems to have no HP/mic jack detection on the front panel,
which results in the silent output in the recent driver, because the
driver mutes the output (to save power) when no plug is detected.
This patch adds a new model that disables the jack-detection.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fixed the compile warning regarding the unused function when built
with CONFIG_PM=n:
sound/pci/hda/hda_intel.c:1905: warning: ‘snd_hda_codecs_inuse’ defined but not used
snd_hda_codecs_inuse() is used only in the resume callback.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Move the restoration of the standard PCI configuration registers
in the snd_hda_intel driver to a ->resume_early() callback executed
with interrupts disabled, since doing that with interrupts enabled
may lead to problems in some cases.
This patch addresses the regression from 2.6.26 tracked as
http://bugzilla.kernel.org/show_bug.cgi?id=12121 .
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The current code overrides the event type on input pins always to
PWR_EVENT. Although this still works (PWR_EVENT and INSERT_EVENT
are handled samely), it'd be better to avoid such overrides.
Also, currently the unsol events are registered even for fixed pins
which will never raise the pin-detection event.
This patch fixes both issues.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The pin-detection function used in patch_sigmatel.c shouldn't be specific
to HP pin because it's used for input pins in general, too.
This patch fixes the detection function, removes the HP check from it
and moves to stac92xx_hp_detect().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The power-state changes in patch_sigmatel.c are accessed via *_cached()
but they shouldn't be really cached. Fixed to the normal write.
Also, stac92hd71xx_suspend and resume are no longer necessary as the
power-state changes are handled properly in the common routine.
Removed these hacks now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The amp switch of SPDIF outputs have to be cached in the amp cache
instead of codec cache. Otherwise it conflicts with the IEC958
playback switch control in hda_codec.c.
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>