summaryrefslogtreecommitdiffstats
path: root/sound/pci
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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: fm801: precedence bug in snd_fm801_tea575x_get_pins()Dan Carpenter2012-11-141-3/+8
| | | | | | | | There is a precedence bug because | has higher precedence than ?:. This code was cut and pasted and I fixed a similar bug a few days ago. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: es1968: precedence bug in snd_es1968_tea575x_get_pins()Dan Carpenter2012-11-131-3/+8
| | | | | | | | | | I don't think this works as intended. '|' higher precedence than ?: so the bitwize OR "0 | (val & STR_MOST)" is a no-op. I have re-written it to be more clear. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add a missing quirk entry for iMac 9,1Takashi Iwai2012-11-121-0/+1
| | | | | | | | This is another variant of iMac 9,1 with a different codec SSID. Reported-and-tested-by: Everaldo Canuto <everaldo.canuto@gmail.com> Cc: <stable@vger.kernel.org> [v3.3+] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add new codec ALC668 and ALC900 (default name ALC1150)Kailang Yang2012-11-081-0/+2
| | | | | | Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Improve HP depop when system enter to S3Kailang Yang2012-11-081-13/+11
| | | | | | | | | alc269_toggle_power_output() was only use in ALC269VB. I rename it to alc269vb_toggle_power_output(). Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Fix sync check reporting on RME RayDATAdrian Knoth2012-11-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The RayDAT reports the sync status of its inputs in consecutive bit positions, so all we do in hdspm_s1_sync_check is to iterate over idx: status = hdspm_read(hdspm, HDSPM_RD_STATUS_1); lock = (status & (0x1<<idx)) ? 1 : 0; sync = (status & (0x100<<idx)) ? 1 : 0; The index is given in kcontrol->private_value: HDSPM_SYNC_CHECK("WC SyncCheck", 0), HDSPM_SYNC_CHECK("AES SyncCheck", 1), HDSPM_SYNC_CHECK("SPDIF SyncCheck", 2), HDSPM_SYNC_CHECK("ADAT1 SyncCheck", 3), HDSPM_SYNC_CHECK("ADAT2 SyncCheck", 4), HDSPM_SYNC_CHECK("ADAT3 SyncCheck", 5), HDSPM_SYNC_CHECK("ADAT4 SyncCheck", 6), HDSPM_SYNC_CHECK("TCO SyncCheck", 7), HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 8), The patch corrects the indicated sync flags by passing the proper index value to hdspm_s1_sync_check(). Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add pin fixups for ASUS G75Takashi Iwai2012-11-071-0/+11
| | | | | | | | | To parse properly the subwoofer outputs on ASUS G75 laptop with VT1802 codec, correct the default configurations of speaker pins 0x24 and 0x33. Reported-by: Massimo Del Fedele <max@veneto.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix invalid connections in VT1802 codecTakashi Iwai2012-11-071-0/+14
| | | | | | | | | | | VT1802 codec provides the invalid connection lists of NID 0x24 and 0x33 containing the routes to a non-exist widget 0x3e. This confuses the auto-parser. Fix it up in the driver by overriding these connections. Reported-by: Massimo Del Fedele <max@veneto.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix empty DAC filling in patch_via.cTakashi Iwai2012-11-071-7/+4
| | | | | | | | | | | | | | | In via_auto_fill_adc_nids(), the parser tries to fill dac_nids[] at the point of the current line-out (i). When no valid path is found for this output, this results in dac = 0, thus it creates a hole in dac_nids[]. This confuses is_empty_dac() and trims the detected DAC in later reference. This patch fixes the bug by appending DAC properly to dac_nids[] in via_auto_fill_adc_nids(). Reported-by: Massimo Del Fedele <max@veneto.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Force to reset IEC958 status bits for AD codecsTakashi Iwai2012-11-051-0/+1
| | | | | | | | | | | | | | Several bug reports suggest that the forcibly resetting IEC958 status bits is required for AD codecs to get the SPDIF output working properly after changing streams. Original fix credit to Javeed Shaikh. BugLink: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/359361 Reported-by: Robin Kreis <r.kreis@uni-bremen.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: es1968: Add ESS vendor ID to pm_whitelistOndrej Zary2012-11-051-0/+2
| | | | | | | | | Add generic ESS vendor ID to pm_whitelist. This should fix suspend on all Maestro-2 and Maestro-2E based PCI cards. Tested on Terratec DMX and SF64-PCE2. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: HDA: Mark CS260x immutable structures constDaniel J Blueman2012-11-051-3/+2
| | | | | | | Mark structures that won't change const. Signed-off-by: Daniel J Blueman <daniel@quora.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: HDA: Fix digital microphone on CS420xDaniel J Blueman2012-11-051-5/+9
| | | | | | | | | | | | | Correctly enable the digital microphones with the right bits in the right coeffecient registers on Cirrus CS4206/7 codecs. It also prevents misconfiguring ADC1/2. This fixes the digital mic on the Macbook Pro 10,1/Retina. Based-on-patch-by: Alexander Stein <alexander.stein@systec-electronic.com> Signed-off-by: Daniel J Blueman <daniel@quora.org> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda: Cirrus: Fix coefficient index for beep configurationAlexander Stein2012-11-051-1/+1
| | | | | | Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - support Teradici 2200 host card audioLars R. Damerow2012-11-041-0/+2
| | | | | | | | The audio chipset used in Teradici's Tera2 host cards is the same as that in the 1200 host cards. This patch allows ALSA to recognize the Tera2 cards. Signed-off-by: Lars R. Damerow <lars@pixar.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Fix typo in drivers soundMasanari Iida2012-11-041-1/+1
| | | | | | | Correct spelling typo in debug messages within drivers/sound Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ice1724: Fix rate setup after resumeTakashi Iwai2012-10-311-1/+6
| | | | | | | | | The rate isn't restored properly after resume since it's only set up in hw_params, and not in prepare callback. For fixing it, put the corresponding call to resume callback as well. Reported-and-tested-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix mute-LED setup for HP dv5 laptopGustavo Maciel Dias Vieira2012-10-261-0/+2
| | | | | | | | | | The BIOS on HP dv5 doesn't have the DMI string to guide the setup of mute led GPIO and polarity. Associate this laptop with the hp-inv-led model. Signed-off-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org> Tested-by: Vinícius Angiolucci <angiolucci@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: als3000: check for the kzalloc return valueDenis Kirjanov2012-10-221-0/+4
| | | | | Signed-off-by: Denis Kirjanov <kirjanov@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix silent headphone output from Toshiba P200Takashi Iwai2012-10-201-1/+18
| | | | | | | | | | | By some reason, Toshiba laptop doesn't like the EAPD turned up for the headphone pin. Add a fix up code to force to turn down EAPD for NID 0x15. Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=569991 Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Fix coding style in CTL_ELEM macrosAdrian Knoth2012-10-201-90/+90
| | | | | | | | | | | checkpatch.pl discourages the use of spaces at the beginning of lines. Some of the CTL_ELEM defines were not properly indented. This patch replaces the leading spaces by tabs. No functionality is changed, the commit is purely cosmetic. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Fix typo in kcontrol element on RME MADI cardsAdrian Knoth2012-10-201-1/+1
| | | | | Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Fix sync_in detection on AES/AES32Adrian Knoth2012-10-201-2/+2
| | | | | | | | According to the documentation, AES32 cards use a different bit position for reporting the sync_in status. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdspm - Fix sync_in reporting on RME MADI cardsAdrian Knoth2012-10-201-0/+5
| | | | | | | | In contrast to AES32, MADI uses the first status register to report the sync_in status. Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud