summaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi
Commit message (Collapse)AuthorAgeFilesLines
* sound: Add module.h to the previously silent sound usersPaul Gortmaker2011-10-312-0/+2
| | | | | | | | Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* ALSA: asihpi - use kzalloc()Thomas Meyer2011-08-071-3/+2
| | | | | | | | | | | | | | | | | Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no ...s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this output is available in scripts/coccinelle/api/alloc/kzalloc-simple.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Clarify adapter index validity checkEliot Blennerhassett2011-08-021-7/+12
| | | | | | | | | Avoids assigning possibly invalid address to pa, even if it is never dereferenced. Correct error response to reflect request object/function ids. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Don't leak firmware if mem alloc failsJesper Juhl2011-08-011-3/+6
| | | | | | | | | We leak the memory allocated to 'firmware' when we fail to release_firmware() after a kmalloc() failure in hpi_dsp_code_open(). This patch should take care of the leak. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - off by one in asihpi_hpi_ioctl()Dan Carpenter2011-07-271-1/+1
| | | | | | | | | | | | "adapter" is used as an array index in the adapters[] array so the off by one would make us read past the end. 1c073b67979 "ALSA: asihpi - Remove spurious adapter index check" reverted Dan Rosenberg's check that would have prevented the overflow here. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - bug fix pa use before init.Eliot Blennerhassett2011-07-271-7/+4
| | | | | | | | Fixes bug introduced by 1c073b67. Also declare pa local to block in which it is used. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Make snd_pcm_debug_name usable outside pcm_libEliot Blennerhassett2011-07-241-21/+0
| | | | | | | | | | Formatting a PCM name is useful for module debug too. Add snd_prefix when making function public. [minor coding-style fixes by tiwai] Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/misc' into for-linusTakashi Iwai2011-07-2215-377/+311
|\
| * ALSA: asihpi - Replace with snd_ctl_boolean_mono_info()Takashi Iwai2011-07-221-9/+1
| | | | | | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - HPI version 4.08Eliot Blennerhassett2011-07-221-5/+4
| | | | | | | | | | | | | | | | | | HPI Version is used to check for firmware compatibility. This version will accept 4.08.xx released firmware, and will also accept 4.09.xx beta firmware Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Add volume mute controlsEliot Blennerhassett2011-07-221-1/+50
| | | | | | | | | | | | | | Mute functionality was recently added to the DSP firmware Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Control name updatesEliot Blennerhassett2011-07-221-4/+8
| | | | | | | | | | | | | | | | | | Add names corresponding to new HPI node types. Shorten some names so that constructed names don't overflow the maximum name length. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Use size_t for sizeof resultEliot Blennerhassett2011-07-221-2/+2
| | | | | | | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Explicitly include mutex.hEliot Blennerhassett2011-07-221-0/+1
| | | | | | | | | | | | | | Because mutex is used in adapter struct defined here. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Add new node and message definesEliot Blennerhassett2011-07-222-6/+15
| | | | | | | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Make local function staticEliot Blennerhassett2011-07-221-0/+1
| | | | | | | | | | | | | | Fixes a sparse warning. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Fix minor typos and spellingEliot Blennerhassett2011-07-223-3/+3
| | | | | | | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Remove unused structures, macros and functionsEliot Blennerhassett2011-07-225-30/+0
| | | | | | | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Remove spurious adapter index checkEliot Blennerhassett2011-07-221-7/+3
| | | | | | | | | | | | | | | | | | Subsystem requests don't have or need a valid adapter index. The adapter index is already checked further on, before it is used to index the adapters array. (Reverts 4a122c10f) Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Revise snd_pcm_debug_name, get rid of DEBUG_NAME macroEliot Blennerhassett2011-07-221-9/+15
| | | | | | | | | | | | | | Work towards moving the function into alsa common header. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - DSP code loader API now independent of OSEliot Blennerhassett2011-07-224-122/+97
| | | | | | | | | | | | | | | | The loader API has been revised so that OS specific data is kept local to hpidspcd.c, and the public API is unchanged across OSes. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Remove controlex structs and associated special data transfer ↵Eliot Blennerhassett2011-07-223-160/+76
| | | | | | | | | | | | | | | | | | | | | | code Some cobranet control data would not fit in an original HPI message. Now that HPI is able to transfer larger messages, this special handling is no longer required. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Increase request and response buffer sizesEliot Blennerhassett2011-07-223-19/+34
| | | | | | | | | | | | | | | | Allow for up to 256 bytes of extra data on top of standard hpi request and response sizes. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi - Give more meaningful name to hpi request message typeEliot Blennerhassett2011-07-226-10/+11
| | | | | | | | | | | | | | Having a 'request message' makes more sense than a 'message message' Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: Use KBUILD_MODNAME for pci_driver.name entriesTakashi Iwai2011-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The convention for pci_driver.name entry in kernel drivers seem to be the module name or equivalent ones. But, so far, almost all PCI sound drivers use more verbose name like "ABC Xyz (12)", and these are fairly confusing when appearing as a file name. This patch converts the all pci_driver.name entries in sound/pci/* to use KBUILD_MODNAME for more unified appearance. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: Remove unneeded version.h includes from sound/Jesper Juhl2011-06-241-1/+0
|/ | | | | | | | | | In the sound/ directory there are two files (flagged by 'make versioncheck'); sound/pci/asihpi/asihpi.c and sound/soc/codecs/wm8991.c that include linux/version.h although they don't need it. This patch removes the unneeded includes. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi: Use angle brackets for system includesJoe Perches2011-06-031-1/+1
| | | | | | | Use the normal include style. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/misc' into for-linusTakashi Iwai2011-05-229-348/+266
|\
| * ALSA: asihpi - Use %zd for size_t argument in error message (again)Takashi Iwai2011-04-201-1/+1
| | | | | | | | | | | | | | | | This was reverted mistakenly in the recent update patch. Fixed again. Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: Minor cleanupsEliot Blennerhassett2011-04-054-10/+12
| | | | | | | | | | | | | | | | | | | | Remove some unneeded defintions Use %pR to print resources Make some data const Consistent braces for else Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: Simplify driver unload cleanupEliot Blennerhassett2011-04-056-126/+113
| | | | | | | | | | | | | | | | Replacing subsys_delete_adapter with adapter_delete allows some special-case adapter lookup code to be removed. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: Standardise substream name generationEliot Blennerhassett2011-04-051-15/+16
| | | | | | | | | | | | | | Define and use pcm_debug_name if CONFIG_SND_DEBUG Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: Remove 2 unused functionsEliot Blennerhassett2011-04-051-27/+0
| | | | | | | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: MMAP for non-busmaster cardsEliot Blennerhassett2011-04-051-135/+70
| | | | | | | | | | | | | | | | | | | | Allow older non DMA capable cards to use MMAP by emulating the DMA using read and write functions, and getting rid of copy & silence callbacks that were used only by older cards. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: Handle playback drained status betterEliot Blennerhassett2011-04-051-2/+10
| | | | | | | | | | | | | | | | | | Use the card drained status reporting for playback, but allow it to persist for a few timer cycles before signalling XRUN, to allow card to recover by itself. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: asihpi: Update debug printingEliot Blennerhassett2011-04-051-46/+56
| | | | | | | | | | | | | | | | Debug print full substream ID. Other minor debug print updates. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: snd-asihpi: Control namingEliot Blennerhassett2011-04-051-3/+5
| | | | | | | | | | | | | | | | | | | | Clock source is neither capture nor playback, so change 'Capture Clock' to 'Clock'. Add spaces to control name string for consistency, always 'PCM 0' , never 'PCM0' Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Fix common misspellingsLucas De Marchi2011-03-316-6/+6
|/ | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* ALSA: asihpi - Update verbose debug print macrosEliot Blennerhassett2011-03-251-53/+47
| | | | | | | | | Replace local VPRINTK1 with snd_printdd. Create local snd_printddd instead of VPRINTK2 for most verbose debug. In most cases let snd_printk supply default level for messages. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Improve non-busmaster adapter operationEliot Blennerhassett2011-03-251-11/+10
| | | | | | | | | | Make playback silence callback a no-op, card automatically outputs silence when written data runs out. Increasing update interval and thus minimum period avoids xrun on startup or because of timer jitter. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Support single-rate no-SRC cardsEliot Blennerhassett2011-03-251-9/+7
| | | | | | | | | Cards without settable local samplerate and without SRC still must have a valid samplerate. This fixed rate is determined by reading the current rate for the card. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sound/pci/asihpi: check adapter index in hpi_ioctlDan Rosenberg2011-03-181-0/+5
| | | | | | | | | | The user-supplied index into the adapters array needs to be checked, or an out-of-bounds kernel pointer could be accessed and used, leading to potentially exploitable memory corruption. Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com> Cc: <stable@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Use %zd for size_t argument in error messageTakashi Iwai2011-03-081-1/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - HPI v4.06Eliot Blennerhassett2011-02-101-2/+2
| | | | | | | | Firmware version check depends on hpi version. Update so correct firmware is accepted. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Fix outstream start trigger for non-mmap adapters.Eliot Blennerhassett2011-02-101-1/+2
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Tighten firmware version requirements.Eliot Blennerhassett2011-02-101-4/+3
| | | | | | | | Difference in major.minor between driver and firmware is an error now. Release version mismatch give a warning. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Ensure all adapter data is cleared on device removal.Eliot Blennerhassett2011-02-101-3/+3
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Minor define updatesEliot Blennerhassett2011-02-103-16/+22
| | | | | | | | | HPI version 4.05.32 Tweak HPI error code for backward compatibility. Add BUILD to build-related defines. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - New functions prep for interrupt driven streams.Eliot Blennerhassett2011-02-102-5/+39
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Use consistent err return variable, change some bad variable ↵Eliot Blennerhassett2011-02-101-68/+75
| | | | | | | names. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud