summaryrefslogtreecommitdiffstats
path: root/sound/pci/ymfpci/ymfpci_main.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: ymfpci: make snd_pcm_hardware constBhumika Goyal2017-08-121-2/+2
| | | | | | | | Make these const as they are only used during a copy operation. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sched/wait: Rename wait_queue_t => wait_queue_entry_tIngo Molnar2017-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | Rename: wait_queue_t => wait_queue_entry_t 'wait_queue_t' was always a slight misnomer: its name implies that it's a "queue", but in reality it's a queue *entry*. The 'real' queue is the wait queue head, which had to carry the name. Start sorting this out by renaming it to 'wait_queue_entry_t'. This also allows the real structure name 'struct __wait_queue' to lose its double underscore and become 'struct wait_queue_entry', which is the more canonical nomenclature for such data types. Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
* ALSA: pci: constify snd_kcontrol_new structuresBhumika Goyal2017-02-211-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare snd_kcontrol_new structures as const as they are only passed as an argument to the function snd_ctl_new1. This argument is of type const, so snd_kcontrol_new structures having the same property can be made const too. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct snd_kcontrol_new i@p = {...}; @ok1@ identifier r1.i; position p; expression e1; @@ snd_ctl_new1(&i@p,e1) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct snd_kcontrol_new i; Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: constify snd_pcm_ops structuresJulia Lawall2016-09-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for snd_pcm_ops structures that are only stored in the ops field of a snd_soc_platform_driver structure or passed as the third argument to snd_pcm_set_ops. The corresponding field or parameter is declared const, so snd_pcm_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_pcm_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_platform_driver e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i; expression e1, e2; position p; @@ snd_pcm_set_ops(e1, e2, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_pcm_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_pcm_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> 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>
* Merge branch 'topic/pci-cleanup' into for-nextTakashi Iwai2015-01-111-12/+0
|\
| * ALSA: ymfpci: Simplify PM callbacksTakashi Iwai2015-01-091-12/+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>
* | ALSA: Deletion of checks before the function call "iounmap"Markus Elfring2015-01-041-2/+1
| | | | | | | | | | | | | | | | | | | | The iounmap() function performs also input parameter validation. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: ymfpci: Remove always NULL parametersLars-Peter Clausen2015-01-021-32/+6
|/ | | | | | | | | | The various PCM allocation functions in this driver take a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ymfpci: Use standard printk helpersTakashi Iwai2014-02-261-11/+15
| | | | | | Convert with dev_err() and co from snd_printk(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pci: Convert to snd_card_new() with a device pointerTakashi Iwai2014-02-121-2/+0
| | | | | | Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pci: trivial: replace numeric with standard PM state macrosYijing Wang2013-06-271-1/+1
| | | | | | | Use standard PM state macros PCI_Dx instead of numeric 0/1/2.. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pci: remove __dev* attributesBill Pemberton2012-12-071-21/+23
| | | | | | | | | | | 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: ymfpci: Use kmalloc for register buffer for PMTakashi Iwai2012-11-221-3/+3
| | | | | | | Th buffer to save registers for PM is enough small for kmalloc(), not necessary to use vmalloc(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Fix leftover chmap UNKNOWN -> MONO conversionsTakashi Iwai2012-09-131-1/+1
| | | | | | | A few files have been slipped from the previous commit to add MONO channel type. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ymfpci: Define channel mapsTakashi Iwai2012-09-121-0/+18
| | | | | | Provide channel maps for individual stereo streams of YMFPCI. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEPTakashi Iwai2012-08-141-4/+4
| | | | | | Otherwise we may get compile warnings due to unused functions. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Move some headers to local directories from include/soundTakashi Iwai2012-07-031-1/+1
| | | | | | | | This is a bit clean up of public sound header directory. Some header files in include/sound aren't really necessary to be located there but can be moved to their local directories gracefully. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Convert to new pm_ops for PCI driversTakashi Iwai2012-07-031-5/+9
| | | | | | | | | | 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>
* Merge branch 'topic/misc' into for-linusTakashi Iwai2012-03-181-0/+9
|\
| * ALSA: ymfpci - Fix legacy registers on S3/S4 resumeTakashi Iwai2012-03-131-0/+9
| | | | | | | | | | | | | | We need to resume two legacy registers to recover MIDI/FM functionality on S3/S4 resume, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: ymfpci - Don't create invalid PCM & mixers when AC97 doesn't supportRaymond Yau2012-01-241-7/+14
|/ | | | | | | | | - check SDAC bit of AC97 primary codec when create "rear" device 3, "4ch" device 2 and "4ch Duplication" switch as the card need a four channels AC97 codec to support surround40. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: Add module.h to the previously silent sound usersPaul Gortmaker2011-10-311-0/+1
| | | | | | | | 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: ymfpci: allow to disable the SRCClemens Ladisch2011-09-201-0/+6
| | | | | | | Add the PCM rules to allow disabling the PCM playback and capture SRCs. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ymfpci: fix PCM open error handlingClemens Ladisch2011-09-201-6/+18
| | | | | | | | | | The installation of the minimum period size constraint in the PCM open callbacks was not checked for errors. Add this check, and move the call to the beginning of the function to avoid having to do any cleanups in the error case. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ymfpci: add "Playback" to FM Legacy Volume controlRaymond Yau2011-09-121-1/+1
| | | | | | | | YDSXGR_LEGACYOUTVOL is a Playback Volume control for OPL3 FM Synth. Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 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: ymfpci: use enum control info helperClemens Ladisch2011-01-101-9/+3
| | | | | | | Simplify the info callback by using the snd_ctl_enum_info() helper function. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: ymfpci: increase timer resolution to 96 kHzClemens Ladisch2009-08-101-5/+15
| | | | | | | | Allow the interval timer to be programmed with its full 96 kHz precision. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Fix missing KERN_* prefix to printk in sound/pciTakashi Iwai2009-02-051-2/+12
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Kill snd_assert() in sound/pci/*Takashi Iwai2008-08-131-7/+14
| | | | | | | | Kill snd_assert() in sound/pci/*, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitDavid Woodhouse2008-07-141-64/+10
|\ | | | | | | | | | | Conflicts: sound/pci/Kconfig
| * firmware: convert ymfpci driver to use firmware loader exclusivelyDavid Woodhouse2008-07-101-63/+0
| | | | | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org>
| * ymfpci: treat firmware data as constDavid Woodhouse2008-07-101-25/+34
| | | | | | | | | | | | | | Standardise both in-kernel and loaded firmware to be stored as little-endian instead of host-endian. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* | ALSA: ymfpci - fix initial volume for 44.1kHz outputTakashi Iwai2008-06-271-0/+2
|/ | | | | | | | | YDSXGR_BUF441OUTVOL register isn't initialized properly. This may lead to a silent output at full volume of unchanged "Wave Playback Volume". http://bugzilla.kernel.org/show_bug.cgi?id=10963 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* [ALSA] ymfpci - Fix race at removalTakashi Iwai2008-04-241-2/+2
| | | | | | free_irq() must be called first to avoid races at removal. 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] pci - check value range in ctl callbacksTakashi Iwai2008-01-311-0/+4
| | | | | | | | Check the value ranges in ctl put callbacks properly in the rest of PCI drivers. 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] alsa-kernel: schedule_timeout() fixesRene Herman2007-10-161-1/+0
| | | | | | | | | | | | | Fix schedule_timeout() use in alsa-kernel. Mostly just schedule_timeout(1) --> schedule_timeout_uninterruptible(1) The wavefront_synth one fixes the surrounding loop as well. In ymfpci_main, delete a superfluous set_current_state() and in soc/soc-dapm.c replace an _interruptible with _uninterruptible in some debug code; it's not waiting for signals. Signed-off-by: Rene Herman <rene.herman> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] ymfpci: fix volume handling of the 44.1 kHz slotClemens Ladisch2007-10-161-24/+46
| | | | | | | | | | | | | | | | | | | The existing code for handling the 44.1 slot's volume has two problems: the volume is not affected by the 'Wave Playback Volume' mixer control, and the BUF441OUTVOL register, which is used to control the per- substream volume for this slot, uses a different scale than the gain fields of the other slots. This patch makes the BUF441OUTVOL register a shadow of the NATIVEDACOUTVOL register so that the Wave volume is consistent for all substreams. As a consequence of this, the per-substream PCM volume control gets no longer activated for the substream using this slot. The code for (de)activating the mixer control is moved from the open/close to the prepare/trigger_stop callbacks so that it is able to determine the substream's slot. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Clean up with common snd_ctl_boolean_*_info callbacksTakashi Iwai2007-10-161-32/+3
| | | | | | | 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>
* 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] add MODULE_FIRMWARE entriesClemens Ladisch2007-05-111-0/+5
| | | | | | | Add MODULE_FIRMWARE() entries, where appropriate. Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Don't use request_firmware if internal firmwares are definedTakashi Iwai2007-05-111-22/+24
| | | | | | | | | Don't use request_firmware() if the internal firmwares are defined via Kconfig. Otherwise it results in a significant delay at loading time (minutes). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Enable Kconfig options for external firmwaresTakashi Iwai2007-05-111-7/+5
| | | | | | | | Some drivers are already ifdefs for enabling external firmwares but not defined in Kconfig. Now they appear as the kernel configs. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Add even more 'const' to everything related to TLVTakashi Iwai2007-02-091-1/+1
| | | | | | | | Mark TLV data as 'const' Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] Current driver does not utilize 44.1kHz high quality sampling rate ↵Teru KAMOGASHIRA2007-02-091-4/+40
| | | | | | | | | | | | converter. Following patch will make the driver to use the 44.1kHz SRC automatically if the pcm source is 44.1kHz signed 16bit stereo. The SRC is available in YMF754 only. Signed-off-by: Teru KAMOGASHIRA <teru@sodan.ecc.u-tokyo.ac.jp> Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
* [ALSA] ymfpci: add request_firmware()Clemens Ladisch2007-02-091-23/+102
| | | | | | | | Load the DSP and controller microcode using request_firmware(), if possible, instead of using the built-in firmware. Signed-off-by: Clemens Ladisch <clemens@ladisch.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>
OpenPOWER on IntegriCloud