aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-06-12ALSA: gus: use swap() in snd_ics_put_double()Fabian Frederick1-6/+3
Use kernel.h macro definition. Thanks to Julia Lawall for Coccinelle scripting support. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-03-24sound: Deparenthesize negative error returnsJoe Perches2-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>
2015-03-09Merge branch 'for-linus' into for-nextTakashi Iwai1-1/+2
Merging the HD-audio fixes back to base devel branch for further working on it.
2015-03-05ALSA: msnd: add some missing curly bracesDan Carpenter1-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>
2015-02-12ALSA: seq: Define driver object in each driverTakashi Iwai1-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>
2015-01-28ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/*Takashi Iwai2-2/+2
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: Include linux/io.h instead of asm/io.hTakashi Iwai18-19/+18
Nowadays it's recommended. Replace all in a shot. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28ALSA: sscape: add missing include of linux/io.hArnd Bergmann1-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>
2015-01-19ALSA: wavefront: Use setup_timer() and mod_timer()Takashi Iwai1-7/+5
No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-19ALSA: sb: Use setup_timer() and mod_timer()Takashi Iwai2-14/+8
No functional change, refactoring with the standard helpers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-12ALSA: log emu8000 DRAM size at level INFODavid Flater1-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>
2015-01-12ALSA: fix emu8000 DRAM sizing for AWE64 ValueDavid Flater1-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>
2015-01-04ALSA: Deletion of checks before the function call "iounmap"Markus Elfring1-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>
2015-01-04ALSA: sb: Delete an unnecessary check before the function call "snd_emux_free"Markus Elfring1-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>
2015-01-02ALSA: wss: Remove (almost) always NULL parametersLars-Peter Clausen16-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>
2015-01-02ASoC: sb16: Simplify snd_sb16dsp_pcm()Lars-Peter Clausen3-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>
2015-01-02ALSA: sb8: Remove always NULL parametersLars-Peter Clausen4-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>
2015-01-02ALSA: msnd: Remove always NULL parameterLars-Peter Clausen3-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>
2015-01-02ALSA: gus: Remove always NULL parametersLars-Peter Clausen6-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>
2015-01-02ALSA: es18xx: Remove always NULL parameterLars-Peter Clausen1-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>
2015-01-02ALSA: es1688: Remove almost always NULL parameterLars-Peter Clausen3-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>
2015-01-02ALSA: ad1816a: Remove always NULL parametersLars-Peter Clausen2-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>
2014-12-26ALSA: gus: Remove unused gus_instr.cTakashi Iwai1-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>
2014-11-21ALSA: sb: Deletion of unnecessary checks before two function callsMarkus Elfring2-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>
2014-11-21ALSA: es1688_lib: Deletion of an unnecessary check before the function call "release_and_free_resource"Markus Elfring1-2/+1
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>
2014-11-04ALSA: es18xx: Add GPO controlsOndrej Zary1-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>
2014-10-21ALSA: wss: Use snd_ctl_enum_info()Takashi Iwai1-11/+5
... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: sb16: Use snd_ctl_enum_info()Takashi Iwai2-33/+8
... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: msnd: Use snd_ctl_enum_info()Takashi Iwai1-9/+2
... and reduce the open codes. Also add missing const to the text array. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: es18xx: Use snd_ctl_enum_info()Takashi Iwai1-21/+5
... and reduce the open codes. Also add missing const to text arrays. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: es1688: Use snd_ctl_enum_info()Takashi Iwai1-8/+2
... and reduce the open codes. Also correct the array size and add missing const. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21ALSA: ad1816a: Use snd_ctl_enum_info()Takashi Iwai1-8/+2
... and reduce the open codes. Also add missing const to the text array. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-30ALSA: gus: remove checks for CONFIG_SND_DEBUG_ROMPaul Bolle1-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>
2014-05-14ALSA: sb_mixer: missing return statementDan Carpenter1-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>
2014-04-14ALSA: es18xx driver should use udelay errorLi, Zhen-Hua1-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>
2014-04-07Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAPUwe Kleine-König1-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>
2014-02-12ALSA: isa: Convert to snd_card_new() with a device pointerTakashi Iwai26-136/+96
Also remove superfluous snd_card_set_dev() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-13ALSA: isa: not allocating enough spaceDan Carpenter1-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>
2013-11-12ALSA: msnd: Avoid duplicated driver nameTakashi Iwai1-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>
2013-11-07ALSA: sb16 - info leak in snd_sb_csp_ioctl()Dan Carpenter1-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>
2013-11-06ALSA: cmi8328: Fix compile warnings without CONFIG_PMTakashi Iwai1-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>
2013-09-11Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linusMark Brown1-2/+1
2013-08-28ALSA: opti9xx: Fix conflicting driver object nameTakashi Iwai1-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>
2013-08-08ALSA: don't push static constants on stack for %*phAndy Shevchenko1-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>
2013-05-29ALSA: ISA: Remove superfluous *_set_drvdata(NULL) callsTakashi Iwai23-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>
2012-12-07ALSA: Remove the rest of __devinit* in commentsTakashi Iwai1-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>
2012-12-07ALSA: isa: remove __dev* attributesBill Pemberton33-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>
2012-10-30Merge branch 'for-linus' into for-nextTakashi Iwai1-1/+0
... for migrating the core changes for USB-audio disconnection fixes
2012-10-25ALSA: sound/isa: remove CONFIG_EXPERIMENTALKees Cook1-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>
2012-10-21ALSA: sound/isa/opti9xx/miro.c: eliminate possible double freeJulia Lawall1-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>