summaryrefslogtreecommitdiffstats
path: root/sound/isa
Commit message (Collapse)AuthorAgeFilesLines
* sound: Deparenthesize negative error returnsJoe Perches2015-03-242-16/+16
| | | | | | | Make the returns a bit more kernel standard style. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge branch 'for-linus' into for-nextTakashi Iwai2015-03-091-1/+2
|\ | | | | | | | | Merging the HD-audio fixes back to base devel branch for further working on it.
| * ALSA: msnd: add some missing curly bracesDan Carpenter2015-03-051-1/+2
| | | | | | | | | | | | | | There were some curly braces intended here. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: seq: Define driver object in each driverTakashi Iwai2015-02-121-20/+15
|/ | | | | | | | | | | | | This patch moves the driver object initialization and allocation to each driver's module init/exit code like other normal drivers. The snd_seq_driver struct is now published in seq_device.h, and each driver is responsible to define it with proper driver attributes (name, probe and remove) with snd_seq_driver specific attributes as id and argsize fields. The helper functions snd_seq_driver_register(), snd_seq_driver_unregister() and module_snd_seq_driver() are used for simplifying codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/*Takashi Iwai2015-01-282-2/+2
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Include linux/io.h instead of asm/io.hTakashi Iwai2015-01-2818-19/+18
| | | | | | Nowadays it's recommended. Replace all in a shot. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sscape: add missing include of linux/io.hArnd Bergmann2015-01-281-0/+1
| | | | | | | | | | | | The soundscape driver uses the ISA inb/outb functions declared in linux/io.h, so it needs to include this header to avoid a build error: sscape.c: In function 'sscape_write_unsafe': sscape.c:203:2: error: implicit declaration of function 'outb' [-Werror=implicit-function-declaration] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: wavefront: Use setup_timer() and mod_timer()Takashi Iwai2015-01-191-7/+5
| | | | | | No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sb: Use setup_timer() and mod_timer()Takashi Iwai2015-01-192-14/+8
| | | | | | No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: log emu8000 DRAM size at level INFODavid Flater2015-01-121-1/+1
| | | | | | | | Detected sound font memory goes unreported unless the kernel was built with ALSA debugging enabled. Elevate that to a pr_info. Signed-off-by: David Flater <dave@flaterco.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: fix emu8000 DRAM sizing for AWE64 ValueDavid Flater2015-01-121-16/+15
| | | | | | | | | | | | | Applicable to any kernel since 2013: The special case added in commit 1338fc97d07a did not handle the possibility that the address space on an AWE64 Value would wrap around at 512 KiB. That is what it does, so the memory is still not detected on those cards. Fix that with a logic clean-up that eliminates the need for a special case. Signed-off-by: David Flater <dave@flaterco.com> 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: sb: Delete an unnecessary check before the function call "snd_emux_free"Markus Elfring2015-01-041-2/+1
| | | | | | | | | | The snd_emux_free() function tests whether its argument is NULL and then returns immediately. 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: wss: Remove (almost) always NULL parametersLars-Peter Clausen2015-01-0216-64/+48
| | | | | | | | | | | | | | | | | | Most callers of snd_wss_pcm(), snd_wss_timer() and snd_cs4236_pcm() pass NULL as the last parameter, some callers pass a pointer but never use it after the function has been called and only a few callers pass a pointer and actually use it. The later is only the case for snd_wss_pcm() for snd_cs4236_pcm() and it is possible to get the same PCM object by accessing the pcm field of the snd_wss struct that was passed as the first parameter. This function removes the last parameters from the functions mentioned above and updates the callers which used it to use chip->pcm instead. This allows us to slightly simplify the functions since they don't have to check and set the last parameter anymore which makes the code slightly shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ASoC: sb16: Simplify snd_sb16dsp_pcm()Lars-Peter Clausen2015-01-023-8/+4
| | | | | | | | | All callers of snd_sb16dsp_pcm() always pass the pcm field of the first parameter as the last parameter. Simplify the function by moving this inside the function itself. 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: sb8: Remove always NULL parametersLars-Peter Clausen2015-01-024-13/+5
| | | | | | | | | | snd_sb8dsp_pcm() and snd_sb8dsp_midi() take a pointer to a pointer of a PCM/MIDI where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: msnd: Remove always NULL parameterLars-Peter Clausen2015-01-023-7/+3
| | | | | | | | | snd_msnd_pcm() takes 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 cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: gus: Remove always NULL parametersLars-Peter Clausen2015-01-026-17/+9
| | | | | | | | | | snd_gf1_pcm_new() and snd_gf1_rawmidi_new() take a pointer to a pointer of a PCM/MIDI where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: es18xx: Remove always NULL parameterLars-Peter Clausen2015-01-021-8/+2
| | | | | | | | | | snd_es18xx_pcm() takes 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 cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: es1688: Remove almost always NULL parameterLars-Peter Clausen2015-01-023-10/+5
| | | | | | | | | | | | snd_es1688_pcm() takes a pointer to a pointer of a PCM where if this parameter is provided the newly allocated PCM is stored. This PCM is also available from the pcm field of the snd_es1688 struct that got passed to the same function. This patch updates all callers which passed a pointer to use that field instead and then removes the parameter from the function. 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: ad1816a: Remove always NULL parametersLars-Peter Clausen2015-01-022-10/+4
| | | | | | | | | | snd_ad1816a_pcm() and snd_ad1816a_timer() take a pointer to a pointer of a PCM/timer where if this parameter is provided the newly allocated object is stored. All callers pass NULL though, so remove the parameter. This makes the code a bit cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: gus: Remove unused gus_instr.cTakashi Iwai2014-12-261-172/+0
| | | | | | | | | | | | The instrument layer codes have been dropped years ago, but this file was left intentionally with a slight hope for the new implementations. But, looking at the reality, the probability we'll have a new code for ISA GUS board is very low, and I won't bet it. So, rather clean this legacy stuff up. Developers can still refer to the old code via git history. Reported-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sb: Deletion of unnecessary checks before two function callsMarkus Elfring2014-11-212-4/+2
| | | | | | | | | | | The functions release_and_free_resource() and snd_util_memhdr_free() test whether their argument is NULL and then return immediately. 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: es1688_lib: Deletion of an unnecessary check before the function call ↵Markus Elfring2014-11-211-2/+1
| | | | | | | | | | | | "release_and_free_resource" The release_and_free_resource() function tests whether its argument is NULL and then returns immediately. 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: es18xx: Add GPO controlsOndrej Zary2014-11-041-10/+42
| | | | | | | | | | | | | Add GPO0 and GPO1 (General Purpose Outputs) controls to mixer. These can be used on some cards to control amplifier mute (seen in ES1868 datasheet) or additional onboard chips such as QX2130 QXpander processor. These GPOs are present on ES1868, ES1869, ES1887 and ES1888 chips. Tested on ES1868 with QX2130. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: wss: Use snd_ctl_enum_info()Takashi Iwai2014-10-211-11/+5
| | | | | | ... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sb16: Use snd_ctl_enum_info()Takashi Iwai2014-10-212-33/+8
| | | | | | ... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: msnd: Use snd_ctl_enum_info()Takashi Iwai2014-10-211-9/+2
| | | | | | ... and reduce the open codes. Also add missing const to the text array. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: es18xx: Use snd_ctl_enum_info()Takashi Iwai2014-10-211-21/+5
| | | | | | ... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: es1688: Use snd_ctl_enum_info()Takashi Iwai2014-10-211-8/+2
| | | | | | | ... and reduce the open codes. Also correct the array size and add missing const. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ad1816a: Use snd_ctl_enum_info()Takashi Iwai2014-10-211-8/+2
| | | | | | ... and reduce the open codes. Also add missing const to the text array. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: gus: remove checks for CONFIG_SND_DEBUG_ROMPaul Bolle2014-05-301-6/+0
| | | | | | | | | Checks for CONFIG_SND_DEBUG_ROM were added in v2.5.5 but a Kconfig symbol SND_DEBUG_ROM was never added. These checks have always evaluated to false. Remove them and the printk()s they hide. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sb_mixer: missing return statementDan Carpenter2014-05-141-6/+8
| | | | | | | | | The if condition here was supposed to return on error but the return statement is missing. The effect is that the ->mixername is set to "???" instead of "DT019X". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: es18xx driver should use udelay errorLi, Zhen-Hua2014-04-141-5/+5
| | | | | | | | | | udelay with more than 20000 may cause __bad_udelay. Use mdelay for instead. [fixed a typo spotted by Clemens -- tiwai] Signed-off-by: Li, Zhen-Hua <zhen-hual@hp.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAPUwe Kleine-König2014-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | If the renamed symbol is defined lib/iomap.c implements ioport_map and ioport_unmap and currently (nearly) all platforms define the port accessor functions outb/inb and friend unconditionally. So HAS_IOPORT_MAP is the better name for this. Consequently NO_IOPORT is renamed to NO_IOPORT_MAP. The motivation for this change is to reintroduce a symbol HAS_IOPORT that signals if outb/int et al are available. I will address that at least one merge window later though to keep surprises to a minimum and catch new introductions of (HAS|NO)_IOPORT. The changes in this commit were done using: $ git grep -l -E '(NO|HAS)_IOPORT' | xargs perl -p -i -e 's/\b((?:CONFIG_)?(?:NO|HAS)_IOPORT)\b/$1_MAP/' Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ALSA: isa: Convert to snd_card_new() with a device pointerTakashi Iwai2014-02-1226-136/+96
| | | | | | Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: isa: not allocating enough spaceDan Carpenter2013-11-131-1/+1
| | | | | | | | We allocate only 4 bytes here "sizeof(int)" instead of WF_MSAMPLE_BYTES (259) which was intended. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: msnd: Avoid duplicated driver nameTakashi Iwai2013-11-121-2/+2
| | | | | | | | | | | | | | | | | msnd_pinnacle.c is used for both snd-msnd-pinnacle and snd-msnd-classic drivers, and both should have different driver names. Using the same driver name results in the sysfs warning for duplicated entries like kobject: 'msnd-pinnacle.7' (cec33408): kobject_release, parent (null) (delayed) kobject: 'msnd-pinnacle' (cecd4980): kobject_release, parent cf3ad9b0 (delayed) ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1 at fs/sysfs/dir.c:486 sysfs_warn_dup+0x7d/0xa0() sysfs: cannot create duplicate filename '/bus/isa/drivers/msnd-pinnacle' ...... Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: sb16 - info leak in snd_sb_csp_ioctl()Dan Carpenter2013-11-071-0/+1
| | | | | | | | There is a 2 byte hole after "info.func_nr" so we could leak unitialized stack information to userspace. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: cmi8328: Fix compile warnings without CONFIG_PMTakashi Iwai2013-11-061-0/+2
| | | | | | | | | Just add an ifdef CONFIG_PM to shut up the warnings: sound/isa/cmi8328.c:129:13: warning: ‘snd_cmi8328_cfg_save’ defined but not used [-Wunused-function] sound/isa/cmi8328.c:136:13: warning: ‘snd_cmi8328_cfg_restore’ defined but not used [-Wunused-function] Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linusMark Brown2013-09-111-2/+1
|\
| * ALSA: don't push static constants on stack for %*phAndy Shevchenko2013-08-081-2/+1
| | | | | | | | | | | | | | | | There is no need to pass constants via stack. The width may be explicitly specified in the format. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: opti9xx: Fix conflicting driver object nameTakashi Iwai2013-08-281-6/+2
|/ | | | | | | | | | | | | | | | | | | | The recent commit to delay the release of kobject triggered NULL dereferences of opti9xx drivers. The cause is that all snd-opti92x-ad1848, snd-opti92x-cs4231 and snd-opti93x drivers register the PnP card driver with the very same name, and also snd-opti92x-ad1848 and -cs4231 drivers register the ISA driver with the same name, too. When these drivers are built in, quick "register-release-and-re-register" actions occur, and this results in Oops because of the same name is assigned to the kobject. The fix is simply to assign individual names. As a bonus, by using KBUILD_MODNAME, the patch reduces more lines than it adds. The fix is based on the suggestion by Russell King. Reported-and-tested-by: Fengguang Wu <fengguang.wu@intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ISA: Remove superfluous *_set_drvdata(NULL) callsTakashi Iwai2013-05-2923-26/+0
| | | | | | | | Similarly like the previous commit for PCI drivers, remove dev_set_drvdata(NULL) and pnp_set_drvdata(NULL) calls in ISA drivers now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: Remove the rest of __devinit* in commentsTakashi Iwai2012-12-071-4/+4
| | | | | | | | Remove the leftover __devinit* in comments. They have been commented out because they couldn't fit with __dev* although they should have matched. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: isa: remove __dev* attributesBill Pemberton2012-12-0733-432/+433
| | | | | | | | | | | 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>
* Merge branch 'for-linus' into for-nextTakashi Iwai2012-10-301-1/+0
|\ | | | | | | ... for migrating the core changes for USB-audio disconnection fixes
| * ALSA: sound/isa/opti9xx/miro.c: eliminate possible double freeJulia Lawall2012-10-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snd_miro_probe is a static function that is only called twice in the file that defines it. At each call site, its argument is freed using snd_card_free. Thus, there is no need for snd_miro_probe to call snd_card_free on its argument on any of its error exit paths. Because snd_card_free both reads the fields of its argument and kfrees its argments, the results of the second snd_card_free should be unpredictable. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ identifier f,free,a; parameter list[n] ps; type T; expression e; @@ f(ps,T a,...) { ... when any when != a = e if(...) { ... free(a); ... return ...; } ... when any } @@ identifier r.f,r.free; expression x,a; expression list[r.n] xs; @@ * x = f(xs,a,...); if (...) { ... free(a); ... return ...; } // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* | ALSA: sound/isa: remove CONFIG_EXPERIMENTALKees Cook2012-10-251-2/+2
|/ | | | | | | | | This config item has not carried much meaning for a while now and is almost always enabled by default. As agreed during the Linux kernel summit, remove it. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* sound: Remove unnecessary semicolonPeter Senna Tschudin2012-10-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r1@ statement S; position p,p1; @@ S@p1;@p @script:python r2@ p << r1.p; p1 << r1.p1; @@ if p[0].line != p1[0].line_end: cocci.include_match(False) @@ position r1.p; @@ -;@p // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>