summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
AgeCommit message (Collapse)AuthorFilesLines
2013-03-15ALSA: hda - Fix missing EAPD/GPIO setup for Cirrus codecsTakashi Iwai1-0/+4
During the transition to the generic parser, the hook to the codec specific automute function was forgotten. This resulted in the silent output on some MacBooks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-15ALSA: hda/ca0132 - Remove extra setting of dsp_state.Dylan Reid1-9/+6
spec->dsp_state is initialized to DSP_DOWNLOAD_INIT, no need to reset and check it in ca0132_download_dsp(). Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-15ALSA: hda/ca0132 - Check download state of DSP.Dylan Reid1-2/+3
Instead of using the dspload_is_loaded() function, check the dsp_state that is kept in the spec. The dspload_is_loaded() function returns true if the DSP transfer was never started. This false-positive leads to multiple second delays when ca0132_setup_efaults() times out on each write. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-15ALSA: hda/ca0132 - Check if dspload_image succeeded.Dylan Reid1-2/+6
If dspload_image() fails, it was ignored and dspload_wait_loaded() was still called. dsp_loaded should never be set to true in this case, skip it. The check in dspload_wait_loaded() return true if the DSP is loaded or if it never started. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-14ALSA: hda - Disable IDT eapd_switch if there are no internal speakersDavid Henningsson1-0/+29
If there are no internal speakers, we should not turn the eapd switch off, because it might be necessary to keep high for Headphone. BugLink: https://bugs.launchpad.net/bugs/1155016 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-12ALSA: hda - Fix snd_hda_get_num_raw_conns() to return a correct valueTakashi Iwai1-10/+14
In the connection list expansion in hda_codec.c and hda_proc.c, the value returned from snd_hda_get_num_raw_conns() is used as the array size to store the connection list. However, the function returns simply a raw value of the AC_PAR_CONNLIST_LEN parameter, and the widget list with ranges isn't considered there. Thus it may return a smaller size than the actual list, which results in -ENOSPC in snd_hda_get_raw_conections(). This patch fixes the bug by parsing the connection list correctly also for snd_hda_get_num_raw_conns(). Reported-and-tested-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-07ALSA: hda - Add support of new codec ALC233Kailang Yang1-0/+2
It's compatible with ALC282. Signed-off-by: Kailang Yang <kailang@realtek.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-07ALSA: hda/ca0132 - Avoid division by zero in dspxfr_one_seg()Xi Wang1-2/+6
Move the zero check `hda_frame_size_words == 0' before the modulus `buffer_size_words % hda_frame_size_words'. Also remove the redundant null check `buffer_addx == NULL'. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-07ALSA: hda - check NULL pointer when creating SPDIF PCM switchMengdong Lin1-2/+7
If the new control cannot be created, this function will return to avoid snd_hda_ctl_add dereferencing a NULL control pointer. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-03-07ALSA: hda - check NULL pointer when creating SPDIF controlsMengdong Lin1-0/+2
If the SPDIF control array cannot be reallocated, the function will return to avoid dereferencing a NULL pointer. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-25ALSA: hda - Enable beep for ASUS EeeBox EBP1501PTakashi Iwai1-0/+1
Reported-by: Harald Becker <ralda@gmx.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-22ALSA: hda - hdmi: Make jacks phantom, if they're not detectableDavid Henningsson1-0/+3
Just as for analog codecs, a jack that isn't suitable for detection (in this case, NO_PRESENCE was set) should be a phantom Jack instead of a normal one. Thanks to Raymond Yau for spotting. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/961286 BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=903869 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-19ALSA: hda - hdmi: Notify userspace when ELD control changesDavid Henningsson1-2/+12
ELD validity can change during the lifetime of a presence detect, so we need to be able to listen for changes on the ELD control. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-19ALSA: hda - hdmi: Protect ELD bufferDavid Henningsson3-13/+47
Because the eld buffer can be simultaneously accessed from both workqueue context (updating) and process context (kcontrol read), we need to protect it with a mutex to guarantee consistency. To avoid holding the mutex while reading the ELD info from the codec, we introduce a temporary eld buffer. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-19ALSA: hda - hdmi: Refactor hdmi_eld into parsed_hdmi_eldDavid Henningsson3-44/+57
For better readability, the information that is parsed out of the ELD data is now put into a separate parsed_hdmi_eld struct. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-19ALSA: hda - hdmi: Do not expose eld data when eld is invalidDavid Henningsson1-7/+18
Previously, it was possible to read the eld data of the previous monitor connected. This should not be allowed. Also refactor the function slightly. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-19ALSA: hda - hdmi: ELD shouldn't be valid after unplugDavid Henningsson1-0/+1
Currently, eld_valid is never set to false, except at kernel module load time. This patch makes sure that eld is no longer valid when the cable is (hot-)unplugged. Cc: stable@kernel.org Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-18ALSA: hda - Fix the silent speaker output on Fujitsu S7020 laptopTakashi Iwai1-1/+7
In the recent update, Fujitsu S7020 laptop with ALC260 codec lost the speaker output, no matter how the amps and the pins are set. After a long debugging session, we found out that the default codec init code is harmful for this machine, and we have to reset it to ALC_INIT_NONE. Reported-and-tested-by: Jonathan Woithe <jwoithe@just42.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-18ALSA: hda - add quirks for mute LED on two HP machinesDavid Henningsson1-0/+19
These two machines have no mute LED string in BIOS. BugLink: https://bugs.launchpad.net/bugs/1128934 Tested-by: Tammy Yang <tammy.yang@canonical.com> Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-14ALSA: hda - Remove speaker clicks on CX20549David Henningsson1-0/+1
This chip needs the speaker pin to go to D3 to avoid clicks, so default_power_filter does not work here. This was found on Thinkpad R61i/T61i but I guess it applies to the entire chip. If not, quirks should be set for at least PCI SSID 17aa:20ac. Thanks to c4pp4 for testing. BugLink: https://bugs.launchpad.net/bugs/886975 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-14ALSA: hda - Disable runtime PM for Intel 5 Series/3400Takashi Iwai1-1/+1
We've got a regression report wrt the IRQ issue related with the power-save on a Dell machine, and disabling runtime PM works around. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=53441 Cc: <stable@vger.kernel.org> [v3.7+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-13ALSA: hda - Increase badness for missing multi-ioTakashi Iwai1-1/+1
The current badness value used for the missing multi-io seems too weak, and the multi-io tends to be skipped for desktop configurations when no enough DACs are available. It's because the total badness of the multi-io becomes often larger than the badness with assigning an individual DAC to a headphone jack. This is good for one side, but it seems that the surround outputs are more demanded by that. This patch increases the badness value for the missing multi-io slightly so that the multi-io would be preferred than the individual headphone DAC if they conflict. Through the tests with hda-emu, mostly only desktop configurations with ALC662/663 and CMI codecs are affected by this change, and all look reasonable. Reported-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-12ALSA: hda - Fix broken workaround for HDMI/SPDIF conflictsTakashi Iwai2-23/+23
The commit [dcda58061: ALSA: hda - Add workaround for conflicting IEC958 controls] introduced a workaround for cards that have both SPDIF and HDMI devices for giving device=1 to SPDIF control elements. It turned out, however, that this workaround doesn't work well - - The workaround checks only conflicts in a single codec, but SPDIF and HDMI are provided by multiple codecs in many cases, and - ALSA mixer abstraction doesn't care about the device number in ctl elements, thus you'll get errors from amixer such as % amixer scontrols -c 0 ALSA lib simple_none.c:1551:(simple_add1) helem (MIXER,'IEC958 Playback Switch',0,1,0) appears twice or more amixer: Mixer hw:0 load error: Invalid argument This patch fixes the previous broken workaround. Instead of changing the device number of SPDIF ctl elements, shift the element indices of such controls up to 16. Also, the conflict check is performed over all codecs found on the bus. HDMI devices will be put to dev=0,index=0 as before. Only the conflicting SPDIF device is moved to a different place. The new place of SPDIF device is supposed by the updated alsa-lib HDA-Intel.conf, respectively. Reported-by: Stephan Raue <stephan@openelec.tv> Reported-by: Anssi Hannula <anssi.hannula@iki.fi> Cc: <stable@vger.kernel.org> [v3.8] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-12ALSA: hda/ca0132 - Add missing \n to debug printsTakashi Iwai1-75/+75
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-12ALSA: hda/ca0132 - Fix type of INVALID_CHIP_ADDRESSTakashi Iwai2-3/+3
The chip address is 32bit long but INVALID_CHIP_ADDRESS is defined as an unsigned long. This makes dsp_chip_to_dsp_addx() misbehaving on 64bit architectures. Fix the INVALID_CHIP_ADDRESS definition to be 32bit. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-12ALSA: hda - update documentation for no-primary-hp fixupFernando Luis Vázquez Cao1-1/+2
The problem addressed by this fixup is not specific to Vaio Z, affecting some Vaio all-in-one desktop PCs too. Update the code comments accordingly. Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-12ALSA: hda - Workaround for silent output on Sony Vaio VGC-LN51JGB with ALC889Fernando Luis Vázquez Cao1-0/+1
Some Vaio all-in-one desktop PCs (for example VGC-LN51JGB) are affected by the same issue that caused Vaio Z laptops to become silent: the speaker pin must be connected to the first DAC even though the codec itself advertises flexible routing through any of the DACs. Use the no-primary-hp fixup for choosing the speaker pin as the primary so that the right DAC is assigned on this device. Cc: stable@vger.kernel.org Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-11ALSA: hda/ca0132 - Slight optimization for build with DSPTakashi Iwai1-0/+4
This reduces the resultant binary size. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-10ALSA: hda - Fix memory leak and error handling in CA0132 DSP loaderTakashi Iwai2-4/+17
This patch fixes a few obvious bugs in DSP loader stuff: - Fix possible memory leaks in the error path - Avoid double-free calls in dma_reset() - Properly set/unset WC bits for DMA buffers - Add missing error status checks Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-10ALSA: CA0132: Improve the DSP transfer timeout calculationsIan Minett1-16/+25
Base the DSP firmware transfer and communication timeouts on jiffy values. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-10ALSA: hda_intel: Add Device IDs for Intel Wellsburg PCHJames Ralston1-0/+5
This patch adds the HD Audio Device IDs for the Intel Wellsburg PCH Signed-off-by: James Ralston <james.d.ralston@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-08ALSA: hda - Yet another fix for broken HSW HDMI pin connectionsTakashi Iwai1-19/+37
A Haswell test machine showed that the invalid connection list, but this time it has only a single pin on the codec, thus the former fixup code doesn't work as it assumes the three pins blindly. This patch splits the former fixup code to two parts: - Enable eDP 1.2 for Haswell codec - Fix the connection list of pins on Haswell codec; the converter list is recorded dynamically in hdmi_add_cvt(), and applied in hdmi_add_pin() Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-08ALSA: hda - Add fixup for Haswell to enable all pin and convertor widgetsMengdong Lin1-0/+54
Some Haswell machines support more than one display outputs (HDMI or DP), but its BIOS may not enable the codec's 2nd and 3rd pin and output cvt widgets. This patch implements a board-specific fixup for Intel Haswell Machines: If the hidden pins are not enabled by BIOS, the driver will enable them and call common code to update the codec tree. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-08ALSA: hda - Support rereading widgets under the function groupMengdong Lin2-0/+25
A codec may allow software to hide some unused pin/cvt widgets. Sometimes BIOS does not enable the hidden widgets properly although they are needed for the board. Thus the driver need to enable them as a board-specific fixup and the whole tree will change. This patch implements a common code for rereading codec widgets. So the fixup code can call it after enabling the hidden widgets. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07ALSA: hda - Remove limit of widget connectionsTakashi Iwai4-28/+61
Currently we set the max number of connections to be 32, but there seems codec that gives longer connection lists like AD1988, and we see errors in proc output and else. (Though, in the case of AD1988, it's a list of all codecs connected to a single vendor widget, so this must be something fishy, but it's still valid from the h/w design POV.) This patch tries to remove this restriction. For efficiency, we still use the fixed size array in the parser, but takes a dynamic array when the size is reported to be greater than that. Now the fixed array size is found only in patch_hdmi.c, but it should be fine, as the codec itself can't support so many pins. Reported-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07ALSA: hda - Set non-snoop for Creative HD-audio controllersTakashi Iwai1-0/+3
... looks like we need this for stable operations. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07ALSA: hda - Fix misc compile warnings in patch_ca0132.cTakashi Iwai1-8/+6
sound/pci/hda/patch_ca0132.c: In function ‘ca0132_is_vnode_effective’: sound/pci/hda/patch_ca0132.c:3331:15: warning: ‘nid’ may be used uninitialized in this function [-Wmaybe-uninitialized] sound/pci/hda/patch_ca0132.c:4345:13: warning: ‘ca0132_download_dsp’ defined but not used [-Wunused-function] Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07Merge branch 'topic/hda-ca0132-dsp' into for-nextTakashi Iwai5-357/+4582
2013-02-07ALSA: hda - Use generic array for loopback list managementTakashi Iwai3-12/+17
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-07ALSA: hda - Enable loopback accounts for CONFIG_PM=n, tooTakashi Iwai2-6/+1
The loopback list is referred by the VIA codec driver no matter whether CONFIG_PM is set or not, thus we need to enable it always. Otherwise it gets compile errors. Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-06ALSA: hda - Apply mic-mute LED fixup for new HP laptopsTakashi Iwai1-0/+2
It's mostly harmless to apply it for new models even if they have no mic mute LED (just toggling an unused GPIO pin). Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-05Merge branch 'for-linus' into for-nextTakashi Iwai3-23/+38
Merge pending fixes that haven't pulled into 3.8.
2013-02-05ALSA: hda - detect jacks on VT1708 even when no streams are activeDavid Henningsson1-2/+1
These days, GUIs such as Gnome sound settings want to be able to show the correct jack status even when no streams are currently running. I doubt this gives any measurable difference in power, but if it does, the "Jack Detect" control can still be used to turn polling off. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-05ALSA: hda - Fix phantom jacks on VT1708David Henningsson1-0/+13
The VT1708 has no unsol event capability, and polling is set using the "Jack Detect" alsamixer control. In order not to create phantom Jack controls, temporary enable jackpoll during build_controls. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-04ALSA: hda - Add new Kconfig CONFIG_SND_HDA_CODEC_CA0132_DSPTakashi Iwai2-10/+16
... to be less confusing for the update path. This new kconfig will choose CONFIG_SND_HDA_DSP_LOADER, which is basically a device-independent feature in hda_intel.c. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-04ALSA: hda - Fix default multichannel HDMI mapping regressionAnssi Hannula1-4/+7
Commit d45e6889ee69456a4d5b1bbb32252f460cd48fa9 ("ALSA: hda - Provide the proper channel mapping for generic HDMI driver") added support for custom channel maps in the HDA HDMI driver. Due to a mistake in an 'if' condition the custom map is always used even when no such map has been set. This causes incorrect channel mapping for multichannel audio by default. Pass per_pin->chmap_set to hdmi_setup_channel_mapping() as a parameter so that it can use it for detecting if a custom map has been set instead of checking if map is NULL (which is never the case). Reported-by: Staffan Lindberg <pike@xbmc.org> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-01ALSA: hda - Release assigned pin/cvt at error path of hdmi_pcm_open()Takashi Iwai1-1/+5
If the driver detects and invalid ELD, it gives an open error. But it forgot to release the assigned pin, converter and spdif ctls before returning. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-01ALSA - HDA: New PCI ID for Haswell ULTWang Xingchao1-0/+2
Add new PCI ID 0x0a0c for Haswell ULT platform. Signed-off-by: Wang Xingchao <xingchao.wang@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-02-01ALSA: hda - add support for IDT 92HD95 HDA codecVitaliy Kulikov1-0/+39
Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-01-29ALSA: hda - Fix non-snoop page handlingTakashi Iwai1-14/+26
For non-snoop mode, we fiddle with the page attributes of CORB/RIRB and the position buffer, but also the ring buffers. The problem is that the current code blindly assumes that the buffer is contiguous. However, the ring buffers may be SG-buffers, thus a wrong vmapped address is passed there, leading to Oops. This patch fixes the handling for SG-buffers. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=800701 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>