Takashi Iwai [Fri, 21 Nov 2008 08:08:06 +0000 (09:08 +0100)]
ALSA: hda - Fix double free of jack instances
The jack instances created in patch_sigmatel.c may be double-freed.
The device management code checks the invalid element, and thus there
is no real breakage, but it spews annoying warning messages.
But, we can't simply remove the release calls of these jack instances
because they have to be freed when the codec is re-configured.
Now, a new flag, bus->shutdown is introduced to indicate that the bus
is really being unloaded, i.e. the objects managed by the device
manager will be automatically deleted. We release these objects only
when this flag isn't set.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 21 Nov 2008 07:54:54 +0000 (08:54 +0100)]
ALSA: hda - Add missing static for snd_hda_eld_proc_new() inline funciton
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Fri, 21 Nov 2008 03:41:50 +0000 (11:41 +0800)]
ALSA: hda - support writing to the ELD proc file
Allow users to fix quicks of ELD ROMs by writing new values to the ELD proc
interface. The format is one or more lines of "name hex_value".
Users can add/remove/modify up to 32 SAD(Short Audio Descriptor) entries.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Fri, 21 Nov 2008 04:34:05 +0000 (12:34 +0800)]
ALSA: hda: modify monitor name to be consistent with other ELD proc items
Rename "monitor name" to "monitor_name" to conform with the keyword style.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Fri, 21 Nov 2008 01:42:59 +0000 (09:42 +0800)]
ALSA: hda - properly print ELD sample bits
Fix bugs on printing the ELD sample bits.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 21 Nov 2008 07:27:04 +0000 (08:27 +0100)]
Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
sound/pci/hda/patch_sigmatel.c
Matthew Ranostay [Fri, 21 Nov 2008 02:21:43 +0000 (21:21 -0500)]
ALSA: hda: Add STAC_DELL_M4_3 quirk
Added STAC_DELL_M4_3 quirk for Dell systems, also reorganized the
board config switch to assign number of digital muxes, microphones,
and SPDIF muxes via the PCI quirk defined.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 21 Nov 2008 01:25:48 +0000 (02:25 +0100)]
ALSA: hda - make laptop-eapd model back for AD1986A
The changes specific for Samsung laptops seem unapplicable to other
hardware models like ASUS. The mic inputs are lost on such hardware
by the change
5d5d5f43f1b835c375de9bd270cce030d16e2871.
This patch adds back the old laptop-eapd model, and create a new
model "samsung" for the new one specific to Samsung laptops with
automatic mic selection feature.
Reference: kernel bugzilla #12070
http://bugzilla.kernel.org/show_bug.cgi?id=12070
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthew Ranostay [Sun, 16 Nov 2008 16:42:34 +0000 (11:42 -0500)]
ALSA: hda: STAC_DELL_M6 EAPD
Add support for EAPD on system suspend and disabling EAPD on headphone jack
detection for STAC_DELL_M6 laptops.
This patch fixes the regressions, the silent output on HP of some Dell
laptops (see Novell bnc#446025):
https://bugzilla.novell.com/show_bug.cgi?id=446025
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vincent Petry [Tue, 18 Nov 2008 14:21:57 +0000 (22:21 +0800)]
ALSA: hda: Added Realtek ALC888 model entry for Acer Aspire 4930G laptop
Added Realtek ALC888 model entry for the Acer Aspire 4930G laptop that
fixes the following features:
- internal microphone
- heaphone jack sense
- channel mode
Signed-off-by: Vincent Petry <PVince81@yahoo.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Thu, 20 Nov 2008 01:24:52 +0000 (09:24 +0800)]
ALSA: azx_probe() cleanup
Replace 5 free-and-return-err blocks with goto-out-free ones.
This makes the main logic more outstanding.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 19 Nov 2008 13:14:50 +0000 (14:14 +0100)]
ALSA: hda - Show missing GPIO unsol bits
The GPIO unsolicited event bits are read but not shown in the proc file.
Let's fix it.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Wed, 19 Nov 2008 07:14:03 +0000 (15:14 +0800)]
ALSA: hda: compact ELD output messages
Strip out some ELD printk messages that end user won't care,
and make the output compact.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Wed, 19 Nov 2008 07:14:02 +0000 (15:14 +0800)]
ALSA: hda: make global snd_print_pcm_bits()
Introduce a global function snd_print_pcm_bits() and use it in the ELD code.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Wed, 19 Nov 2008 07:14:01 +0000 (15:14 +0800)]
ALSA: hda: minor output message cleanups
Some minor user visible message cleanups.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Wed, 19 Nov 2008 07:14:00 +0000 (15:14 +0800)]
ALSA: hda: rename sink_eld to hdmi_eld
Rename struct sink_eld to hdmi_eld.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Wed, 19 Nov 2008 07:13:59 +0000 (15:13 +0800)]
ALSA: hda: minor code cleanups
Some minor code cleanups.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthew Ranostay [Wed, 19 Nov 2008 01:54:17 +0000 (20:54 -0500)]
ALSA: hda: EAPD mute on suspend
Moved support for EAPD mute on suspend from stac92hd71xx_suspend
to the generic stac92xx_suspend function.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Wed, 19 Nov 2008 00:56:18 +0000 (08:56 +0800)]
ALSA: hda: HDMI channel mapping cleanups
Refactor the channel mapping code for consistent naming
and make it more informed about channel allocations.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Wed, 19 Nov 2008 00:56:17 +0000 (08:56 +0800)]
ALSA: hda: HDMI channel allocations for audio infoframe
To play a 3+ channels LPCM/DSD stream via HDMI,
- HDMI sink must tell HDMI source about its speaker placements
(via ELD, speaker-allocation field)
- HDMI source must tell the HDMI sink about channel allocation
(via audio infoframe, channel-allocation field)
(related docs: HDMI 1.3a spec section 7.4, CEA-861-D section 7.5.3 and 6.6)
This patch attempts to set the CA(channel-allocation) byte in the audio infoframe
according to
- the number of channels in the current stream
- the speakers attached to the HDMI sink
A channel_allocations[] line must meet the following two criteria to be
considered as a valid candidate for CA:
1) its number of allocated channels = substream->runtime->channels
2) its speakers are a subset of the available ones on the sink side
If there are multiple candidates, the first one is selected. This simple
policy shall cheat the sink into playing music, but may direct data to the
wrong speakers.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Wed, 19 Nov 2008 00:56:16 +0000 (08:56 +0800)]
ALSA: hda: make global snd_print_channel_allocation()
code refactor: make a global function snd_print_channel_allocation().
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Wed, 19 Nov 2008 00:56:15 +0000 (08:56 +0800)]
ALSA: hda: make standalone hdmi_fill_audio_infoframe()
code refactor: make a standalone function hdmi_fill_audio_infoframe().
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 18 Nov 2008 11:36:33 +0000 (12:36 +0100)]
ALSA: hda - Allow multiple imux for matrix-type mixers of ALC codecs
Allow the multiple imux instances for matrix-type mixers like ALC882.
So far, only ALC260 used this feature, but other codecs may need a
similar stuff.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 18 Nov 2008 09:57:07 +0000 (10:57 +0100)]
Merge branch 'topic/fix/hda' into topic/hda
Takashi Iwai [Tue, 18 Nov 2008 09:55:36 +0000 (10:55 +0100)]
ALSA: hda - Fix resume of GPIO unsol event for STAC/IDT
Use cached write for setting the GPIO unsolicited event mask to be
restored properly at resume.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 18 Nov 2008 09:48:41 +0000 (10:48 +0100)]
ALSA: hda - Add quirks for HP Pavilion DV models
Added the quirk entries for HP Pavilion DV5 and DV7 with model=hp-m4.
Reference: Novell bnc#445321, bnc#445161
https://bugzilla.novell.com/show_bug.cgi?id=445321
https://bugzilla.novell.com/show_bug.cgi?id=445161
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 18 Nov 2008 09:45:15 +0000 (10:45 +0100)]
ALSA: hda - Fix GPIO initialization in patch_stac92hd71bxx()
Fixed the GPIO mask and co initialization in patch_stac92hd71bxx()
so that the gpio_maks for HP_M4 model is set properly.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 18 Nov 2008 09:38:56 +0000 (10:38 +0100)]
ALSA: hda - Fix restore of pin configs at resume for STAC/IDT codecs
Fixed the restore of pin configs at resume for some STAC/IDT codec
models. These models set explicitly the pin configs after the default
init configs, and these aren't restored properly at resume.
This patch introduces two changes:
- Allocate always pin_configs array in stac_spec so that the driver
can overwrite the value freely
- Introduce stac_change_pin_config() to change the pin config value
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 18 Nov 2008 08:36:55 +0000 (09:36 +0100)]
ALSA: hda - Use init callback in stac92xx_resume()
Call the init callback and remove duplicated codes in stac92xx_resume().
This also fixes the missing initialization such as digital I/O pins.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 18 Nov 2008 08:32:42 +0000 (09:32 +0100)]
ALSA: hda - Create jack detection elements in build_controls
The jack detection input elements should be created in build_controls
callback instead of init callback because init can be called multiple
times by suspend/resume and power-saving.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Tue, 18 Nov 2008 03:47:53 +0000 (11:47 +0800)]
ALSA: ELD proc interface for HDMI sinks
Create /proc/asound/card<card_no>/eld#<codec_no> to reflect the audio
configurations and capabilities of the attached HDMI sink.
Some notes:
- Shall we show an empty file if the ELD content is not valid?
Well it's not that simple. There could be partially populated ELD,
and there may be malformed ELD provided by buggy drivers/monitors.
So expose ELD as it is.
- The ELD retrieval routines rely on the Intel HDA interface,
others are/could be universal and independent ones.
- How do we name the proc file?
If there are going to be two HDMI pins per codec, then the current naming
scheme (eld#<codec no>) will fail. Luckily the user space dependencies should
be minimal, so it would be trivial to do the rename if that happens.
- The ELD proc file content is designed to be easy for scripts and human reading.
Its lines all have the pattern:
<item_name>\t[\t]*<item_value>
where <item_name> is a keyword in c language, while <item_value> could be any
contents, including white spaces. <item_value> could also be a null value.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Tue, 18 Nov 2008 03:47:52 +0000 (11:47 +0800)]
ALSA: create hda_eld.c for ELD routines and proc interface
ELD handling routines can be shared by all HDMI codecs,
and they are large enough to make a standalone source file.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Tue, 18 Nov 2008 03:47:51 +0000 (11:47 +0800)]
ALSA: introduce snd_print_pcm_rates()
We want to share some code with print_pcm_rates(),
so extract a common routine snd_print_pcm_rates() from it.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Tue, 18 Nov 2008 02:21:55 +0000 (10:21 +0800)]
ALSA: hda: remove redundant get_amp_nid()
Remove get_amp_nid(): it duplicates the one defined in hda_local.h
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Mon, 17 Nov 2008 08:57:33 +0000 (16:57 +0800)]
ALSA: hda-intel: reorder HDMI audio enabling sequence
Reorder HDMI audio enabling sequence so that
1) the sink knows about the coming audio stream
2) unmute
3) start transferring audio samples
The theory is that in the path A=>B=>C, we first make C ready, and then
enable B, and lastly allow A to send audio samples.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthew Ranostay [Sun, 16 Nov 2008 16:42:34 +0000 (11:42 -0500)]
ALSA: hda: STAC_DELL_M6 EAPD
Add support for EAPD on system suspend and disabling EAPD on headphone jack
detection for STAC_DELL_M6 laptops.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Mon, 17 Nov 2008 08:51:09 +0000 (09:51 +0100)]
ALSA: hda: alc883 model for ASUS P5Q-EM boards
Add a new alc883 model ALC1200_ASUS_P5Q for ASUS P5Q-EM boards.
It is the same as ALC883_6ST_DIG except that the SPDIF digital
output nid is 0x10.
Tested-by: Andrei Tanas <andrei@tanas.ca>
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Sat, 15 Nov 2008 18:28:54 +0000 (19:28 +0100)]
ALSA: hda - Check model type instead of SSID in patch_92hd71bxx()
Check board preset model instead of codec->subsystem_id in
patch_92hd71bxx() so that other hardwares configured via the model
option work like the given model.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Sat, 15 Nov 2008 18:05:21 +0000 (19:05 +0100)]
Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
sound/pci/hda/patch_sigmatel.c
Matthew Ranostay [Fri, 14 Nov 2008 22:46:22 +0000 (17:46 -0500)]
ALSA: hda: STAC_VREF_EVENT value change
Changed value for STAC_VREF_EVENT from 0x40 to 0x00 because the
unsol response value is only 6-bits width and the former value
was 1<<6 which is an overrun.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 14 Nov 2008 13:03:33 +0000 (14:03 +0100)]
ALSA: hda - Support Headphone and Speaker volumes control on VAIO
Split the bound Master control to individual Headphone and Speaker
volume controls for VAIO with STAC982x codecs.
The Master controls is still created as a vmaster.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 13 Nov 2008 13:38:00 +0000 (14:38 +0100)]
Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
sound/pci/hda/patch_sigmatel.c
Takashi Iwai [Thu, 13 Nov 2008 12:08:56 +0000 (13:08 +0100)]
ALSA: hda - Missing NULL check in hda_beep.c
Added a NULL check of input_allocate_device() in hda_beep.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 12 Nov 2008 15:45:04 +0000 (16:45 +0100)]
ALSA: hda - Add digital beep playback switch for STAC/IDT codecs
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>
Yang, Libin [Thu, 13 Nov 2008 10:07:07 +0000 (11:07 +0100)]
ALSA: hda - support detecting HD Audio devices with PCI class code
The patch uses HD Audio PCI class code to detect AMD HD Audio cards.
Signed-off-by: Libin Yang <libin.yang@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu Fengguang [Thu, 13 Nov 2008 02:19:38 +0000 (10:19 +0800)]
ALSA: handle SiI1392 HDMI codec in patch_intelhdmi.c
Move the handling of SiI1392 HDMI codec from patch_atihdmi.c to
patch_intelhdmi.c, which makes our ASUS P5E-VM HDMI board work.
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 12 Nov 2008 09:02:04 +0000 (10:02 +0100)]
Merge branch 'topic/fix/hda' into topic/hda
Conflicts:
sound/pci/hda/patch_sigmatel.c
Takashi Iwai [Wed, 12 Nov 2008 08:48:04 +0000 (09:48 +0100)]
ALSA: hda - Fix IDT/STAC multiple HP detection
Due to the recent change for multiple HP as line-out switch, only
one of the multiple headphons (usually a wrong one) is toggled
and the other pins are still disabled. This causes the silent output
problem on some Dell laptops.
Also, the hp_switch check is screwed up when a line-in or a mic-in
jack exists. This is added as an additional output, but hp_switch
check doesn't take it into account.
This patch fixes these issues: simplify hp_switch check by using
the NID instead of bool, and clean up / fix the toggle of HP pins
in unsol event handler code.
Reference: Novell bnc#443267
https://bugzilla.novell.com/show_bug.cgi?id=443267
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 11 Nov 2008 15:47:24 +0000 (16:47 +0100)]
ALSA: hda - Fix input pin initialization for STAC/IDT codecs
The input pins are sometimes not initialized properly because
of the optimization check of the current pinctl code.
Force to initialize the mic input pins so that they can be set up
properly even if they were in a weird state. But keep other input
pins if already set up as input, since this could be an extra mic
pin.
Reference: Novell bnc#443738
https://bugzilla.novell.com/show_bug.cgi?id=443738
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 11 Nov 2008 15:46:19 +0000 (16:46 +0100)]
ALSA: hda - Add missing analog-mux mixer creation for STAC9200
The creation of analog-mux mixer element is missing in
patch_stac9200() due to the dynamic allocation patch.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Travis Place [Mon, 10 Nov 2008 16:56:23 +0000 (17:56 +0100)]
ALSA: hda - Make the HP EliteBook 8530p use AD1884A model laptop
Added a QUIRK to patch_analog.c for the HP Elitebook 8530p
(IDs 0x103c:0x30e7) to use AD1884A model 'laptop' by default.
Playback and Capture confirmed working.
Signed-off-by: Travis Place <wishie@wishie.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 10 Nov 2008 15:24:26 +0000 (16:24 +0100)]
ALSA: hda - Fix another cache list management
Fix another silly bug in the amp cache list management.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Michel Marti [Sat, 8 Nov 2008 10:33:32 +0000 (11:33 +0100)]
ALSA: hda - Add another HP model (6730s) for AD1884A
Added model=laptop for another HP machine (103c:3614) with AD1884A
codec.
Signed-off-by: Michel Marti <mma@objectxp.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 7 Nov 2008 13:53:09 +0000 (14:53 +0100)]
ALSA: hda - Fix probe errors on Dell Studio Desktop
BIOS on Dell Studio Desktop tells wrong codec probe masks.
This patch gives the preset mask value to avoid invalid access.
Reference: Novell bug#440907
https://bugzilla.novell.com/show_bug.cgi?id=440907
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 7 Nov 2008 13:49:28 +0000 (14:49 +0100)]
ALSA: hda - Fix ALC260 hp3013 master switch
The master switch doesn't influence on NID 0x15, the headphone jack
on HP 3013 model because alc260_hp_master_update() ignores the passed
arguments.
Also, corrected the wrong arguments of hp3013 (0x10 and 0x15) although
this doesn't change any behavior.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 7 Nov 2008 08:06:45 +0000 (09:06 +0100)]
Merge branch 'topic/fix/hda' into topic/hda
Takashi Iwai [Thu, 6 Nov 2008 23:49:48 +0000 (00:49 +0100)]
ALSA: hda - Fix broken hash chain allocation
The chaining for amp hash got broken due to the rewrite with
snd_array. Fixed now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 6 Nov 2008 23:26:52 +0000 (00:26 +0100)]
ALSA: hda - Add max allocation check in array allocator
Added a check for max allocation size in snd_array_new() for a
debugging purpose.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 6 Nov 2008 23:23:30 +0000 (00:23 +0100)]
ALSA: hda - Add missing NULL check in amp hash allocation
Added the missing NULL check from allocator in get_alloc_hash().
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tony Vroon [Thu, 6 Nov 2008 15:08:49 +0000 (15:08 +0000)]
ALSA: hda - Add lifebook model for Realtek ALC269
The widget layout of the Fujitsu Lifebook S6420 (which is ICH9M-based
and uses an ALC269) is similar but not identical to the Lifebook
S6410/E8410 (which are ICH8M-based and use an ALC262).
It is named lifebook as fujitsu is in use for Amilo machines. This builds
on the Quanta FL1 work and supports all analog inputs & outputs that I am
aware of. Microphone autoswitch is implemented. The laptop mic port takes
precedence over the dock mic port if both happen to have a jack plugged in.
This made sense to me as a design decision (imagine a presentation
environment with the dock fully wired in and the presenter quickly wanting
to override the mic with a headset).
There is mention of a digital audio path on the codec graph, so perhaps
the headphone socket is dual-function analog/digital. I will follow up
with another patch if I can acquire equipment to test this.
Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 6 Nov 2008 16:11:10 +0000 (17:11 +0100)]
ALSA: hda - Make codec-probing more robust
When an error occurs during the codec probing, typically accessing to an
non-existing codec slot, the controller chip gets often screwed up and
can no longer communicate with the codecs.
This patch adds a preparation phase just to probe codec addresses before
actually creating codec instances. If any error occurs during this
probing phase, the driver resets the controller to recover.
This will (hopefully) fix the famous "single_cmd" errors.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 6 Nov 2008 15:50:40 +0000 (16:50 +0100)]
ALSA: hda - simplify hda_bus ops callbacks
The hda_bus ops callback take struct hda_bus pointer.
Also, the command callback takes the composed command word, instead of
each small bits in arguments.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 5 Nov 2008 13:57:20 +0000 (14:57 +0100)]
ALSA: hda - Split ALC268 acer model
There are actually two variants of ALC268 Acer implementation, one
with an analog built-in mic (pin 0x19) and another with a digital
mic (pin 0x12). Created a new model, acer-dmic, for the latter case
now.
So far, all known models are assigned to be analog-mic, according to
the BIOS setup. If this doesn't match with the actual case, one needs
to try model=acer-dmic, and fix the entry to point ALC268_ACER_DMIC
if it works.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 5 Nov 2008 10:30:56 +0000 (11:30 +0100)]
ALSA: hda - Add a quirk for MEDION MD96630
Use model=lenovo-ms7195-dig for MEDION MD96630 laptop (17c0:4085)
with ALC888 codec.
Reference: Novell bnc#412548
https://bugzilla.novell.com/show_bug.cgi?id=412528
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 5 Nov 2008 07:06:08 +0000 (08:06 +0100)]
ALSA: hda - Add ASUS V1Sn support
Asus V1s series laptops have an ALC660VD with PCI id: 0x1043, 0x1633.
1.) remove the previous behaviour of mapping that to the ALC861VD_LENOVO
device.
2.) add a new ALC660VD_V1S device based on ALC861VD_LENOVO, with an
added digital out.
Signed-off-by: Tristan Aston <astrotris@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 5 Nov 2008 06:58:25 +0000 (07:58 +0100)]
ALSA: hda - Fix unused function in patch_intelhdmi.c
Add a proper ifdef to shut out a compile warning:
CC [M] sound/pci/hda/patch_intelhdmi.o
sound/pci/hda/patch_intelhdmi.c:286: warning: ‘hdmi_get_dip_index’ defined but \
not used
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Wu, Fengguang [Wed, 5 Nov 2008 03:16:56 +0000 (11:16 +0800)]
ALSA: hda - Intel HDMI audio support
Add support for Intel G45 integrated HDMI audio codecs.
This initial release supports:
- 2 channel stereo sound output
- report monitor's ELD information
Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 4 Nov 2008 16:48:39 +0000 (17:48 +0100)]
ALSA: hda - Don't create empty PCM streams
Due to the hda-reconfiguration patches, the check of empty stream
is gone, and this results in an error with the codec setup with empty
streams.
This patch adds the check again to avoid the error at probing.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 4 Nov 2008 12:30:57 +0000 (13:30 +0100)]
ALSA: hda - Limit the number of GPIOs show in proc
Limit the number of GPIOs shown in proc. Otherwise it gets too long
unnecessarily, and hard to analyze.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 4 Nov 2008 07:43:08 +0000 (08:43 +0100)]
ALSA: hda - Fix possible NULL dereference
Add NULL-check of the return value of snd_kctl_new1() before
accessing it. Also, make a sanity NULL check to snd_BUG_ON()
for debugging only.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 3 Nov 2008 16:47:49 +0000 (17:47 +0100)]
ALSA: hda - Fix missing ADC list in ALC260 auto-probe mode
The commit
f9e336f65b666b8f1764d17e9b7c21c90748a37e
ALSA: hda - Unify capture mixer creation in realtek codes
removed the ADC check for ALC260 auto-probe mode accidentally.
Re-added to patch_alc260() again.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 3 Nov 2008 16:39:46 +0000 (17:39 +0100)]
ALSA: hda - Add ALC299 fujitsu preset model
Added a preset model for FSC Amilo with ALC269 codec chip.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthew Ranostay [Mon, 3 Nov 2008 13:12:43 +0000 (08:12 -0500)]
ALSA: hda: make a STAC_DELL_EQ option
Add support for explicitly enabling the EQ distortion hack for
systems without software biquad support.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 3 Nov 2008 09:07:43 +0000 (10:07 +0100)]
ALSA: hda - Add a quirk for another Acer Aspire (1025:0090)
Added a quirk for another Acer Aspier laptop (1025:0090) with ALC883
codec. Reported in Novell bnc#426935:
https://bugzilla.novell.com/show_bug.cgi?id=426935
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 31 Oct 2008 16:48:56 +0000 (17:48 +0100)]
ALSA: hda - Re-add input-source control for Realtek
Re-added again "Input Source" control that was removed mistakenly
in the previous patchset.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 31 Oct 2008 15:37:07 +0000 (16:37 +0100)]
ALSA: hda - Unify capture mixer creation in realtek codes
Unified the capture mixer creation in patch_realtek.c.
ALC268 is still an exception since it has no AMP in ADC but in
MUX widget.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 31 Oct 2008 14:24:04 +0000 (15:24 +0100)]
ALSA: hda - Unify capture callbacks in realtek codes
Unify the capture callbacks in patch_realtek.c.
The difference of matrix or mux style is checked via spec->is_mix_capture
flag.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 31 Oct 2008 14:01:37 +0000 (15:01 +0100)]
ALSA: hda - Use macros to check array overflow
Use macro to add mixer and verb elements to check the possible
array overflow.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 31 Oct 2008 16:24:01 +0000 (17:24 +0100)]
Merge branch 'topic/fix/hda' into topic/hda
Takashi Iwai [Fri, 31 Oct 2008 16:16:31 +0000 (17:16 +0100)]
ALSA: hda - Add digital-mic for ALC269 auto-probe mode
The digital mic wasn't detected properly for ALC269 auto-probing mode
because of its widget number. Fixed now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Fri, 31 Oct 2008 13:18:24 +0000 (14:18 +0100)]
ALSA: hda - Disable broken mic auto-muting in Realtek codes
The recent addition of automatic mic-muting is broken in some cases.
The code assumes that the pin nids <= 0x18, but the digital pins can
be less than 0x18.
Also, it assumes the front-mic being the internal mic, but it depends
on the hardware implementation actually.
Instead of complex case-fixes, better to disable the code as now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 29 Oct 2008 15:18:25 +0000 (16:18 +0100)]
ALSA: hda - Add reboot notifier
The current snd-hda-intel driver seems blocking the power-off on some
devices like eeepc. Although this is likely a BIOS problem, we can add
a workaround by disabling IRQ lines before power-off operation.
This patch adds the reboot notifier to achieve it.
The detailed problem description is found in bug#11889:
http://bugme.linux-foundation.org/show_bug.cgi?id=11889
Tested-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 29 Oct 2008 07:17:05 +0000 (08:17 +0100)]
Merge branch 'topic/fix/hda' into topic/hda
Takashi Iwai [Wed, 29 Oct 2008 07:15:30 +0000 (08:15 +0100)]
ALSA: hda - Fix indentation in hda_local.h
Just cosmetic fixes of spacing that annoyed me.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Wed, 29 Oct 2008 07:03:42 +0000 (08:03 +0100)]
ALSA: hda - Fix SPDIF mute on IDT/STAC codecs
The SPDIF mute switch code seems broken. It doesn't set unmute bits
properly. Also it contains the duplicated lines (merge error?) to be
cleaned up.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Tue, 28 Oct 2008 14:50:13 +0000 (14:50 +0000)]
ALSA: hda: Add HDA vendor ID for Wolfson Microelectronics
Add Wolfson Microelectronics to the HDA vendor ID table.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 28 Oct 2008 14:39:26 +0000 (15:39 +0100)]
ALSA: hda - Add another HP model for AD1884A
Added a quirk entry for another HP mobile device with AD1884A codec.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 28 Oct 2008 10:44:45 +0000 (11:44 +0100)]
Merge branch 'topic/fix/hda' into topic/hda
Takashi Iwai [Tue, 28 Oct 2008 10:38:58 +0000 (11:38 +0100)]
ALSA: hda - Remove old codec-probe limitation
Removed the old workaround to avoid the non-existing codec slot.
The current code should work without that workaround. If any,
we can add a quirk table.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 27 Oct 2008 15:56:24 +0000 (16:56 +0100)]
ALSA: hda - Restore default pin configs for realtek codecs
Some machines have broken BIOS resume that doesn't restore the default
pin configuration properly, which results in a wrong detection of HP
pin. This causes a silent speaker output due to missing HP detection.
Related bug: Novell bug#406101
https://bugzilla.novell.com/show_bug.cgi?id=406101
This patch fixes the issue by saving/restoring the default pin configs
by the driver itself.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 27 Oct 2008 07:36:48 +0000 (08:36 +0100)]
Merge branch 'topic/hda-next' into topic/hda
Matthew Ranostay [Sat, 25 Oct 2008 05:06:04 +0000 (01:06 -0400)]
ALSA: hda: add support for jack detection on IDT codecs.
This patch adds support to the IDT codec families to report jack status
to the jack abstraction layer. This required some reorganization in the
stac92xx_unsol_event function in which the index value is changed to
reporting the nid with the event.
Also adds an sigmatel_jack struct to keep track of the nid relation
to the jack abstraction layer instance. Also adds functions to set and
retrieve data values for each nid, this is used in stac92xx_unsol_event
to retrieve the GPIO mask for STAC_VREF_EVENT.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthew Ranostay [Sat, 25 Oct 2008 05:05:45 +0000 (01:05 -0400)]
ALSA: hda: add snd_hda_get_jack* functions
This patch adds snd_hda_get_jack* functions for reporting jack location,
device, and connectivity type.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthew Ranostay [Sat, 25 Oct 2008 05:05:29 +0000 (01:05 -0400)]
ALSA: hda: dynamic jack id
This patch duplicates the jack->id pointer with kstrdup() to prevent
scoping issues from calling autoprobing functions from the HDA section.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Matthew Ranostay [Sat, 25 Oct 2008 05:05:04 +0000 (01:05 -0400)]
ALSA: jack: lineout support to jack abstraction layer
This patch introduces support for reporting SW_LINEOUT_INSERT detection events
via the jack abstraction layer.
Also adds a SND_JACK_LINEOUT define to the input system header.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Harvey Harrison [Wed, 22 Oct 2008 03:28:04 +0000 (20:28 -0700)]
ALSA: hda - correct bracketing in spdif test in patch_sigmatel.c
Noticed by sparse:
sound/pci/hda/patch_sigmatel.c:1285:43: warning: dubious: !x & y
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Acked-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Tue, 21 Oct 2008 15:01:47 +0000 (17:01 +0200)]
ALSA: hda - Fix conflicting volume controls on ALC260
ALC260 auto-parsing mode may create multiple controls for the same volume
widget (0x08 and 0x09) depending on the pin. For example, Front and
Headphone volumes may control the same volume, just the latter one wins.
This patch adds a proper check of the existing of the volume control
and avoid the doulbed creation of the same volume controls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 16 Oct 2008 14:39:56 +0000 (16:39 +0200)]
ALSA: hda - Release jack instance for dynamic reconfigure
The jack instance has to be release manually in free callback
in patch_sigmatel.c for dynamic reconfiguration.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 16 Oct 2008 14:39:46 +0000 (16:39 +0200)]
Merge branch 'topic/hda-reconfig' into topic/hda-next
Matthew Ranostay [Wed, 15 Oct 2008 18:45:38 +0000 (14:45 -0400)]
ALSA: hda: add support for jack detection on IDT/Sigmatel
Added support for jack detection reporting to userspace for
IDT/Sigmatel codecs.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>