summaryrefslogtreecommitdiffstats
path: root/sound/pci
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda - hdmi: Notify userspace when ELD control changesDavid Henningsson2013-02-191-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>
* ALSA: hda - hdmi: Protect ELD bufferDavid Henningsson2013-02-193-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>
* ALSA: hda - hdmi: Refactor hdmi_eld into parsed_hdmi_eldDavid Henningsson2013-02-193-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>
* ALSA: hda - hdmi: Do not expose eld data when eld is invalidDavid Henningsson2013-02-191-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>
* ALSA: hda - hdmi: ELD shouldn't be valid after unplugDavid Henningsson2013-02-191-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>
* ALSA: hda - Fix the silent speaker output on Fujitsu S7020 laptopTakashi Iwai2013-02-181-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>
* ALSA: hda - add quirks for mute LED on two HP machinesDavid Henningsson2013-02-181-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>
* ALSA: au88x0 - Define channel map for au88x0Raymond Yau2013-02-141-0/+23
| | | | | | | Define channel map for playback, capture devices of au88x0 Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Remove speaker clicks on CX20549David Henningsson2013-02-141-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>
* ALSA: hda - Disable runtime PM for Intel 5 Series/3400Takashi Iwai2013-02-141-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>
* ALSA: hda - Increase badness for missing multi-ioTakashi Iwai2013-02-131-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>
* ALSA: hda - Fix broken workaround for HDMI/SPDIF conflictsTakashi Iwai2013-02-122-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>
* ALSA: hda/ca0132 - Add missing \n to debug printsTakashi Iwai2013-02-121-75/+75
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/ca0132 - Fix type of INVALID_CHIP_ADDRESSTakashi Iwai2013-02-122-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>
* ALSA: hda - update documentation for no-primary-hp fixupFernando Luis Vázquez Cao2013-02-121-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>
* ALSA: hda - Workaround for silent output on Sony Vaio VGC-LN51JGB with ALC889Fernando Luis Vázquez Cao2013-02-121-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>
* ALSA: ali5451: remove irq enabling in pointer callbackDenis Efremov2013-02-111-1/+1
| | | | | | | | | | | | snd_ali_pointer function is called with local interrupts disabled. However it seems very strange to reenable them in such way. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Denis Efremov <yefremov.denis@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: rme32.c irq enabling after spin_lock_irqDenis Efremov2013-02-111-1/+1
| | | | | | | | | | | | | According to the other code in this driver and similar code in rme96 it seems, that spin_lock_irq in snd_rme32_capture_close function should be paired with spin_unlock_irq. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Denis Efremov <yefremov.denis@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda/ca0132 - Slight optimization for build with DSPTakashi Iwai2013-02-111-0/+4
| | | | | | This reduces the resultant binary size. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix memory leak and error handling in CA0132 DSP loaderTakashi Iwai2013-02-102-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>
* ALSA: CA0132: Improve the DSP transfer timeout calculationsIan Minett2013-02-101-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>
* ALSA: hda_intel: Add Device IDs for Intel Wellsburg PCHJames Ralston2013-02-101-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>
* ALSA: hda - Yet another fix for broken HSW HDMI pin connectionsTakashi Iwai2013-02-081-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>
* ALSA: hda - Add fixup for Haswell to enable all pin and convertor widgetsMengdong Lin2013-02-081-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>
* ALSA: hda - Support rereading widgets under the function groupMengdong Lin2013-02-082-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>
* ALSA: hda - Remove limit of widget connectionsTakashi Iwai2013-02-074-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>
* ALSA: hda - Set non-snoop for Creative HD-audio controllersTakashi Iwai2013-02-071-0/+3
| | | | | | ... looks like we need this for stable operations. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: add missing HAS_IOPORT and GENERIC_HARDIRQS dependenciesHeiko Carstens2013-02-071-0/+1
| | | | | | | | | | | | | | Fix these two compile errors on s390 which does not have HAS_IOPORT nor GENERIC_HARDIRQS: sound/pci/lx6464es/lx6464es.c: In function ‘snd_lx6464es_free’: sound/pci/lx6464es/lx6464es.c:565:2: error: implicit declaration of function ‘ioport_unmap’ sound/soc/codecs/wm8903.c: In function ‘wm8903_set_pdata_irq_trigger’: sound/soc/codecs/wm8903.c:1954:9: error: implicit declaration of function ‘irq_get_irq_data’ Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix misc compile warnings in patch_ca0132.cTakashi Iwai2013-02-071-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>
* Merge branch 'topic/hda-ca0132-dsp' into for-nextTakashi Iwai2013-02-075-357/+4582
|\
| * ALSA: hda - Add new Kconfig CONFIG_SND_HDA_CODEC_CA0132_DSPTakashi Iwai2013-02-042-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>
| * ALSA: hda/ca0132 - Make some symbols staticTakashi Iwai2013-01-161-2/+2
| | | | | | | | | | | | | | sound/pci/hda/patch_ca0132.c:387:19: sparse: symbol 'ca0132_voicefx' was not declared. Should it be static? Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Fix a wrong comma in snd_printdd() callTakashi Iwai2013-01-151-1/+1
| | | | | | | | | | | | | | | | sound/pci/hda/patch_ca0132.c: In function ‘ca0132_effects_set’: sound/pci/hda/patch_ca0132.c:3391:2: warning: too many arguments for format [-Wformat-extra-args] Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Declare firmware only when really builtTakashi Iwai2013-01-151-0/+2
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Fix possible invalid DMA channel deallocationTakashi Iwai2013-01-151-3/+3
| | | | | | | | | | | | ... in the error path in dspxfr_image(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Fix possible NULL dereferenceTakashi Iwai2013-01-151-6/+4
| | | | | | | | | | | | | | | | | | | | | | Spotted by smatch, sound/pci/hda/patch_ca0132.c:1950 dspxfr_image() error: potential null dereference 'dma_engine'. (kzalloc returns null) sound/pci/hda/patch_ca0132.c:1950 dspxfr_image() error: we previously assumed 'dma_engine' could be null (see line 1857) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Fix another smatch warningTakashi Iwai2013-01-151-1/+1
| | | | | | | | | | | | | | | | sound/pci/hda/patch_ca0132.c:1781 dspxfr_one_seg() info: why not propagate 'status' from dsp_dma_stop() instead of (-5)? Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Fix superfluous unsigned checkTakashi Iwai2013-01-151-1/+1
| | | | | | | | | | | | | | | | | | Fix a warning by smatch, sound/pci/hda/patch_ca0132.c:714 dspio_send() warn: always true condition '(res >= 0) => (0-u32max >= 0)' Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Use snd_hda_set_pin_ctl() helper againTakashi Iwai2013-01-151-16/+10
| | | | | | | | | | | | | | | | The recent update of ca0132 driver replaced the pinctl setup to the direct write via snd_hda_codec_write() again. This should be covered by snd_hda_set_pin_ctl() to be safer. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * Revert "ALSA: hda - Add firmware caching to CA0132 codec"Takashi Iwai2013-01-151-22/+6
| | | | | | | | | | | | | | | | | | This reverts commit c3b4eea26208b8e247ece9d3a9ec8b2eab48c464. Since the recent firmware loader code supports caching at S3/S4 by itself, we don't have to handle f/w caching in the driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132: Fix potential init errors and update module descriptionIan Minett2013-01-151-6/+8
| | | | | | | | | | | | | | | | | | | | Handle a potential dma_engine alloc error and fix the possible use of an uninitialized status variable in dspxfr_one_seg(). Also correct the initial sampling rate for Mic 1. Update the module description. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132: Shuffle to group together related codeIan Minett2013-01-151-76/+76
| | | | | | | | | | Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132: Code shuffle to group similar functions.Ian Minett2013-01-151-187/+188
| | | | | | | | | | Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132: Add tuning controlsIan Minett2013-01-151-0/+289
| | | | | | | | | | | | | | This patch adds the controls used for tuning the DSP effects. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132: Add unsol handler for DSP and jack detectionIan Minett2013-01-151-0/+142
| | | | | | | | | | | | | | | | This patch adds the unsolicited response handler for incoming DSP responses and jack detection reporting, and routines for reading the incoming DSP response. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132: Add PCM enhancementsIan Minett2013-01-151-13/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove the playback PCM open callback. PCM stream setup and cleanup functions are added for use by PCM callbacks. Delay stream cleanup if effects are on, to allow time for any effects tail to finish. Add the analog capture PCM callbacks. Change the max channels of analog playback to 6. Add two new PCMs: AMic2 and What-U-Hear. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132: Add DSP mixer controls and helpersIan Minett2013-01-151-288/+544
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the kcontrols for the DSP effects, playback and recording source selection. ca0132_is_vnode_effective() checks whether virtual node settings have taken effect. The control change helpers ca0132_pe_switch_set(), ca0132_voicefx_set() and ca0132_cvoice_switch_set() are added to toggle playback / capture DSP effects, ca0132_voicefx_info(), _get() and _put() are added for input path DSP effect value access. The volume helpers are updated to volume_info(), _get() and _set() to use the virtual nodes. The redundant headphone and speaker switches and ct_extension function are removed. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132: Init chip, DSP effects and mixer settingsIan Minett2013-01-151-32/+700
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the framework to set effect parameters: ca0132_effects_set() and ca0132_setup_defaults() are general functions for parameter setting and initializing to default values. dspio_set_param() and dspio_set_uint_param() are lower-level fns to simplify setting individual DSP parameters via an SCP buffer transfer to the firmware. The CA0132 chip parameter init code is added in ca0132_init_params(). In chipio_[write,read]_data(), the current chip address is auto-incremented if no error has occurred. ca0132_select_out() selects the current output. If autodetect is enabled, use headphones (if jack detected) or speakers (if no jack). ca0132_select_mic() selects the current mic in. If autodetect is enabled, use exterior mic (if jack detected) or built-in mic (if no jack). Init digital mic and switch between dmic and amic with ca0132_init_dmic(), ca0132_set_dmic(). amic2 is initialized in ca0132_init_analog_mic2(). Finally, add verb tables for configuring DSP firmware. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132: Add new definitions and structs for DSPIan Minett2013-01-151-3/+442
| | | | | | | | | | | | | | | | | | This patch adds definitions and structs used for configuring DSP effects, virtual nodes, effect tuning controls, and mixer control helpers. The effect structs are also initialized. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Remove superfluous zero-clear memset in patch_ca0132.cTakashi Iwai2012-11-281-1/+0
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>