aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/asihpi
AgeCommit message (Collapse)Author
2011-10-31sound: Add module.h to the previously silent sound usersPaul Gortmaker
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>
2011-08-07ALSA: asihpi - use kzalloc()Thomas Meyer
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>
2011-08-02ALSA: asihpi - Clarify adapter index validity checkEliot Blennerhassett
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>
2011-08-01ALSA: asihpi - Don't leak firmware if mem alloc failsJesper Juhl
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>
2011-07-27ALSA: asihpi - off by one in asihpi_hpi_ioctl()Dan Carpenter
"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>
2011-07-27ALSA: asihpi - bug fix pa use before init.Eliot Blennerhassett
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>
2011-07-24ALSA: Make snd_pcm_debug_name usable outside pcm_libEliot Blennerhassett
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>
2011-07-22Merge branch 'topic/misc' into for-linusTakashi Iwai
2011-07-22ALSA: asihpi - Replace with snd_ctl_boolean_mono_info()Takashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22ALSA: asihpi - HPI version 4.08Eliot Blennerhassett
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>
2011-07-22ALSA: asihpi - Add volume mute controlsEliot Blennerhassett
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>
2011-07-22ALSA: asihpi - Control name updatesEliot Blennerhassett
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>
2011-07-22ALSA: asihpi - Use size_t for sizeof resultEliot Blennerhassett
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22ALSA: asihpi - Explicitly include mutex.hEliot Blennerhassett
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>
2011-07-22ALSA: asihpi - Add new node and message definesEliot Blennerhassett
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22ALSA: asihpi - Make local function staticEliot Blennerhassett
Fixes a sparse warning. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22ALSA: asihpi - Fix minor typos and spellingEliot Blennerhassett
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22ALSA: asihpi - Remove unused structures, macros and functionsEliot Blennerhassett
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-22ALSA: asihpi - Remove spurious adapter index checkEliot Blennerhassett
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>
2011-07-22ALSA: asihpi - Revise snd_pcm_debug_name, get rid of DEBUG_NAME macroEliot Blennerhassett
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>
2011-07-22ALSA: asihpi - DSP code loader API now independent of OSEliot Blennerhassett
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>
2011-07-22ALSA: asihpi - Remove controlex structs and associated special data transfer ↵Eliot Blennerhassett
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>
2011-07-22ALSA: asihpi - Increase request and response buffer sizesEliot Blennerhassett
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>
2011-07-22ALSA: asihpi - Give more meaningful name to hpi request message typeEliot Blennerhassett
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>
2011-06-24ALSA: Remove unneeded version.h includes from sound/Jesper Juhl
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>
2011-06-10ALSA: Use KBUILD_MODNAME for pci_driver.name entriesTakashi Iwai
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>
2011-06-03ALSA: asihpi: Use angle brackets for system includesJoe Perches
Use the normal include style. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-22Merge branch 'topic/misc' into for-linusTakashi Iwai
2011-04-20ALSA: asihpi - Use %zd for size_t argument in error message (again)Takashi Iwai
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>
2011-04-05ALSA: asihpi: Minor cleanupsEliot Blennerhassett
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>
2011-04-05ALSA: asihpi: Simplify driver unload cleanupEliot Blennerhassett
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>
2011-04-05ALSA: asihpi: Standardise substream name generationEliot Blennerhassett
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>
2011-04-05ALSA: asihpi: Remove 2 unused functionsEliot Blennerhassett
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-04-05ALSA: asihpi: MMAP for non-busmaster cardsEliot Blennerhassett
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>
2011-04-05ALSA: asihpi: Handle playback drained status betterEliot Blennerhassett
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>
2011-04-05ALSA: asihpi: Update debug printingEliot Blennerhassett
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>
2011-04-05ALSA: snd-asihpi: Control namingEliot Blennerhassett
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>
2011-03-31Fix common misspellingsLucas De Marchi
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-25ALSA: asihpi - Update verbose debug print macrosEliot Blennerhassett
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>
2011-03-25ALSA: asihpi - Improve non-busmaster adapter operationEliot Blennerhassett
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>
2011-03-25ALSA: asihpi - Support single-rate no-SRC cardsEliot Blennerhassett
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>
2011-03-18ALSA: sound/pci/asihpi: check adapter index in hpi_ioctlDan Rosenberg
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>
2011-03-08ALSA: asihpi - Use %zd for size_t argument in error messageTakashi Iwai
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10ALSA: asihpi - HPI v4.06Eliot Blennerhassett
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>
2011-02-10ALSA: asihpi - Fix outstream start trigger for non-mmap adapters.Eliot Blennerhassett
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10ALSA: asihpi - Tighten firmware version requirements.Eliot Blennerhassett
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>
2011-02-10ALSA: asihpi - Ensure all adapter data is cleared on device removal.Eliot Blennerhassett
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10ALSA: asihpi - Minor define updatesEliot Blennerhassett
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>
2011-02-10ALSA: asihpi - New functions prep for interrupt driven streams.Eliot Blennerhassett
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-10ALSA: asihpi - Use consistent err return variable, change some bad variable ↵Eliot Blennerhassett
names. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>