summaryrefslogtreecommitdiffstats
path: root/sound/pci/pcxhr
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: pcxhr: make snd_kcontrol_new constBhumika Goyal2017-08-161-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>
* ALSA: pcxhr: Delete an error message for a failed memory allocation in ↵Markus Elfring2017-08-121-3/+1
| | | | | | | | | | | pcxhr_create() Omit an extra message for a memory allocation failure in this function. 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: pcxhr: make snd_pcm_hardware constBhumika Goyal2017-08-121-1/+1
| | | | | | | | Make this const as it is 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>
* ALSA: pcxhr: fix string overflow warningsArnd Bergmann2017-07-182-11/+11
| | | | | | | | | | | | | | | | With gcc-7, we get a warning about a possible string overflow: sound/pci/pcxhr/pcxhr.c: In function 'pcxhr_probe': sound/pci/pcxhr/pcxhr.c:1647:28: error: ' [PCM #' directive writing 7 bytes into a region of size between 1 and 32 [-Werror=format-overflow=] The shortname can simply be removed, and the longname can be changed into a shorter "name" string that is used in three places. Making it a little shorter (40 bytes) avoids the risk of overflowing completely, but I also use snprintf() here for extra clarity. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/for-4.12' into for-nextTakashi Iwai2017-03-202-14/+14
|\
| * ALSA: pci: constify snd_kcontrol_new structuresBhumika Goyal2017-02-212-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | lib/vsprintf.c: remove %Z supportAlexey Dobriyan2017-02-271-1/+1
|/ | | | | | | | | | | | | | | | | | Now that %z is standartised in C99 there is no reason to support %Z. Unlike %L it doesn't even make format strings smaller. Use BUILD_BUG_ON in a couple ATM drivers. In case anyone didn't notice lib/vsprintf.o is about half of SLUB which is in my opinion is quite an achievement. Hopefully this patch inspires someone else to trim vsprintf.c more. Link: http://lkml.kernel.org/r/20170103230126.GA30170@avx2 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ALSA: constify snd_pcm_ops structuresJulia Lawall2016-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: pcxhr: Fix missing mutex unlockTakashi Iwai2016-04-211-0/+1
| | | | | | | | | | | The commit [9bef72bdb26e: ALSA: pcxhr: Use nonatomic PCM ops] converted to non-atomic PCM ops, but shamelessly with an unbalanced mutex locking, which leads to the hangup easily. Fix it. Fixes: 9bef72bdb26e ('ALSA: pcxhr: Use nonatomic PCM ops') Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116441 Cc: <stable@vger.kernel.org> # 3.18+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: remove deprecated use of pci apiQuentin Lambert2015-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-282-2/+2
| | | | | | Nowadays it's recommended. Replace all in a shot. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcxhr: NULL dereference on probe failureDan Carpenter2014-12-101-1/+1
| | | | | | | "card" is NULL if snd_card_new() fails. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcxhr: Kill the rest snd_print*()Takashi Iwai2014-10-281-21/+21
| | | | | | Use the standard dev_*() instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcxhr: convert timeval to ktime_tAya Mahfouz2014-10-282-8/+12
| | | | | | | | | | | | This patch is concerned with migrating the time variables in the pcxhr module found in the sound driver. The changes are concerend with the y2038 problem where timeval will overflow in the year 2038. ktime_t was used instead of timeval to get the wall time. The difference is displayed now in nanoseconds instead of microseconds. Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcxhr: Use snd_ctl_enum_info()Takashi Iwai2014-10-211-16/+2
| | | | | | ... and reduce the open codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcxhr: Use nonatomic PCM opsTakashi Iwai2014-09-154-78/+77
| | | | | | | | | This time PCXHR, another Digigram boards: like the previous patches, the conversion is straightforward, replacing spinlocks with mutexes, merging the irq tasklet into the threaded irq handler and the PCM trigger tasklet back to the trigger callback. 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: pcxhr: Use standard printk helpersTakashi Iwai2014-02-265-98/+131
| | | | | | 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/+2
| | | | | | Also remove superfluous snd_card_set_dev() calls. 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: Make snd_printd() and snd_printdd() inlineTakashi Iwai2013-01-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Because currently snd_printd() and snd_printdd() macros are expanded to empty when CONFIG_SND_DEBUG=n, a compile warning like below appears sometimes, and we had to covert it by ugly ifdefs: sound/pci/hda/patch_sigmatel.c: In function ‘stac92hd71bxx_fixup_hp’: sound/pci/hda/patch_sigmatel.c:2434:24: warning: unused variable ‘spec’ [-Wunused-variable] For "fixing" these issues better, this patch replaces snd_printd() and snd_printdd() definitions with empty inline functions instead of macros. This should have the same effect but shut up warnings like above. But since we had already put ifdefs, changing to inline functions would trigger compile errors. So, such ifdefs is removed in this patch. In addition, snd_pci_quirk name field is defined only when CONFIG_SND_DEBUG_VERBOSE is set, and the reference to it in snd_printdd() argument triggers the build errors, too. For avoiding these errors, introduce a new macro snd_pci_quirk_name() that is defined no matter how the debug option is set. Reported-by: Stratos Karafotis <stratosk@semaphore.gr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pci: remove __dev* attributesBill Pemberton2012-12-071-7/+7
| | | | | | | | | | | 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: pcxhr: hard dependency on the standard fw loaderTakashi Iwai2012-11-221-86/+0
| | | | | | | Like the previous commit for mixart, drop the home-baked fw loader code. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcxhr: Add 8 new sound cardsMarkus Bollinger2012-08-272-3/+27
| | | | | | | add new sound cards VX442HR VX442e PCX442HR PCX442e VX822HR VX822e PCX822HR and PCX822e Signed-off-by: Markus Bollinger <bollinger@digigram.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcxhr: Add LTC supportMarkus Bollinger2012-06-206-1/+83
| | | | | | | add LTC (linear timecode) read function via proc interface to the pcxhr driver Signed-off-by: Markus Bollinger <bollinger@digigram.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: pcxhr: Fix a counter wrapMarkus Bollinger2012-06-201-8/+15
| | | | | | | | | fix a counter wrap to avoid resynchronization of stream positions every several minutes. The resynchronization may create stream position jitter Signed-off-by: Markus Bollinger <bollinger@digigram.com> 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: 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>
* 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>
* Fix common misspellingsLucas De Marchi2011-03-311-6/+6
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* 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>
* dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang2009-04-071-1/+1
| | | | | | | | Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 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/pcxhr' into for-linusTakashi Iwai2009-03-246-9/+90
|\
| * ALSA: pcxhr: fix trivial typoTim Blechmann2009-01-311-1/+1
| | | | | | | | | | Signed-off-by: Tim Blechmann <tim@klingt.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: pcxhr - add support for gpio ports and minor bug fixMarkus Bollinger2009-01-235-8/+89
| | | | | | | | | | | | | | | | | | - add support for gpio ports (2 GPI, 2 GPO) of pcxhr stereo cards - minor bugfixes : allow setting clock to internal by the mixer even if there is no stream (but monitoring) Signed-off-by: Markus Bollinger <bollinger@digigram.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/hwdep-cleanup' into for-linusTakashi Iwai2009-03-241-12/+0
|\ \
| * | ALSA: Remove superfluous hwdep opsTakashi Iwai2009-02-051-12/+0
| |/ | | | | | | | | | | Remove NOP hwdep ops in sound drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/snd_card_new-err' into for-linusTakashi Iwai2009-03-241-3/+3
|\ \
| * | 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: pcxhr.h replace signed one-bit bitfieldsHarvey Harrison2009-02-201-6/+6
|/ | | | | | | | | | | | | | | | The usage and comments make it clear values of 1/0 were intended rather than -1/0 Noticed by sparse: sound/pci/pcxhr/pcxhr.h:100:20: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:101:22: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:102:24: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:103:21: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:104:25: error: dubious one-bit signed bitfield sound/pci/pcxhr/pcxhr.h:105:20: error: dubious one-bit signed bitfield Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'topic/pcxhr-update' into to-pushTakashi Iwai2008-12-259-521/+1995
|\
| * ALSA: pcxhr - change firmware filenamesMarkus Bollinger2008-12-011-31/+31
| | | | | | | | | | | | | | | | | | | | - compatibility issue : change firmware filenames the pcxhr driver version <= 1.0.18a does not work with new firmware > 1.0.17. Keep the old firmware files and add new firmware files with different names Signed-off-by: Markus Bollinger <bollinger@digigram.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: pcxhr - add support for pcxhr stereo sound cards (mixer part)Markus Bollinger2008-11-254-175/+1259
| | | | | | | | | | | | | | | | | | | | - add support for pcxhr stereo cards mixer controls - adjust tlv db scales to real dBu values - fix bug with monitoring volume control pcxhr_monitor_vol_put - do some cleanup Signed-off-by: Markus Bollinger <bollinger@digigram.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: pcxhr - add support for pcxhr stereo sound cards (firmware support)Markus Bollinger2008-11-251-40/+108
| | | | | | | | | | | | | | | | | | - Add support for pcxhr stereo cards and their firmware - autorize sound cards without analog IO - do some cleanup Signed-off-by: Markus Bollinger <bollinger@digigram.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: pcxhr - add support for pcxhr stereo sound cards (core change)Markus Bollinger2008-11-252-195/+433
| | | | | | | | | | | | | | | | | | | | - Add support for pcxhr stereo cards - minor bugfixes : period and buffer size consraints - fix PLL register values - do some clean up Signed-off-by: Markus Bollinger <bollinger@digigram.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
| * ALSA: pcxhr - add support for pcxhr stereo sound cardsMarkus Bollinger2008-11-252-106/+190
| | | | | | | | | | | | | | | | - Add support for pcxhr stereo cards - do some clean up Signed-off-by: Markus Bollinger <bollinger@digigram.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | Merge branch 'topic/convert-tasklet' into to-pushTakashi Iwai2008-12-252-2/+2
|\ \
OpenPOWER on IntegriCloud