aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-12-07ALSA: pci: remove __dev* attributesBill Pemberton1-24/+24
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-05ALSA: hda: Add PCI device prefix for clarityDaniel J Blueman1-61/+64
When printing, use a prefix of the PCI domain, bus, device and function as in other drivers, to differentiate multiple devices. Important for reporting and debugging. A future step is to tidy this up with dev_printk et al. v2: Move conversion specifier into call site, preventing build issues v3: Refactor for Takashi's for-next branch Signed-off-by: Daniel J Blueman <daniel@quora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-04ALSA: hda - Fix yet another race of vga_switcheroo registrationTakashi Iwai1-29/+32
The recent fix for vga switcheroo race in commit 128960a9 opened yet another race. At the time the audio driver starts probing, user may turn off D-GPU off. But at this moment, the audio driver still doesn't register the vga switcheroo client, thus the switching isn't notified. Then the hardware gets off out of sudden, resulting in invalid reads and lots of "spurious response" error messages. For solving this situation, the following changes have been done in this patch: - Move again vga switcheroo registration to the very early stage of the probing; this also requires to set pci drvdata properly before registration - Introduce the completion to synchronize the driver probe at vga switcheroo callbacks; this assures that the whole probing finished before executing the callbacks Reported-by: Daniel J Blueman <daniel@quora.org> Tested-by: Daniel J Blueman <daniel@quora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-03ALSA: hda/realtek - Keep the channel count for multiple speakersTakashi Iwai1-5/+16
The current Realtek driver reconfigures the max PCM channels dynamically according to the value of Channel Mode enum if the multi-io retasking is available. It works fine for multi-io pins. But when multiple speaker pins are available, the channels of speakers also have to obey to the channel mode, which isn't nice. (That is, when you select "2ch" in Channel Mode so that the line-in and mic jack behave as input, you can't play surrounds properly from the built-in speaker.) This patch fixes the problem by taking the channel number for multiple speakers into account in the channel-mode setup code. Also it fixes the wrongly set up max_channels value in the case of multi-io extension. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-12-03Merge tag 'asoc-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai1-2/+4
ASoC: Updates for v3.8 Very quiet release for ASoC really: - Standardisation of the logging. - DT and dmaengine support for Atmel. - Support for Wolfson ADSP cores. - New drivers for Freescale/iVeia P1022 and Maxim MAX98090.
2012-11-30ALSA: hda - Add a helper function for simple enum kcontrolsTakashi Iwai5-48/+44
The same type of code is being used in multiple places in various codec drivers, so put it as a core library. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-30ALSA: hda - Pass errors properly in alc_auto_check_switches()Takashi Iwai1-22/+37
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-30ALSA: hda - Refactor alc_kcontrol_new() usagesTakashi Iwai1-28/+18
Allocate the name string and assign the structure in alc_kcontrol_new() itself to reduce the code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-30ALSA: hda - Use standard sort function in hda_auto_parser.cTakashi Iwai1-59/+47
Just refactoring, no functional changes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-28ALSA: hda - Call snd_array_init() early and only onceTakashi Iwai6-103/+105
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-24ALSA: hda - Fix build without CONFIG_PMTakashi Iwai1-2/+4
I forgot this again... codec->in_pm is in #ifdef CONFIG_PM Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-23ALSA: hda - Add a fixup for internal mic on MacBook Pro 8,1Takashi Iwai1-0/+14
The internal mic on MBP81 gives only the right channel, and the left channel is static. Add a verb to fix the ADC2 channel mode to expand mono right to stereo. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=50781 Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-23ALSA: hda - Add missing verb applications in patch_cirrus.cTakashi Iwai1-15/+2
We forgot to apply the fixup verbs in cs_init(). But adding the fixup verbs will break mbp101 fixup that has been fixed recently again, since the mbp101 fixup contains the wrong verbs to override. So these bogus verbs must be removed, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-23ALSA: hda - Move static ADC setup for CS4206 to init verbsTakashi Iwai1-3/+3
It's constant, so better to be put in the static init array. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-22Merge branch 'for-linus' into for-nextTakashi Iwai2-0/+2
2012-11-22ALSA: hda - Don't release firmware when CONFIG_PM is setTakashi Iwai1-0/+2
The new firmware code tries to re-read the formerly read firmware files before suspend. Thus it's wiser to keep the "patch" firmware in the driver for avoiding this unnecessary re-reading. Of course, this will consume a bit of memory for unused stuff, but the patch fw is supposed to be fairly small, so it's more benefit in the end. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-22ALSA: hda - Don't overwrite the pin default configsTakashi Iwai1-42/+3
Since we keep the pin default config values anyway internally, we don't have to set the values in the codec. This patch removes the code writing the pincfg values. As a gratis bonus, we can remove also the code restoring the original pincfg values at PM resume or module free. This will give us more benefit, as it can reduce the unnecessary power-up of codecs. This won't change the driver functionality. The only difference would be that the codec proc file will show the original pincfg values instead of the actually referred values. The actually referred values can be determined from sysfs *_pin_configs files. (Also hda-emu was updated to follow this change.) Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-21ALSA: hda - Remove shutup calls in free callbacksTakashi Iwai3-4/+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-21ALSA: hda - Use standard helper functions in patch_hdmi.cTakashi Iwai1-4/+3
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-21ALSA: hda - Cirrus: Correctly clear line_out_pins when moving to speakerDavid Henningsson1-0/+1
If this array is not cleared, the jack related code later might fail to create "Internal Speaker Phantom Jack" on Dell Inspiron 3420 and Dell Vostro 2420. BugLink: https://bugs.launchpad.net/bugs/1076840 Cc: stable@vger.kernel.org (3.6+) Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-21ALSA: hda - Add support for Realtek ALC292David Henningsson1-0/+1
We found a new codec ID 292, and that just a simple quirk would enable sound output/input on this ALC292 chip. BugLink: https://bugs.launchpad.net/bugs/1081466 Cc: stable@vger.kernel.org Tested-by: Acelan Kao <acelan.kao@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-19Merge branch 'for-linus' into for-nextTakashi Iwai4-21/+31
Merge the recent HD-audio codec change for fixing recursive suspend calls. Conflicts: sound/pci/hda/hda_codec.c
2012-11-19ALSA: hda - Limit runtime PM support only to known Intel chipsTakashi Iwai1-19/+20
We've got a report that the runtime PM may make the codec the unresponsive on AMD platforms. Since the feature has been tested only on the recent Intel platforms, it's safer to limit the support to such devices for now. This patch adds a new DCAPS bit flag indicating the runtime PM support, and mark it for Intel controllers. Reported-and-tested-by: Julian Wollrath <jwollrath@web.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-19ALSA: hda - Fix Acer Aspire models with analog mics.Dylan Reid1-0/+29
The Acer Aspire AO756 has an analog built-in mic on nid 0x1b and an external mic on nid 0x19. The BIOS doesn't set this up. The mic detect on this Acer Aspire netbook and Acer C7 ChromeBook is only valid when the headphone is plugged. The detect circuit relies on the tip detect switch being closed on the jack. Tell hda_jack to ignore the mic sense unless the headphones are plugged. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-19ALSA: hda - Allow jack state to depend on another jackDylan Reid2-9/+67
Introduce the concept of a "gated" jack. The gated jack's pin sense is only valid when the "gating" jack is plugged. This requires checking the gating jack when the gated jack changes and re-checking the gated jack when the gating jack is plugged/unplugged. This allows handling of devices where the mic jack detect floats when the headphone jack is unplugged. [Rewritten for fixing the possible snd_array reallocation, covering the missing callback calls and jack sync operations, as well as some code cleanups -- tiwai] Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-19ALSA: hda - Fix recursive suspend/resume callTakashi Iwai2-2/+10
When the bus reset is performed during the suspend/resume (including the power-saving too), it calls snd_hda_suspend() and snd_hda_resume() again, and deadlocks eventually. For avoiding the recursive call, add a new flag indicating that the PM is being performed, and don't go to the bus reset mode when it's on. Reported-and-tested-by: Julian Wollrath <jwollrath@web.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-12ALSA: hda - Add a missing quirk entry for iMac 9,1Takashi Iwai1-0/+1
This is another variant of iMac 9,1 with a different codec SSID. Reported-and-tested-by: Everaldo Canuto <everaldo.canuto@gmail.com> Cc: <stable@vger.kernel.org> [v3.3+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-09ALSA: hda - Removed unused non-standard name "C/LFE"David Henningsson1-1/+1
A closer look shows that the name is not even used and can be removed. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-08ALSA: hda - Apply a proper chmap for built-in 2.1 speakersTakashi Iwai7-2/+40
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 Iwai4-11/+39
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-11-08Merge branch 'for-linus' into for-nextTakashi Iwai5-29/+57
2012-11-08ALSA: hda - Add new codec ALC668 and ALC900 (default name ALC1150)Kailang Yang1-0/+2
Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-08ALSA: hda - Improve HP depop when system enter to S3Kailang Yang1-13/+11
alc269_toggle_power_output() was only use in ALC269VB. I rename it to alc269vb_toggle_power_output(). Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-07ALSA: hda - Add pin fixups for ASUS G75Takashi Iwai1-0/+11
To parse properly the subwoofer outputs on ASUS G75 laptop with VT1802 codec, correct the default configurations of speaker pins 0x24 and 0x33. Reported-by: Massimo Del Fedele <max@veneto.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-07ALSA: hda - Fix invalid connections in VT1802 codecTakashi Iwai1-0/+14
VT1802 codec provides the invalid connection lists of NID 0x24 and 0x33 containing the routes to a non-exist widget 0x3e. This confuses the auto-parser. Fix it up in the driver by overriding these connections. Reported-by: Massimo Del Fedele <max@veneto.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-07ALSA: hda - Fix empty DAC filling in patch_via.cTakashi Iwai1-7/+4
In via_auto_fill_adc_nids(), the parser tries to fill dac_nids[] at the point of the current line-out (i). When no valid path is found for this output, this results in dac = 0, thus it creates a hole in dac_nids[]. This confuses is_empty_dac() and trims the detected DAC in later reference. This patch fixes the bug by appending DAC properly to dac_nids[] in via_auto_fill_adc_nids(). Reported-by: Massimo Del Fedele <max@veneto.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-07ALSA: hda - Keep power link on for PantherPoint HDMIDavid Henningsson1-2/+6
On some of the PantherPoint HDMI machines we currently enable, we're seeing trouble with unsol events, i e detecting monitor presence, especially when on battery and after suspend/resume. BugLink: https://bugs.launchpad.net/bugs/1075882 Tested-by: Cyrus Lien <cyrus.lien@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-05ALSA: hda - Force to reset IEC958 status bits for AD codecsTakashi Iwai1-0/+1
Several bug reports suggest that the forcibly resetting IEC958 status bits is required for AD codecs to get the SPDIF output working properly after changing streams. Original fix credit to Javeed Shaikh. BugLink: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/359361 Reported-by: Robin Kreis <r.kreis@uni-bremen.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-05ALSA: HDA: Mark CS260x immutable structures constDaniel J Blueman1-3/+2
Mark structures that won't change const. Signed-off-by: Daniel J Blueman <daniel@quora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-05ALSA: HDA: Fix digital microphone on CS420xDaniel J Blueman1-5/+9
Correctly enable the digital microphones with the right bits in the right coeffecient registers on Cirrus CS4206/7 codecs. It also prevents misconfiguring ADC1/2. This fixes the digital mic on the Macbook Pro 10,1/Retina. Based-on-patch-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Daniel J Blueman <daniel@quora.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-05ALSA: hda: Cirrus: Fix coefficient index for beep configurationAlexander Stein1-1/+1
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-04ALSA: hda - support Teradici 2200 host card audioLars R. Damerow1-0/+2
The audio chipset used in Teradici's Tera2 host cards is the same as that in the 1200 host cards. This patch allows ALSA to recognize the Tera2 cards. Signed-off-by: Lars R. Damerow <lars@pixar.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-11-04ALSA: hda - stop setup_dig_out_stream() causing clicksLaurence Darby1-5/+15
Starting audio or seeking in various music players causes setup_dig_out_stream() to be called, which resets the SPDIF stream, which caused one DAC (but not another) to make a clicking noise every time. This patch ensures the reset only happens when it needs to, which is when the format changes, and makes the code a little more readable. Signed-off-by: Laurence Darby <ldarby@tuffmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-30Merge branch 'for-linus' into for-nextTakashi Iwai3-5/+30
... for migrating the core changes for USB-audio disconnection fixes
2012-10-30ALSA: hda - Add tracepoints to HD-audio controller driverTakashi Iwai3-1/+71
Add a couple of tracepoints to snd-hda-intel for tracing the position and the trigger timings. Signed-off-by: Takashi Iwai <tiwai@suse.de>
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-25ALSA: sound/pci/hda: remove CONFIG_EXPERIMENTALKees Cook1-3/+2
This config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-23ALSA: hda: support for wallclock timestampsPierre-Louis Bossart1-0/+94
Reuse code from clocksource to handle wall clock counter. Since wrapparound occurs, the audio timestamp is reinitialized to zero on a trigger. Synchronized linked devices will start counting from same reference to avoid any drift. Max buffer time is limited to 178 seconds to make sure wall clock counter does not overflow Wallclock timestamps are disabled on capture streams until we figure out how to handle digital inputs. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-22ALSA: hda - remove unused variable in azx_position_ok()Wei Yongjun1-2/+0
The variable stream is initialized but never used otherwise, so remove the unused variable. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-20ALSA: hda - Fix silent headphone output from Toshiba P200Takashi Iwai1-1/+18
By some reason, Toshiba laptop doesn't like the EAPD turned up for the headphone pin. Add a fix up code to force to turn down EAPD for NID 0x15. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=569991 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>