aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-13ALSA: hda - Fix pin configuration of HP Pavilion dv7Takashi Iwai1-1/+1
Fix the quirk entry for HP Pavilion dv7 in order to make the bass speaker working. Reported-and-tested-by: Tomas Pospisek <tpo2@sourcepole.ch> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-28ALSA: hda - Call snd_array_init() early and only onceTakashi Iwai1-65/+63
This is a preliminary patch for introducing a protection to access races of snd_array instances. Call snd_array_init() appropriately at the initialization time and don't call it twice. Also the allocations of codec-spec structs are cleaned up by helper functions in patch_sigmatel.c and patch_analog.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-21ALSA: hda - Remove shutup calls in free callbacksTakashi Iwai1-2/+0
The free callback is called at the state where no extra verbs are executed, thus calling *_shutup() is useless, as it's checking the shutdown flag. Remove such superfluous calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-08ALSA: hda - Apply a proper chmap for built-in 2.1 speakersTakashi Iwai1-0/+5
When 2.1 speakers are detected, use the corresponding channel map instead of the standard map with front+rear surrounds. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-08ALSA: hda - Give standard "Bass Speaker" mixer for 2.1 speakersTakashi Iwai1-4/+4
When two built-in speakers are found on the machine, we can suppose it's rather a 2.1 speaker system with a bass output instead of front/surround channels. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-30Merge branch 'for-linus' into for-nextTakashi Iwai1-0/+2
... for migrating the core changes for USB-audio disconnection fixes
2012-10-26ALSA: hda - Fix mute-LED setup for HP dv5 laptopGustavo Maciel Dias Vieira1-0/+2
The BIOS on HP dv5 doesn't have the DMI string to guide the setup of mute led GPIO and polarity. Associate this laptop with the hp-inv-led model. Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org> Tested-by: Vinícius Angiolucci <angiolucci@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-17ALSA: hda - Add workaround for conflicting IEC958 controlsTakashi Iwai1-3/+4
When both an SPDIF and an HDMI device are created on the same card instance, multiple IEC958 controls are created with indices=0, 1, ... But the alsa-lib configuration can't know which index corresponds actually to which PCM device, and both the SPDIF and the HDMI configurations point to the first IEC958 control wrongly. This patch introduces a (hackish and ugly) workaround: the IEC958 controls for the SPDIF device are re-labeled with device=1 when HDMI coexists. The device=1 corresponds to the actual PCM device for SPDIF, so it's anyway a better representation. In future, HDMI controls should be moved with the corresponding PCM device number, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-09ALSA: hda - remove "Mic Jack Mode" for headset jacks (Latitude Exx30)David Henningsson1-0/+27
Dell Latitude 5x30 and 6x30 series of machines all have a single 4-pin headset jack. Enabling line in mode for such jack is very confusing (you would only get mono input, and would have to use non-standard adapters), so remove the option by default. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-06ALSA: hda - make Realtek/Sigmatel/Conexant use the generic unsol eventDavid Henningsson1-15/+5
For less duplication of code between codecs, and to make it easier in the future to improve code for all codecs simultaneously. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-14ALSA: hda - Add mic-mute LED control for HP laptopTakashi Iwai1-10/+74
Some of new HP laptops have a LED for microphone (or recording) mute, and it's controlled by GPIO pin 3. Bind this with the capture switch to turn it on/off properly by the mixer change. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-11Merge branch 'for-linus' into for-nextTakashi Iwai1-1/+1
To merge HD-audio fixes back to 3.7 development line
2012-09-06ALSA: hda - fix control names for multiple speaker out on IDT/STACDavid Henningsson1-3/+6
For multiple speaker outs, the names were previously "Speaker,0", "Speaker,1", "Center"/"LFE", "Speaker,3". This is inconsistent, confusing, and is not picked up correctly by PulseAudio. Instead use "Front", "Surround", "Center"/"LFE", "Side" which is more standard. BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046734 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-09-06ALSA: hda - Fix missing Master volume for STAC9200/925xTakashi Iwai1-1/+1
With the commit [2faa3bf: ALSA: hda - Rewrite the mute-LED hook with vmaster hook in patch_sigmatel.c], the former Master volume control was converted to PCM. This was supposed to be covered by the vmaster control. But due to the lack of "PCM" slave definition, this didn't happen properly. The patch fixes the missing entry. Reported-by: Andrew Shadura <bugzilla@tut.by> Cc: <stable@vger.kernel.org> [v3.4+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-28Merge branch 'for-linus' into for-nextTakashi Iwai1-0/+4
Need to merge the fixes regarding EPSS. Conflicts: sound/pci/hda/hda_codec.c
2012-08-28ALSA: hda - Don't trust codec EPSS bit for IDT 92HD83xx & coTakashi Iwai1-0/+1
These codecs seem reporting EPSS but require longer delay for the proper D3 transition. For example, D3_STOP_CLOCK_OK bit won't be set correctly even after D3. In this patch, codec->epss flag is overridden for avoid the misbehavior. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-22ALSA: hda - Call snd_hda_jack_report_sync() generically in hda_codec.cTakashi Iwai1-2/+0
Instead of calling the jack sync in the init callback of each codec, call it generically at initialization and resume. By calling it at the last of resume sequence, a possible race between the jack sync and the unsol event enablement in the current code will be closed, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-22ALSA: hda - Do not set GPIOs for speakers on IDT if there are no speakersDavid Henningsson1-0/+3
This fixes an issue with a machine where there were no speakers, but GPIO0 had to be data=1 for the headphone to be functioning. I'm not sure if we need a more advanced patch to solve all possible cases, but if so, this patch would still provide a minor optimisation. BugLink: https://bugs.launchpad.net/bugs/1040077 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-16ALSA: hda - Don't send invalid volume knob command on IDT 92hd75bxxDavid Henningsson1-4/+5
Instead of blindly initializing a volume knob widget, first check that there actually is a volume knob widget. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-31ALSA: hda - Fix mute-LED GPIO initialization for IDT codecsTakashi Iwai1-1/+6
The IDT codecs initializes the GPIO setup for mute LEDs via snd_hda_sync_vmaster_hook(). This works in most cases except for the very first call, which is called before PCM and control creations. Thus before Master switch is set manually via alsactl, the mute LED may show the wrong state, depending on the polarity. Now it's fixed by calling the LED-status update function manually when no vmaster is set yet. Cc: <stable@vger.kernel.org> [v3.4+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-31ALSA: hda - Fix polarity of mute LED on HP Mini 210Takashi Iwai1-0/+5
The commit a3e199732b made the LED working again on HP Mini 210 but with a wrong polarity. This patch fixes the polarity for this machine, and also introduce a new model string "hp-inv-led". Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=772923 Cc: <stable@vger.kernel.org> [v3.3+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-26ALSA: hda - Fix mute-LED GPIO setup for HP Mini 210Takashi Iwai1-1/+9
BIOS on HP Mini 210 doesn't provide the proper "HP_Mute_LED" DMI string, thus the driver doesn't initialize the GPIO, too. In the earlier kernel, the driver falls back to GPIO1, but since 3.3 we've stopped this due to other wrongly advertised machines. For fixing this particular case, add a new model type to specify the default polarity explicitly so that the fallback to GPIO1 is handled. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=772923 Cc: <stable@vger.kernel.org> [v3.3+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-07-03ALSA: Convert to new pm_ops for PCI driversTakashi Iwai1-1/+1
Straightforward conversion to the new pm_ops from the legacy suspend/resume ops. Since we change vx222, vx_core and vxpocket have to be converted, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-06-26ALSA: hda - Fix power-map regression for HP dv6 & coTakashi Iwai1-1/+6
The recent fix for power-map controls (commit b0791dda813) caused regressions on some other HP laptops. They have fixed pins but these pins are exposed as jack-detectable. Thus the driver tries to control the power-map dynamically per jack detection where it never gets on. This patch adds the check of connection and it assumes the no jack detection is available for fixed pins no matter what pin capability says. BugLink: http://bugs.launchpad.net/bugs/1013183 Reported-by: Luis Henriques <luis.henriques@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15ALSA: hda/idt - Cache the power-map bitsTakashi Iwai1-3/+18
For avoiding unnecessary codec read/write verbs at each jack detection. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15ALSA: hda/idt - Clean up power-map check codeTakashi Iwai1-10/+9
Turn off the power-map for unused ports and check the jack-detection capability in the first place. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-3/+3
2012-05-15ALSA: hda - Evaluate gpio_led hints at the right momentTakashi Iwai1-7/+5
The hints regarding the mute-LED must be evaluated during the codec parsing. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-15ALSA: hda/idt - Fix power-map for speaker-pins with some HP laptopsTakashi Iwai1-3/+3
BIOS on some HP laptops don't set the speaker-pins as fixed but expose as jacks, and this confuses the driver as if these pins are jack-detectable. As a result, the machine doesn't get sounds from speakers because the driver prepares the power-map update via jack unsol events which never come up in reality. The bug was introduced in some time in 3.2 for enabling the power-mapping feature. This patch fixes the problem by replacing the check of the persistent power-map bits with a proper is_jack_detectable() call. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43240 Cc: <stable@vger.kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-09ALSA: hda - Remove pre_resume and post_suspend opsTakashi Iwai1-21/+0
Since the recent commit, the resume procedure is always performed at the resume time. This makes the pre_resume hack for VREF mute LED on some HP laptops superfluous. As this is the only user of pre_resume (and there is no user of post_suspend) ops, let's kill them again. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-05-08ALSA: hda - Move BIOS pin-parser code to hda_auto_parser.cTakashi Iwai1-0/+1
Just code shuffles. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20ALSA: hda - Add snd_hda_get_default_vref() helper functionTakashi Iwai1-21/+5
Add a new helper function to guess the default VREF pin control bits for mic in. This can be used to set the pin control value safely matching with the actual pin capabilities. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-20ALSA: hda - Introduce snd_hda_set_pin_ctl*() helper functionsTakashi Iwai1-14/+6
For setting the pin-control values more safely to match with the actual pin capability bits, a copule of new helper functions, snd_hda_set_pin_ctl() and snd_hda_set_pin_ctl_cache(), are introduced. These are simple replacement of the codec verb write with AC_VERB_SET_PIN_WIDGET but do more sanity checks and filter out superfluous pin-control bits if they don't fit with the corresponding pin capabilities. Some codecs are screwed up or ignore the command when such a wrong bit is set. These helpers will avoid such secret errors. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-04-19ALSA: hda/sigmatel - Fix inverted mute LEDTakashi Iwai1-3/+2
While refactoring the mute-LED handling for HP laptops, I messed up the polarity check in a wrong way. The red (or the mute-LED if any) should appear in the muted state, corresponding to GPIO on. Reported-by: Mikko Vinni <mmvinni@yahoo.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-16ALSA: hda - Fix build with CONFIG_PM=nTakashi Iwai1-0/+9
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-14ALSA: hda - Fix build of patch_sigmatel.c without CONFIG_SND_HDA_POWER_SAVETakashi Iwai1-8/+0
Now the mute-LED is controlled without powersave hack, and the ifdefs must be removed. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13ALSA: hda - Add expose_enum_ctl flag to snd_hda_add_vmaster_hook()Takashi Iwai1-1/+1
Since it's not always safe to assume that the vmaster hook is purely the mute-LED control, add the flag indicating whether to expose the mute-LED enum control or not. Currently, conexant codec sets this off for non-HP laptops where EAPD may be used really as EAPD. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-13ALSA: hda - Add "Mute-LED Mode" enum controlTakashi Iwai1-6/+7
Create snd_hda_add_vmaster_hook() and snd_hda_sync_vmaster_hook() helper functions to handle the mute-LED in vmaster hook more commonly. In the former function, a new enum control "Mute-LED Mode" is added. This provides user to choose whether the mute-LED should be turned on/off explicitly or to follow the master-mute status. Reviewed-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-12ALSA: hda - Rewrite the mute-LED hook with vmaster hook in patch_sigmatel.cTakashi Iwai1-87/+49
The mute-LED is controlled in patch_sigmatel.c by (ab-)using the powersave hook. This can be now rewritten with the vmaster hook instead, which is much simpler and can work even without CONFIG_SND_HDA_POWER_SAVE kconfig. A drawback is that the mute-LED corresponds _only_ to the Master mixer switch instead of checking the whole DACs. But usually this shouldn't be a big problem as PA enables the mixer elements accordingly. Also, this patch changes the code to create vmaster always even on STAC9200 and STAC925x. The former "Master" on these chips are renamed as "PCM" now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-03-02Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-1/+1
Speaker-Out renames are merged. Conflicts: sound/pci/hda/patch_realtek.c
2012-02-29ALSA: hda - Always set HP pin in unsol handler for STAC/IDT codecsTakashi Iwai1-1/+1
A bug report with an old Sony laptop showed that we can't rely on BIOS setting the pins of headphones but the driver should set always by itself. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-28ALSA: hda - Fix audio playback support on HP Zephyr systemVitaliy Kulikov1-0/+36
Enables port E of IDT 92HD91 codec as output and sets correct output phase between ports E and D and high pass filter. Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13Merge branch 'fix/hda' into topic/hdaTakashi Iwai1-2/+2
Necessary for working on the jack-detection suppression feature.
2012-02-09ALSA: hda - Fix mute-LED VREF value for new HP laptopsTakashi Iwai1-2/+2
The new HP laptops turns off the mute LED with VREF50 or VREF80, but not in HIZ unlike the previous models. Since VREF50 (also 80) works with the previous models, let's use VREF50 for all. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-03ALSA: hda - Add suffix argument to snd_hda_add_vmaster()Takashi Iwai1-22/+7
In most cases, the slave strings for vmaster are identical between volumes and switches except for "xxx Volume" and "xxx Switch" suffix. Now snd_hda_add_vmaster() takes the optional suffix argument so that each string can be composed with the given suffix, and we can share the slave name strings in both volume and switch calls nicely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-25ALSA: hda: set mute led polarity for laptops with buggy BIOS based on SSIDGustavo Maciel Dias Vieira1-1/+8
HP laptop models with buggy BIOS are apparently frequent, including machines with different codecs. Set the polarity of the mute led based on the SSID and include an entry for the HP Mini 110-3100. Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org> Tested-by: Predrag Ivanovic <predivan@open.telekom.rs> Cc: <stable@kernel.org> [v3.2+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-23ALSA: hda - Fix silent outputs from docking-station jacks of Dell laptopsTakashi Iwai1-3/+5
The recent change of the power-widget handling for IDT codecs caused the silent output from the docking-station line-out jack. This was partially fixed by the commit f2cbba7602383cd9cdd21f0a5d0b8bd1aad47b33 "ALSA: hda - Fix the lost power-setup of seconary pins after PM resume". But the line-out on the docking-station is still silent when booted with the jack plugged even by this fix. The remainig bug is that the power-widget is set off in stac92xx_init() because the pins in cfg->line_out_pins[] aren't checked there properly but only hp_pins[] are checked in is_nid_hp_pin(). This patch fixes the problem by checking both HP and line-out pins and leaving the power-map correctly. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42637 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-20snd-hda-intel: better Alienware M17x R3 quirkAlbert Pool1-1/+1
I have been told that this way the rear headphone connector is working as well; with model=alienware only laptop speakers work. The subsystem of both controller and codec is 1028:0490. Signed-off-by: Albert Pool <albertpool@solcon.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-16ALSA: HDA: Fix internal microphone on Dell Studio 16 XPS 1645David Henningsson1-1/+1
More than one user reports that changing the model from "both" to "dmic" makes their Internal Mic work. Cc: stable@kernel.org Tested-by: Martin Ling <martin-launchpad@earth.li> BugLink: https://bugs.launchpad.net/bugs/795823 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-01-11ALSA: hda - Fix the lost power-setup of seconary pins after PM resumeTakashi Iwai1-13/+23
When multiple headphone or other detectable output pins are present, the power-map has to be updated after resume appropriately, but the current driver doesn't check all pins but only the first pin (since it's enough to check it for the mute-behavior). This resulted in the silent output from the secondary outputs after PM resume. This patch fixes the problem by checking all pins at (re-)init time. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=740347 Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>