summaryrefslogtreecommitdiff
path: root/sound/isa
AgeCommit message (Collapse)AuthorFilesLines
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 ↵Markus Elfring1-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>
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-08Kconfig: 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>
2012-10-06sound: Remove unnecessary semicolonPeter Senna Tschudin2-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>
2012-08-28ALSA: emu8000: fix emu8000 DRAM sized 512 KiB too smallDavid Flater1-3/+12
v2: Fixed result still wrong in the case of 512 KiB DRAM. Oops. Applicable to 3.5.3 mainline. In emu8000.c, size_dram determines the amount of memory on the sound card by doing write/readback tests starting at 512 KiB and incrementing by 512 KiB. On success, detected_size is updated to the successful address and testing continues. On failure, the loop is immediately exited. The resulting detected_size is 512 KiB too small except in two special cases: 1. If there is no memory, the initial 0 value of detected_size is used, which is correct. 2. If the address space wraps around, detected_size is updated before the bailout, so the result is correct. The patch corrects all cases and was tested with an AWE64 Gold. Before: EMU8000 [0x620]: 3584 Kb on-board memory detected asfxload 4GMGSMT.SF2 (4174814 B) fails. After: EMU8000 [0x620]: 4096 Kb on-board memory detected asfxload 4GMGSMT.SF2 succeeds. I do not have a card with 512 KiB to test with, but by forcibly enabling the added conditional I verified on the AWE64 Gold that it detects 512 KiB (successfully reading from the first memory location) and does not hang the card. C.f. Bug 46451 https://bugzilla.kernel.org/show_bug.cgi?id=46451 Signed-off-by: David Flater <dave@flaterco.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-28Merge branch 'for-linus' into for-nextTakashi Iwai1-1/+1
Need to merge the fixes regarding EPSS. Conflicts: sound/pci/hda/hda_codec.c
2012-08-24ALSA: cmi8328: Fix build error with CONFIG_GAMEPORT=nTakashi Iwai1-1/+2
sound/isa/cmi8328.c: In function 'snd_cmi8328_remove': sound/isa/cmi8328.c:416:24: error: 'cmi' undeclared (first use in this function) sound/isa/cmi8328.c:416:24: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [sound/isa/cmi8328.o] Error 1 Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-21ALSA: introduce snd-cmi8328: C-Media CMI8328 driverOndrej Zary3-0/+496
Introduce snd-cmi8328 driver for C-Media CMI8328-based sound cards, such as AudioExcel AV500. It supports PCM playback and capture (full-duplex) through wss_lib, gameport, OPL3 and MPU401. The AV500 card has onboard Dream wavetable synth connected to the MPU401 port and Aux 1 input internally which works too. The CDROM interface is not supported (as the drivers for these CDROMs were removed from the kernel some time ago). A separate driver is needed because CMI8328 is completely different chip to CMI8329/CMI8330. It's configured by magic registers (there's no PnP). Sound is provided by a real WSS codec (CS4231A) and the SB part is just a SB Pro emulation (for DOS games, useless for Linux). When SB is enabled, the CMI8328 chip disables access to the WSS codec, emulates SoundBlaster on one side and outputs sound data to the codec - so SB and WSS can't work together with this card. The WSS codec can do full duplex by itself so there's no need for crazy things like snd-cmi8330 does (combining SB and WSS parts into one driver). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>