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>
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>
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>
This reverts commit e669dae614, since it
is incomplete, and clashes with fuller patches and the sparc 32/64
unification effort.
Requested-by: David Miller <davem@davemloft.net>
Acked-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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>
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
powerpc: Fix system calls on Cell entered with XER.SO=1
powerpc/cell: Fix GDB watchpoints, again
powerpc/mpic: Don't reset affinity for secondary MPIC on boot
powerpc/cell/axon-msi: Retry on missing interrupt
powerpc: Fix boot freeze on machine with empty memory node
powerpc: Fix IRQ assignment for some PCIe devices
powerpc/spufs: Fix spinning in spufs_ps_fault on signal
powerpc/mpc832x_rdb: fix swapped ethernet ids
powerpc: Use generic PHY driver for Marvell 88E1111 PHY on GE Fanuc SBC610
powerpc/85xx: L2 cache size wrong in 8572DS dts
powerpc/virtex: Update defconfigs
powerpc/52xx: update defconfigs
xsysace: Fix driver to use resource_size_t instead of unsigned long
powerpc/virtex: fix various format/casting printk mismatches
powerpc/mpc5200: fix bestcomm Kconfig dependencies
powerpc/44x: Fix 460EX/460GT machine check handling
powerpc/40x: Limit allocable DRAM during early mapping
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda - Check model for Dell 92HD73xx laptops
ALSA: hda - mark Dell studio 1535 quirk
ALSA: hda - No 'Headphone as Line-out' swich without line-outs
ALSA: hda - Fix AFG power management on IDT 92HD* codecs
ALSA: hda - Fix caching of SPDIF status bits
ALSA: hda - Add a quirk for Dell Studio 15
ALSA: hda: Add STAC_DELL_M4_3 quirk
sound/sound_core: Fix sparse warnings
ALSA: hda: STAC_DELL_M6 EAPD
switch to __init for those; unlike powerpc sparc has no hotplug support
for that stuff and their ->probe() tends to call __init functions while
being declared __devinit.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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>
Added a hook for proc outputs of codec-specific stuff.
Moved realtek-specific coeff output into patch_realtek.c as well.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Moved power_save field initialization inside a proper ifdef
to fix a build error without CONFIG_SND_HDA_POWER_SAVE.
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>
The reconfiguration of PCM affected all PCM streams on the bus, but
this this should be done rather only for the target codec.
This patch does the following:
- introduce bitmap indicating the PCM device usages on a hda_bus
- refactor the PCM build functions
- fix __devinit prefix in some fucntions
- add a proper ifdef around HDA-reconfig-specific functions
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Move power_save option into hda_intel.c, and make a field in hda_bus,
instead of keeping module parameters in separate files.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Minor clean ups: move snd_hda_codecs_inuse() into hda_intel.c and
make static. Also, make snd_hda_query_supported_pcm() static
as it's used only in hda_codec.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
There is no argument named @state in snd_hda_resume,
remove its' comment.
Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Check the model type instead of PCI SSID for detection of the mic types
on Dell laptops with IDT 92HD73xx codecs. In this way, a new laptop
can be tested via model module option.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fixed the quirk string for Dell studio 1535 (the product name wasn't
published at the time the patch was made).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine. For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Since we need to handle many unsolicited events assigned to different
widgets, allocate the event dynamically using the existing events
array, and use the tag appropriately instead of combination of fixed
number and widget nid. (Note that widget nid can be over 4 bits!)
Also, replaced the call of unsol_event handler with a dedicated
function to be more readable.
Signed-off-by: Takashi Iwai <tiwai@suse.de>