summaryrefslogtreecommitdiffstats
path: root/sound/pci/ali5451
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: ali5451: constify snd_pcm_ops structuresArvind Yadav2017-08-101-6/+6
| | | | | | | | | snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/pcm.h> work with const snd_pcm_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ali5451: Constify hw_constraintsTakashi Iwai2017-06-091-2/+2
| | | | | | | | snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the const pointers. Constify the corresponding static objects for better hardening. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ali5451: fix spelling mistake in "ali_capture_preapre"Colin Ian King2017-04-301-1/+1
| | | | | | | | trivial fix to spelling mistake in dev_warn message, "ali_capture_preapre" should be "ali_capture_prepare" Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ali5451: Fix out-of-bound position reportingTakashi Iwai2016-09-211-0/+2
| | | | | | | | | | | | | | The pointer callbacks of ali5451 driver may return the value at the boundary occasionally, and it results in the kernel warning like snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024 It seems that folding the position offset is enough for fixing the warning and no ill-effect has been seen by that. Reported-by: Enrico Mioso <mrkiko.rs@gmail.com> Tested-by: Enrico Mioso <mrkiko.rs@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: remove deprecated use of pci apiQuentin Lambert2015-04-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace occurences of the pci api by appropriate call to the dma api. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @deprecated@ idexpression id; position p; @@ ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @bad1@ idexpression id; position deprecated.p; @@ ...when != &id->dev when != pci_get_drvdata ( id ) when != pci_enable_device ( id ) ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @depends on !bad1@ idexpression id; expression direction; position deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_ATOMIC ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_ATOMIC ) ) Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Include linux/io.h instead of asm/io.hTakashi Iwai2015-01-281-1/+1
| | | | | | Nowadays it's recommended. Replace all in a shot. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ali5451: Simplify PM callbacksTakashi Iwai2015-01-091-15/+0
| | | | | | | | | | | | | | This is a similar cleanup like the commit [3db084fd0af5: ALSA: fm801: PCI core handles power state for us]. Since pci_set_power_state(), pci_save_state() and pci_restore_state() are already done in the PCI core side, so we don't need to it doubly. Also, pci_enable_device(), pci_disable_device() and pci_set_master() calls in PM callbacks are superfluous nowadays, too, so get rid of them as well. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* PCI: Remove DEFINE_PCI_DEVICE_TABLE macro useBenoit Taine2014-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to meet kernel coding style guidelines. This issue was reported by checkpatch. A simplified version of the semantic patch that makes this change is as follows (http://coccinelle.lip6.fr/): // <smpl> @@ identifier i; declarer name DEFINE_PCI_DEVICE_TABLE; initializer z; @@ - DEFINE_PCI_DEVICE_TABLE(i) + const struct pci_device_id i[] = z; // </smpl> [bhelgaas: add semantic patch] Signed-off-by: Benoit Taine <benoit.taine@lip6.fr> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
* ALSA: ali5451: Use standard printk helpersTakashi Iwai2014-02-261-80/+68
| | | | | | | Convert with dev_err() and co from snd_printk(), etc. Some debug prints are replaced with dev_dbg(), too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pci: Convert to snd_card_new() with a device pointerTakashi Iwai2014-02-121-3/+1
| | | | | | Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ali5451: Drop unused variableTakashi Iwai2013-10-291-2/+0
| | | | | | | | | The variable runtime is never used, and this might be even a source of NULL-dereference. Nothing better than killing it. Spotted by coverity CID 100862. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: PCI: Remove superfluous pci_set_drvdata(pci, NULL) at removeTakashi Iwai2013-05-291-1/+0
| | | | | | | | | | | | | As drvdata is cleared to NULL at probe failure or at removal by the driver core, we don't have to call pci_set_drvdata(pci, NULL) any longer in each driver. The only remaining pci_set_drvdata(NULL) is in azx_firmware_cb() in hda_intel.c. Since this function itself releases the card instance, we need to clear drvdata here as well, so that it won't be released doubly in the remove callback. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ali5451: use mdelay instead of large udelay constantsArnd Bergmann2013-04-261-4/+4
| | | | | | | | ARM cannot handle udelay for more than 2 miliseconds, so we should use mdelay instead for those. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ali5451: remove irq enabling in pointer callbackDenis Efremov2013-02-111-1/+1
| | | | | | | | | | | | snd_ali_pointer function is called with local interrupts disabled. However it seems very strange to reenable them in such way. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Denis Efremov <yefremov.denis@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pci: remove __dev* attributesBill Pemberton2012-12-071-16/+16
| | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEPTakashi Iwai2012-08-141-5/+5
| | | | | | Otherwise we may get compile warnings due to unused functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Convert to new pm_ops for PCI driversTakashi Iwai2012-07-031-9/+15
| | | | | | | | | | Straightforward conversion to the new pm_ops from the legacy suspend/resume ops. Since we change vx222, vx_core and vxpocket have to be converted, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pci: clean up using module_pci_driver()Takashi Iwai2012-04-241-13/+2
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: module_param: make bool parameters really boolRusty Russell2011-12-191-2/+2
| | | | | | | | | | | | module_param(bool) used to counter-intuitively take an int. In fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy trick. It's time to remove the int/unsigned int option. For this version it'll simply give a warning, but it'll break next kernel version. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: fix drivers needing module.h not moduleparam.hPaul Gortmaker2011-10-311-1/+1
| | | | | | | | | The implicit presence of module.h lured several users into incorrectly thinking that they only needed/used modparam.h but once we clean up the module.h presence, these will show up as build failures, so fix 'em now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* ALSA: use KBUILD_MODNAME for request_irq argument in sound/pci/*Takashi Iwai2011-06-101-1/+1
| | | | | | | | | The name argument of request_irq() appears in /proc/interrupts, and it's quite ugly when the name entry contains a space or special letters. In general, it's simpler and more readable when the module name appears there, so let's replace all entries with KBUILD_MODNAME. 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>
* sound: use DEFINE_PCI_DEVICE_TABLEAlexey Dobriyan2010-02-091-1/+1
| | | | | | | | | Use DEFINE_PCI_DEVICE_TABLE() to make PCI device ids go to .devinit.rodata section, so they can be discarded in some cases, and make them const. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sound: Move dereference after NULL test and drop unnecessary NULL testsJulia Lawall2009-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In pcm.c, if the NULL test on pcm is needed, then the dereference should be after the NULL test. In dummy.c and ali5451.c, the context of the calls to snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice, respectively cannot be NULL. A simplified version of the semantic match that detects this problem is as follows (http://coccinelle.lip6.fr/): // <smpl> @match exists@ expression x, E; identifier fld; @@ * x->fld ... when != \(x = E\|&x\) * x == NULL // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ali5451: remove dead codeBartlomiej Zolnierkiewicz2009-08-231-65/+0
| | | | | | | | Remove code covered by #if/endif 0 and #ifdef/endif CODEC_RESET (CODEC_RESET is never defined). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ali5451: fix timeout handling in snd_ali_{codecs,timer}_ready()Bartlomiej Zolnierkiewicz2009-08-231-6/+12
| | | | | | | | | | | | Modify loops in such way that the register value is checked also after the timeout condition, just in case the heavy interrupt load etc. caused the thread to sleep for the time period exceeding the timeout value. While at it remove an extra ALI_STIMER read from snd_ali_stimer_ready(). Reported-by: Jack Byer <ojbyer@usa.net> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* dma-mapping: replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31)Yang Hongyang2009-04-071-2/+2
| | | | | | | | Replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'topic/misc' into for-linusTakashi Iwai2009-03-241-2/+2
|\
| * ALSA: sound/ali5451: typo: s/resouces/resources/Wolfram Sang2009-03-201-2/+2
| | | | | | | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: Convert to snd_card_create() in sound/pci/*Takashi Iwai2009-01-121-3/+3
|/ | | | | | | Convert from snd_card_new() to the new snd_card_create() function in sound/pci/*. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] Fix synchronize_irq() bugs, redundanciesJeff Garzik2008-04-241-3/+1
| | | | | | | | | | | | | | | | free_irq() calls synchronize_irq() for you, so there is no need for drivers to manually do the same thing (again). Thus, calls where sync-irq immediately precedes free-irq can be simplified. However, during this audit several bugs were noticed, where free-irq is preceded by a "irq >= 0" check... but the sync-irq call is not covered by the same check. So, where sync-irq could not be eliminated completely, the missing check was added. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] sound: ali5451.c fix shadowed variable warningsHarvey Harrison2008-04-241-14/+14
| | | | | | | | | | | | | enable is used to test for whether or not spdif should be enabled, change to spdif_enable. sound/pci/ali5451/ali5451.c:1812:15: warning: symbol 'enable' shadows an earlier one sound/pci/ali5451/ali5451.c:63:12: originally declared here sound/pci/ali5451/ali5451.c:1840:27: warning: symbol 'enable' shadows an earlier one sound/pci/ali5451/ali5451.c:63:12: originally declared here Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] Remove sound/driver.hTakashi Iwai2008-01-311-1/+0
| | | | | | | | | | | | This header file exists only for some hacks to adapt alsa-driver tree. It's useless for building in the kernel. Let's move a few lines in it to sound/core.h and remove it. With this patch, sound/driver.h isn't removed but has just a single compile warning to include it. This should be really killed in future. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.czJaroslav Kysela2007-10-161-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] Clean up with common snd_ctl_boolean_*_info callbacksTakashi Iwai2007-10-161-9/+1
| | | | | | | Clean up codes using the new common snd_ctl_boolean_*_info() callbacks. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] ali5451 warning fixAndrew Morton2007-07-201-2/+1
| | | | | | | | | sound/pci/ali5451/ali5451.c: In function 'snd_ali_prepare': sound/pci/ali5451/ali5451.c:716: warning: 'R2' may be used uninitialized in this function Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] ali5451 - Fix invalid type of codec->irq fieldTakashi Iwai2007-07-201-2/+2
| | | | | | | | The irq field of struct snd_ali shouldn't be unsigned since it's uninitialized value is -1. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* PCI: Change all drivers to use pci_device->revisionAuke Kok2007-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | Instead of all drivers reading pci config space to get the revision ID, they can now use the pci_device->revision member. This exposes some issues where drivers where reading a word or a dword for the revision number, and adding useless error-handling around the read. Some drivers even just read it for no purpose of all. In devices where the revision ID is being copied over and used in what appears to be the equivalent of hotpath, I have left the copy code and the cached copy as not to influence the driver's performance. Compile tested with make all{yes,mod}config on x86_64 and i386. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Acked-by: Dave Jones <davej@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [ALSA] ali5451 - Fix possible NULL dereferenceTakashi Iwai2007-05-311-3/+3
| | | | | | | | | Reported by Eric Sesterhenn. Fix the wrong checks of extra voice pointer, which may cause NULL dereferences. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] ali5451 - Code clean up, irq handler fixTakashi Iwai2007-05-111-445/+420
| | | | | | | | | | | | - Clean up ali5451.c, following the standard coding style, unneeded codes reduced, and removal of redundant variable initializations. Hungarian notation isn't fixed yet ;) - Fix irq handler to return IRQ_NONE properly for shared irqs. Also check the hardware availability in irq handler to avoid possible initialization races at loading the driver. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Add snd_pcm_group_for_each_entry() for code cleanupTakashi Iwai2007-05-111-3/+1
| | | | | | | | | Added a new macro snd_pcm_group_for_each_entry() just for code cleanup. Old macros, snd_pcm_group_for_each() and snd_pcm_group_substream_entry(), are removed. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Add missing sysfs device assignment for ALSA PCI driversTakashi Iwai2007-03-061-0/+2
| | | | | | | Added the missing sysfs device assignment for ALSA PCI drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Remove IRQF_DISABLED for shared PCI irqsTakashi Iwai2006-12-201-2/+3
| | | | | | | | | | | | Fix IRQ flags for PCI devices. The shared IRQs for PCI devices shouldn't be allocated with IRQF_DISABLED. Also, when MSI is enabled, IRQF_SHARED shouldn't be used. The patch removes unnecessary cast in request_irq and free_irq, too. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Various fixes for suspend/resume of ALSA PCI driversTakashi Iwai2006-10-221-1/+10
| | | | | | | | | | | | - Check the return value of pci_enable_device() and request_irq() in the suspend. If any error occurs there, disable the device using snd_card_disconnect(). - Call pci_set_power_state() properly with pci_choose_state(). - Fix the order to call pci_set_power_state(). - Removed obsolete house-made PM codes in some drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
* [ALSA] Fix section mismatch errors in ALSA PCI driversTakashi Iwai2006-07-121-1/+1
| | | | | | | | | Fixed 'section mismatch' errors in ALSA PCI drivers: - removed invalid __devinitdata from pci id tables - fix/remove __devinit of functions called in suspend/resume Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [PATCH] irq-flags: sound: Use the new IRQF_ constantsThomas Gleixner2006-07-021-1/+1
| | | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "David S. Miller" <davem@davemloft.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Jaroslav Kysela <perex@suse.cz> Cc: Takashi Iwai <tiwai@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [ALSA] Remove zero-initialization of static variablesTakashi Iwai2006-06-221-1/+1
| | | | | | | Removed zero-initializations of static variables. A tiny optimization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] Remove unneeded read/write_size fields in proc text opsTakashi Iwai2006-06-221-1/+1
| | | | | | | Remove unneeded read/write_size fields in proc text ops. snd_info_set_text_ops() is fixed, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* [ALSA] add __devinitdata to all pci_device_idHenrik Kretzschmar2006-04-271-1/+1
| | | | | Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
OpenPOWER on IntegriCloud