summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
Commit message (Collapse)AuthorAgeFilesLines
* sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where neededPaul Gortmaker2011-10-313-0/+3
| | | | | | | | These aren't modules, but they do make use of these macros, so they will need export.h to get that definition. Previously, they got it via the implicit module.h inclusion. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* sound: Add module.h to the previously silent sound usersPaul Gortmaker2011-10-3111-0/+11
| | | | | | | | Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* sound: fix drivers needing module.h not moduleparam.hPaul Gortmaker2011-10-311-1/+1
| | | | | | | | | The implicit presence of module.h lured several users into incorrectly thinking that they only needed/used modparam.h but once we clean up the module.h presence, these will show up as build failures, so fix 'em now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* ALSA: hda - Fix ADC input-amp handling for Cx20549 codecTakashi Iwai2011-10-271-2/+27
| | | | | | | | | | | | | | | | | | | | It seems that Conexant CX20549 chip handle only a single input-amp even though the audio-input widget has multiple sources. This has been never clear, and I implemented in the current way based on the debug information I got at the early time -- the device reacts individual input-amp values for different sources. This is true for another Conexant codec, but it's not applied to CX20549 actually. This patch changes the auto-parser code to handle a single input-amp per audio-in widget for CX20549. After applying this, you'll see only a single "Capture" volume control instead of separate "Mic" or "Line" captures when the device is set up to use a single ADC. We haven't tested 20551 and 20561 codecs yet. If these show the similar behavior like 20549, they need to set spec->single_adc_amp=1, too. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Keep EAPD turned on for old Conexant chipsTakashi Iwai2011-10-271-21/+22
| | | | | | | | | | | | | In the old Conexant chips (5045, 5047, 5051 and 5066), a single EAPD may handle both headphone and speaker outputs while it's assigned only to one of them. Turning off dynamically leads to the unexpected silent output in such a configuration with the auto-mute function. Since it's difficult to know how the EAPD is handled in the actual h/w implementation, better to keep EAPD on while running for such codecs. Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Fix missing volume controls with ALC260Takashi Iwai2011-10-272-6/+39
| | | | | | | | | | | | | | | ALC260 has multiple mixer widgets connected to the shared DAC, but the driver currently doesn't check this possibility and ignores when the DAC is shared with others. This resulted in the silent output from some routes because of lack of the amp setup. This patch adds the workaround for it by checking the route even with the shared DAC, but also checking the conflict with the existing control for the very same widget NID. Reference: https://bugzilla.novell.com/show_bug.cgi?id=726812 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix pin-config for ASUS W90VTakashi Iwai2011-10-261-0/+9
| | | | | | | | | The association numbers of surround/CLFE speaker pins aren't correctly mapped by the auto-parser. This patch fixes the CLFE speaker pin to the right assoc value (from 3 to 1). Tested-by: Nika Topolchanskaya <nanodesuu@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix surround/CLFE headphone and speaker pins orderTakashi Iwai2011-10-261-15/+24
| | | | | | | | | | | When 5.1 or more headphone or speaker pins are provided, the parser still takes as is without fixing the order of channel mapping, which leads in the unexpected strange channel order by surround outputs. This patch fixes the issue by applying the same fix-up not only to line_out_pins[] but also hp_pins[] and speaker_pins[]. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: HDA: Add new revision for ALC662David Henningsson2011-10-241-0/+2
| | | | | | | | | | | | The revision 0x100300 was found for ALC662. It seems to work well with patch_alc662. Cc: stable@kernel.org BugLink: http://bugs.launchpad.net/bugs/877373 Tested-by: Shengyao Xue <Shengyao.xue@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Acked-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/realtek - Fix DAC assignments of multiple speakersTakashi Iwai2011-10-211-2/+8
| | | | | | | | | | | | When a device has multiple speakers and still has the auto-mute support, the driver copies line_outs[] to speaker_outs[]. And then it tries to assign DACs for both. This ended up with the assignment only to the primary DAC to all speakers. This patch fixes the situation by checking the duplicated LO/SPK case appropriately. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-10-192-0/+2
|\
| * ALSA: HDA: conexant support for Lenovo T520/W520Daniel Suchy2011-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is patch for Conexant codec of Intel HDA driver, adding new quirk for Lenovo Thinkpad T520 and W520. Conexant autodetection works fine for T520 (similar subsystem ID is used also in W520 model) and detects more mixer features compared to generic (fallback) Lenovo quirk with hardcoded options in Conexant codec. Patch was activelly tested with Linux 3.0.4, 3.0.6 and 3.0.7 without any problems. Signed-off-by: Daniel Suchy <danny@danysek.cz> Cc: <stable@kernel.org> [3.0+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Add position_fix quirk for Dell Inspiron 1010Takashi Iwai2011-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | The previous fix for the position-buffer check gives yet another regression on a Dell laptop. The safest fix right now is to add a static quirk for this device (and better to apply it for stable kernels too). Reported-by: Éric Piel <Eric.Piel@tremplin-utc.net> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Cache COEF 0 valueTakashi Iwai2011-10-171-20/+28
| | | | | | | | | | | | | | | | The COEF #0 value represents a sort of device id, so it's supposedly constant while operation. Better to use the cached value instead of reading it at each time from the performance POV. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Clean up codec renamesTakashi Iwai2011-10-171-150/+139
| | | | | | | | | | | | | | Use a static table for detecting the codec renames. Also clean up the error paths in each patch_*() function. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Use alc_codec_rename()Takashi Iwai2011-10-171-8/+9
| | | | | | | | | | | | Replaced with alc_codec_rename() in all possible places. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - ALC888S-VC remark to ALC886Kailang Yang2011-10-171-1/+17
| | | | | | | | | | Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Check the error from alc_codec_rename()Takashi Iwai2011-10-171-14/+22
| | | | | | | | | | | | Should be a rare case, but... Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: HDA: Fixup Realtek headphone pin initializationDavid Henningsson2011-10-131-1/+1
| | | | | | | | | | | | | | | | | | This typo caused headphone pins not to be initialized correctly. BugLink: https://bugs.launchpad.net/bugs/871582 Reported-by: Effenberg Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Remove bad code for IDT 92HD83 family patchCharles Chin2011-10-131-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this patch is to remove a section of "bad" code that assigns the last DAC to ports E or F in order to support notebooks with docking in earlier days, around ALSA 1.0.19 - 21. This is not necessary now and actually breaks some configurations that use these ports as other devices. This have been tested on several different configurations to make sure that it is working for different combinations. Signed-off-by: Charles Chin <Charles.Chin@idt.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Distinguish each substream for better sticky assignmentTakashi Iwai2011-10-061-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit ef18beded8ddbaafdf4914bab209f77e60ae3a18 introduced a mechanism to assign the previously used slot for the next reopen of a PCM stream. But the PCM device number isn't always unique (it may have multiple substreams), and also the code doesn't check the stream direction, thus both playback and capture streams share the same device number. For avoiding this conflict, make a unique key for each substream and store/check this value at reopening. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-10-061-4/+5
|\ \ | |/
| * ALSA: hda - Fix a regression of the position-buffer checkTakashi Iwai2011-09-301-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit a810364a0424c297242c6c66071a42f7675a5568 ALSA: hda - Handle -1 as invalid position, too caused a regression on some machines that require the position-buffer instead of LPIB, e.g. resulting in noises with mic recording with PulseAudio. This patch fixes the detection by delaying the test at the timing as same as 3.0, i.e. doing the position check only when requested in azx_position_ok(). Reported-and-tested-by: Rocko Requin <rockorequin@hotmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/realtek - Choose more cleverly the primary outputsTakashi Iwai2011-10-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | When the speaker outputs are more than the headphone outputs, it implies that the system has surround speakers while the headphones are only for monitoring the front. In such a case, it's better to put speakers as the primary outputs so that the driver can build up and keep the surround setup. Otherwise the system will pick up the headphone as primary, and offers less channels than the speakers do support. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Moved snd_print_pcm_rates() back into hda_proc.cTakashi Iwai2011-10-064-30/+11
| | | | | | | | | | | | | | Since hda_proc.c is now the only user of snd_print_pcm_rates(), better to put it back locally to hda_proc.c and revert to the old style. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hdmi: fix printout of SAD sampling ratesPierre-Louis Bossart2011-10-062-3/+23
| | | | | | | | | | | | | | | | | | | | SAD sampling rate information reported in /proc/asound/cardX/eldX is incorrect due to a mismatch between HDA and HDMI frequencies. Add new routine to provide relevant values. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: jack - Add "Line In" input jack constantsDavid Henningsson2011-10-051-0/+2
| | | | | | | | | | | | | | | | | | Similar to Line Out, these constants form the base for future patches enabling input jack reporting for Line in jacks. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: HDA: Fix DAC assignment for secondary headphone on Sigmatel/IDTDavid Henningsson2011-10-051-3/+15
| | | | | | | | | | | | | | | | | | | | If we run out of DACs when trying to assign a DAC to a secondary headphone, prefer the DAC of the first headphone to the primary (usually line out) DAC. BugLink: http://bugs.launchpad.net/bugs/845275 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: HDA: Fix naming of input jacks for IDT parserDavid Henningsson2011-10-031-11/+3
| | | | | | | | | | | | | | | | | | The Sigmatel/IDT parser should have the same naming convention for input jacks as the other codecs have. BugLink: http://bugs.launchpad.net/bugs/859704 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda/hdmi: expose ELD controlPierre-Louis Bossart2011-10-033-5/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications may want to read ELD information to understand what codecs are supported on the HDMI receiver and handle the a-v delay for better lip-sync. ELD information is exposed in a device-specific IFACE_PCM kcontrol. Tested both with amixer and PulseAudio; with a corresponding patch passthrough modes are enabled automagically. ELD control size is set to zero in case of errors or wrong configurations. No notifications are implemented for now, it is expected that jack detection is used to reconfigure the audio outputs. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Allow patching with any vendor/subsystem idsTakashi Iwai2011-09-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | In the ugly real world, there area really broken devices that don't set codec SSID correctly. In such a case, the ID can be random, thus the patching won't work reliably. For applying the patch forcibly to such a device, the driver will skip the vendor and/or subsystem ID checks when zero or a negative number is given in [codec] section. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add snoop optionTakashi Iwai2011-09-281-19/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new option "snoop" for the traffic control of the HD-audio controller chip. When set to 0, the non-snooping mode is used with the traffic control bit is set in each stream control register. This may allow better operations in the low power mode, but the actual implementation is depending pretty much on the chipset. As already implemented, more or less each chipset has own snoop-control register bit. Now this setup refers to the snoop option, too. Also, a new VIA chipset may require the non-snooping mode when set so in BIOS. In such a case, the option value is overridden. As default, it's still set to snoop=1 for keeping the same behavior as before. In near future, it'll be set to 0 as default after checking it works in every system well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda:via - Skip creations of empty PCM streamsTakashi Iwai2011-09-281-28/+40
| | | | | | | | | | | | If no analog I/O is defined, skip creating the corresponding PCM stream. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Avoid unnecessary verbs to clear PCM formatsTakashi Iwai2011-09-271-2/+5
| | | | | | | | | | | | | | | | | | | | Since really_cleanup_stream() is called from both purity_inactive_streams() and hda_cleanup_all_streams(), the verbs to clear the PCM channel and format may be called multiple times unnecessarily. This patch adds checks to skip these unneeded verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-09-262-1/+8
|\ \ | |/
| * ALSA: hda/realtek - Don't detect LO jack when identical with HPTakashi Iwai2011-09-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The spec->autocfg.line_out_pins[] may contain the same pins as hp_pins[] depending on the configuration. When they are identical, detecting the line_jack_present flag screws up the auto-mute because alc_line_automute() is called unconditionally at initialization while it won't be triggered by unsol events, thus the old line_jack_present flag is kept for the whole run. For fixing this buggy behavior, the driver needs to check whether the line-outs are really individual, and skip if same as headphone jacks. Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104 Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Avoid bogus HP-pin assignmentTakashi Iwai2011-09-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | When the headphone pin is assigned as primary output to line_out_pins[], the automatic HP-pin assignment by ASSID must be suppressed. Otherwise a wrong pin might be assigned to the headphone and breaks the auto-mute. Reference: https://bugzilla.novell.com/show_bug.cgi?id=716104 Signed-off-by: Takashi Iwai <tiwai@suse.de> Cc: <stable@kernel.org>
| * ALSA: HDA: No power nids on 92HD93David Henningsson2011-09-241-0/+1
| | | | | | | | | | | | | | | | | | | | This patch is necessary to make internal speakers work on this chip. Cc: stable@kernel.org BugLink: http://bugs.launchpad.net/bugs/854468 Tested-by: Alex Wolfson <alex.wolfson@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: HDA - Add Independent Headphone for all models of ad1988/ad1989Raymond Yau2011-09-231-19/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add "AD198x Headphone" playback device for independent headphone playback while playing 7.1 surround using rear panel audio jacks. - Remove "6stack-dig-fp" model since "Headphone Playback Volume" control using DAC0 instead of DAC1 (HDA_FRONT) was already added to all models. - Add "Independent HP" switch to enable/disable this playback device. When the switch is OFF, headphone use "copy front" mode to get the front channel as the green jack. When the switch is ON, you can play stereo sound through "AD198x Headphone" device to headphone while playing 7.1 surround sound through "AD198x Analog" device. The switch cannot be changed when either "AD198x Headphone" or "AD198X Analog" is open. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda: hdmi: Hint matching between input devices and pcm devicesDavid Henningsson2011-09-211-7/+24
| | | | | | | | | | | | | | | | | | | | | | Since modern HDMI cards often have more than one output pin and thus input device, we need to know which one has actually been plugged in. This patch adds a name hint that indicates which PCM device is connected to which pin. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: HDA: Refactor Realtek's automuteDavid Henningsson2011-09-205-148/+131
| | | | | | | | | | | | | | Increase readability and understandability in the automute code. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'fix/hda' into topic/hdaTakashi Iwai2011-09-205-25/+39
|\ \ | |/
| * ALSA: HDA: Add support for IDT 92HD93David Henningsson2011-09-201-0/+1
| | | | | | | | | | | | | | Cc: stable@kernel.org BugLink: http://bugs.launchpad.net/bugs/854468 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/realtek - Fix auto-mute with HP+LO configurationTakashi Iwai2011-09-191-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the system has only the headphone and the line-out jacks without speakers, the current auto-mute code doesn't work. It's because the spec->automute_lines flag is wrongly referred in update_speakers(). This flag must be meaningless when spec->automute_hp_lo isn't set, thus they should be always coupled. The patch fixes the problem and add a comment to indicate the relationship briefly. BugLink: http://bugs.launchpad.net/bugs/851697 Reported-by: David Henningsson <david.henningsson@canonical.com> Tested-By: Jayne Han <jayne.han@canonical.com> Cc: stable@kernel.org (3.0) Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: HDA: Cirrus - fix "Surround Speaker" volume control nameDavid Henningsson2011-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | This patch fixes "Surround Speaker Playback Volume" being cut off. (Commit b4dabfc452a10 was probably meant to fix this, but it fixed only the "Switch" name, not the "Volume" name.) Signed-off-by: David Henningsson <david.henningsson@canonical.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Terminate the recursive connection search properlyTakashi Iwai2011-09-131-1/+5
| | | | | | | | | | | | | | | | | | The recursive search of widget connections in snd_hda_get_conn_index() must be terminated at the pin and the audio-out widgets. Otherwise you'll get "too deep connection" warnings unnecessarily. Reported-by: Francis Moreau <francis.moro@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda: Conexant: Allow different output types to share DACDavid Henningsson2011-08-251-19/+27
| | | | | | | | | | | | | | | | | | | | | | | | Headphones has stopped working for the original reported (a regression compared to 2.6.38). This is because Speaker and Headphones share the same DAC, in which case no Headphones volume control was created. This patch fixes so that both Speaker and Headphones volume controls are created in such scenario. BugLink: http://bugs.launchpad.net/bugs/817943 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Add Headphone Playback Volume control for ad1988/ad1989Raymond Yau2011-09-121-17/+13
| | | | | | | | | | | | | | | | - use DAC0 instead of DAC1 for Port-A Headphone - assign 0x03 to spec->multiout.hp_nid except model="6stack-dig-fp" Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Remove the rest of ALC662 quirksTakashi Iwai2011-08-242-367/+10
| | | | | | | | | | | | | | The rest of ALC662 quirks are only for desktops, and they should work with the auto-parser. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Remove ALC662 ASUS eeepc-ep20 model quirkTakashi Iwai2011-08-241-49/+0
| | | | | | | | | | | | | | Since the recent fixes, this device works with the auto-parser well. Let's kill it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud