summaryrefslogtreecommitdiffstats
path: root/sound/pci
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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>
| * ALSA: hda - Fix NULL dereference in error path of patch_ca0132.cTakashi Iwai2012-11-281-4/+2
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: hda - Remove unnecessary struct hda_stream_format from CA0132Ian Minett2012-11-281-24/+20
| | | | | | | | | | 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-281-36/+16
| | | | | | | | | | | | | | | | 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-281-1/+1
| | | | | | | | | | 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-281-17/+163
| | | | | | | | | | | | | | | | | | 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-281-6/+22
| | | | | | | | | | 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-281-4/+1605
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-281-8/+43
| | | | | | | | | | 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-282-0/+411
| | | | | | | | | | 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-283-6/+163
| | | | | | | | | | | | | | | | | | 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-073-12/+17
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: hda - Enable loopback accounts for CONFIG_PM=n, tooTakashi Iwai2013-02-072-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>
* | ALSA: ice1712: fix boundary check in snd_wm8766_write()Dan Carpenter2013-02-071-1/+1
| | | | | | | | | | | | | | | | 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-061-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>
* | Merge branch 'for-linus' into for-nextTakashi Iwai2013-02-053-23/+38
|\ \ | | | | | | | | | Merge pending fixes that haven't pulled into 3.8.
| * | ALSA: hda - Fix default multichannel HDMI mapping regressionAnssi Hannula2013-02-041-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>
| * | ALSA: hda - Fix non-snoop page handlingTakashi Iwai2013-01-291-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>
| * | ALSA: hda - Enable LPIB delay count for Poulsbo / OaktrailTakashi Iwai2013-01-291-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-051-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>
* | | ALSA: hda - Fix phantom jacks on VT1708David Henningsson2013-02-051-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>
* | | ALSA: hda - Release assigned pin/cvt at error path of hdmi_pcm_open()Takashi Iwai2013-02-011-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>
* | | ALSA - HDA: New PCI ID for Haswell ULTWang Xingchao2013-02-011-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>
* | | ALSA: hda - add support for IDT 92HD95 HDA codecVitaliy Kulikov2013-02-011-0/+39
| | | | | | | | | | | | | | | 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-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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-258-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-241-8/+3
| | | | | | | | | | | | | | | | | | 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-242-6/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-243-15/+18
| | | | | | | | | | | | | | | | | | ... for small refactoring. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Synchronize the power state at the end of codec initTakashi Iwai2013-01-241-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | Put the power state synchronization at the end of the parsing of codec. This is necessary when the power filter is changed during the codec probe. Since the first power-up sequence is performed without the special filter, all widgets are supposed to be ON at this point. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Add power state filteringTakashi Iwai2013-01-244-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a hook to struct hda_codec for filtering the target power state of each widget when powering up/down. The current hackish EAPD check is implemented as the default hook pointer, too. This allows codec drivers to implement own power filter. In the upcoming changes, the generic parser will have the better power filter based on the active paths. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda/via - Fix wrong checks of power state bitsTakashi Iwai2013-01-241-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | AC_VERB_GET_POWER_STATE returns the combined bits of the actual state and the target state. Thus, comparing the obtained value directly with the target value can't work. The value has to be shifted and masked properly. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Fix wrong arguments for path deactivation checksTakashi Iwai2013-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The arguments to call is_active_nid() in activate_amp() were swapped, and this resulted in the muted amp on some SPDIF output pins. Also, the index to be passed to is_active_nid() must be idx_to_check. Otherwise it checks the wrong connection in the case of implicit aamix connection paths. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Add auto-mute support to PB desktopTakashi Iwai2013-01-231-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the new chained_before flag, we can correct the headphone jack detection capability easily over the existing ALC880 6stack model (which disables the jack detection intentionally for compatibility reason). Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=901846 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge branch 'for-linus' into for-nextTakashi Iwai2013-01-232-3/+3
|\ \ \ | |/ / | | | | | | | | | Merge the 3.8 devel branch for correcting the newly added PB desktop fixup with the automute support.
| * | ALSA: hda - Add a fixup for Packard-Bell desktop with ALC880Takashi Iwai2013-01-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Packard-Bell desktop machine gives no proper pin configuration from BIOS. It's almost equivalent with the 6stack+fp standard config, just take the existing fixup. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=901846 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * | ALSA: hda - Fix inconsistent pin states after resumeTakashi Iwai2013-01-231-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit [26a6cb6c: ALSA: hda - Implement a poll loop for jacks as a module parameter] introduced the polling jack detection code, but it also moved the call of snd_hda_jack_set_dirty_all() in the resume path after resume/init ops call. This caused a regression when the jack state has been changed during power-down (e.g. in the power save mode). Since the driver doesn't probe the new jack state but keeps using the cached value due to no dirty flag, the pin state remains also as if the jack is still plugged. The fix is simply moving snd_hda_jack_set_dirty_all() to the original position. Reported-by: Manolo Díaz <diaz.manolo@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Add chained_before flag to the fixup entryTakashi Iwai2013-01-232-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes we want to call a fixup after applying other existing fixups, but currently the fixup chain mechanism allows only the call the others after the target fixup. This patch adds a new flag, chained_before, to struct hda_fixup, for allowing the chained call before the current execution. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Small code refactoring about path re-initializationTakashi Iwai2013-01-231-14/+11
| | | | | | | | | | | | | | | | | | Introduce a helper function to do the same thing. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Fix missing path between aamix and outputs in AD codecsTakashi Iwai2013-01-233-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AD1988 family and AD1882 codecs have another mixer widget (0x21) between the analog-loopback mixer widget (0x20) and the actual outputs. Due to this hole, the analog-loopbacks aren't sent properly to the output pins. As a band-aid fix, introduce another fields holding the aamix merge path, and activate it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | ALSA: hda - Fix invalid snd_BUG_ON() in alc271_hp_gate_mic_jack()Takashi Iwai2013-01-231-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | The fixup function is called multiple times before parsing the pins, so snd_BUG_ON() hits when loaded. Move it to the proper place in the if block. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | | Merge branch 'topic/hda-gen-parser' into for-nextTakashi Iwai2013-01-2320-15704/+9779
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a merge of really big changes: the generic parser is heavily enhanced for handling all cases, based on the former Realtek codec driver code. And all codec drivers except for a few ones (CA0132, HDMI and modem) have been converted to use the new generic driver. Conflicts: sound/pci/hda/patch_realtek.c
| * | | ALSA: hda - Select auto-parser as default for AD codecsTakashi Iwai2013-01-221-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now all AD codecs have the proper BIOS auto-parser, and we can make it for default, finally. (AD1988 already did it because it had the auto-parser.) Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud