aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
Commit message (Collapse)AuthorAge
...
* Merge branch 'topic/hda-ca0132-dsp' into for-nextTakashi Iwai2013-02-07
|\
| * ALSA: hda - Add new Kconfig CONFIG_SND_HDA_CODEC_CA0132_DSPTakashi Iwai2013-02-04
| | | | | | | | | | | | | | | | | | ... 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-16
| | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | 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-15
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Fix possible invalid DMA channel deallocationTakashi Iwai2013-01-15
| | | | | | | | | | | | ... in the error path in dspxfr_image(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda/ca0132 - Fix possible NULL dereferenceTakashi Iwai2013-01-15
| | | | | | | | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | 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-15
| | | | | | | | | | 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-15
| | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-15
| | | | | | | | | | | | | | | | | | 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-28
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Fix NULL dereference in error path of patch_ca0132.cTakashi Iwai2012-11-28
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Remove unnecessary struct hda_stream_format from CA0132Ian Minett2012-11-28
| | | | | | | | | | Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Update chipio functions and DSP write wait timeoutIan Minett2012-11-28
| | | | | | | | | | | | | | | | Tidy up and condense chipio_write_address|addx() functions. Improve dspio_write_wait() to use jiffies for timeout calc. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Change return value for load_dsp_prepare() to -ENOSYSIan Minett2012-11-28
| | | | | | | | | | Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Add comments and descriptions to CA0132 functionsIan Minett2012-11-28
| | | | | | | | | | | | | | | | | | Add comments and descriptions to functions. Bump dsp_free_ports() to below dsp_allocate_ports_format() to group the alloc functions together for commenting. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Add firmware caching to CA0132 codecIan Minett2012-11-28
| | | | | | | | | | Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Update CA0132 codec to load DSP firmware binaryIan Minett2012-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the code needed to fetch the DSP binary image from the local firmware install location and transfer it over to the chip using the new DSP loader bus ops. Actual DSP effect controls, parameters and mixers are to be included later. - Add calls to new DSP loader system to transfer firmware to the hardware. - Add chip read/write routines, DSP I/O, SCP packet format helper functions and transfer DMA management. - Add guard around DSP download to ensure loader config switch is enabled. The general scheme for downloading the DSP is as follows: 1) If DSP firmware loader is enabled, ca0132_download_dsp() is called to start the process. 2) Driver requests DSP image using request_firmware(). 3) Driver sets up the streaming DMA for DSP image download with dspload_image() and dspxfr_image(), which in turn calls the DSP loader op snd_hda_codec_load_dsp_prepare() to ready the system. 4) DSP image will consist of 1 or more segments, each transferred in sequence by a call to dspxfr_one_seg() and snd_hda_codec_load_dsp_trigger(). 5) Once complete, the loader state is cleaned up with snd_hda_codec_load_dsp_cleanup(). Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Add DSP firmware enums and defs to CA0132 codecIan Minett2012-11-28
| | | | | | | | | | Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Add CA0132 register definitions fileIan Minett2012-11-28
| | | | | | | | | | Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Add new DSP loader callback routinesTakashi Iwai2012-11-28
| | | | | | | | | | | | | | | | | | Pass DMA buffer pointers in calls to setup_bdle(). Add DSP loader callback routines to controller. Add new DSP loader switch to Kconfig to turn off DSP firmware. Signed-off-by: Ian Minett <ian_minett@creativelabs.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Use generic array for loopback list managementTakashi Iwai2013-02-07
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Enable loopback accounts for CONFIG_PM=n, tooTakashi Iwai2013-02-07
| | | | | | | | | | | | | | | | | | 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>
* | ALSA: ice1712: fix boundary check in snd_wm8766_write()Dan Carpenter2013-02-07
| | | | | | | | | | | | | | | | The wm->regs[] array has WM8766_REG_COUNT (16) elements not WM8766_REG_RESET (31). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Apply mic-mute LED fixup for new HP laptopsTakashi Iwai2013-02-06
| | | | | | | | | | | | | | 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>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2013-02-05
|\ \ | | | | | | | | | Merge pending fixes that haven't pulled into 3.8.
| * | ALSA: hda - Fix default multichannel HDMI mapping regressionAnssi Hannula2013-02-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Fix non-snoop page handlingTakashi Iwai2013-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | ALSA: hda - Enable LPIB delay count for Poulsbo / OaktrailTakashi Iwai2013-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we use LPIB forcibly for both playback and capture for Poulsbo and Oaktrail devices, and this seems rather problematic. The recent fix for LPIB delay count seems working well with these devices, so let's enable it instead. Reported-by: Martin Weishart <martin.weishart@telosalliance.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - fix inverted internal mic on Acer AOA150/ZG5David Henningsson2013-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables internal mic input on the machine. Cc: stable@vger.kernel.org BugLink: https://bugs.launchpad.net/bugs/1107477 Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - detect jacks on VT1708 even when no streams are activeDavid Henningsson2013-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Fix phantom jacks on VT1708David Henningsson2013-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - Release assigned pin/cvt at error path of hdmi_pcm_open()Takashi Iwai2013-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA - HDA: New PCI ID for Haswell ULTWang Xingchao2013-02-01
| | | | | | | | | | | | | | | | | | | | | 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>
* | | ALSA: hda - add support for IDT 92HD95 HDA codecVitaliy Kulikov2013-02-01
| | | | | | | | | | | | | | | Signed-off-by: Vitaliy Kulikov <Vitaliy.Kulikov@idt.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Fix powermap for external mics on IDT codecsDavid Henningsson2013-01-28
| | | | | | | | | | | | | | | | | | | | | | | | This patch fixes a regression of the external mic not working on HP Probook 4520s. Signed-off-by: David Henningsson <david.henningsson@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: Make snd_printd() and snd_printdd() inlineTakashi Iwai2013-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because currently snd_printd() and snd_printdd() macros are expanded to empty when CONFIG_SND_DEBUG=n, a compile warning like below appears sometimes, and we had to covert it by ugly ifdefs: sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’: sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable] For "fixing" these issues better, this patch replaces snd_printd() and snd_printdd() definitions with empty inline functions instead of macros. This should have the same effect but shut up warnings like above. But since we had already put ifdefs, changing to inline functions would trigger compile errors. So, such ifdefs is removed in this patch. In addition, snd_pci_quirk name field is defined only when CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in snd_printdd() argument triggers the build errors, too. For avoiding these errors, introduce a new macro snd_pci_quirk_name() that is defined no matter how the debug option is set. Reported-by: Stratos Karafotis <stratosk@semaphore.gr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Enable power down of unused widgets for IDT codecsTakashi Iwai2013-01-24
| | | | | | | | | | | | | | | | | | IDT codecs can work well with this new feature, so let's enable it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Implement path-based power filter to the generic parserTakashi Iwai2013-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a better power filter hook for powering down unused widgets in the generic parser. The feature is enabled by setting hda_gen_spec.power_down_unused flag. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Add snd_hda_check_power_state() helper functionTakashi Iwai2013-01-24
| | | | | | | | | | | | | | | | | | ... for small refactoring. Signed-off-by: Takashi Iwai <tiwai@suse.de>