summaryrefslogtreecommitdiffstats
path: root/sound/pci/asihpi
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* ALSA: asihpi - Remove unused code and data.Eliot Blennerhassett2011-02-103-146/+1
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Clarify firmware id selection.Eliot Blennerhassett2011-02-101-9/+12
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Allow adapters with duplicate index jumpers to be discovered.Eliot Blennerhassett2011-02-101-2/+12
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Add volume mute control.Eliot Blennerhassett2011-02-104-2/+54
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Add snd_card_set_dev to init.Eliot Blennerhassett2011-02-101-1/+3
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Replace adapter list with single item in subsys response.Eliot Blennerhassett2011-02-106-12/+11
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Cosmetic + a minor comments.Eliot Blennerhassett2011-02-106-24/+80
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Remove int flag polling code preparing for stream interrupts.Eliot Blennerhassett2011-02-102-104/+0
| | | | | | | | | Interrupt flag used for message handshake will be required for stream interrupts, so conditionally compiled code without HPI6205_NO_HSR_POLL defined can never be used; removing it. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Code cleanup.Eliot Blennerhassett2011-02-102-41/+16
| | | | | | | | | Remove unused function. Simplify hpi_alloc_control_cache. Remove useless assignment to struct subsequently freed. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Reduce number of error codes returned to upper layers.Eliot Blennerhassett2011-02-103-43/+73
| | | | | | | | Create and use HPI_ERROR_DSP_COMMUNICATION _DSP_BOOTLOAD, rather than backend-specific error codes (now returned as data with the error). Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Remove unused subsys pointer from all HPI functions.Eliot Blennerhassett2011-02-105-1502/+1270
| | | | | | | | asihpi.c don't link playback and capture streams, there is too much offset between them. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Update error codes.Eliot Blennerhassett2011-02-101-8/+9
| | | | | | | Some error codes had duplicate meanings. Just use one. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Checkpatch line lengths etc.Eliot Blennerhassett2011-02-104-20/+24
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Add include guard.Eliot Blennerhassett2011-02-101-3/+9
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Add adapter index to cache info for debug.Eliot Blennerhassett2011-02-104-5/+20
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Rewrite PCM timer function. Update control names.Eliot Blennerhassett2011-02-101-227/+203
| | | | | | | | | | | Reported samples_played from card may be inaccurate, so don't use it. Update control names to be closer to alsa standard practice. Also fixed some accidentally lowercased strings. [Removed adriver.h inclusion for external module builds by tiwai] Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Interrelated HPI tidy up.Eliot Blennerhassett2011-02-1011-2223/+1114
| | | | | | | | | | | | | Remove many unused functions. Update some message and cache structs. Use pci info directly from pci_dev. Allow control cache elements with variable size, and handle large message/response from dsp. hpi6000 and hpi6205: fix error path when adapter bootload fails. hpimsgx.c get rid of code duplicated in hpicmn.c Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - HPI 4.05.14Eliot Blennerhassett2011-02-101-229/+33
| | | | | | | | All enum values numeric for easier finding, particularly error codes. Remove many unused declarations. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Simplify debug logging.Eliot Blennerhassett2011-02-102-455/+25
| | | | | | | | Log HPI messages and responses in consistent numeric format, which can be post-processed to get strings. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Poison adapter_index in message. Remove unused function.Eliot Blennerhassett2011-02-101-16/+2
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Switch to dev_printk.Eliot Blennerhassett2011-02-101-15/+19
| | | | | Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sound/pci/asihpi/hpioctl.c: Remove unnecessary casts of pci_get_drvdataJoe Perches2010-11-221-1/+1
| | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Unsafe memory management when allocating control cacheJesper Juhl2010-11-023-3/+13
| | | | | | | | | | | | | | I noticed that sound/pci/asihpi/hpicmn.c::hpi_alloc_control_cache() does not check the return value from kmalloc(), which may fail. If kmalloc() fails we'll dereference a null pointer and things will go bad fast. There are two memory allocations in that function and there's also the problem that the first may succeed and the second may fail and nothing is done about that either which will also go wrong down the line. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Eliot Blennerhassett <linux@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi - Return hw error directly from oustream_write.Eliot Blennerhassett2010-08-281-2/+5
| | | | | | | If hw error is ignored, status is updated with invalid info. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: asihpi: check return value of get_user()Kulikov Vasiliy2010-07-291-4/+13
| | | | | | | get_user() may fail, if so return -EFAULT. Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hpimsgx: fix wrong sizeofAxel Lin2010-07-281-1/+1
| | | | | | | | The correct size should be sizeof(gRESP_HPI_SUBSYS_FIND_ADAPTERS), sizeof(&gRESP_HPI_SUBSYS_FIND_ADAPTERS) is incorrect. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud