1
0
Fork 0
Commit Graph

126 Commits (362b334b17943d84d2878d2733f0ce695d45a2b6)

Author SHA1 Message Date
Bhumika Goyal aec5465485 ALSA: isa: make snd_pcm_hardware const
Make these const as they are only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-17 12:44:11 +02:00
Arvind Yadav e6a76e2fda ALSA: sb16: constify pnp_card_device_id
pnp_card_device_id are not supposed to change at runtime. All functions
working with pnp_card_device_id provided by <linux/pnp.h> work with
const pnp_card_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-17 12:42:29 +02:00
Julia Lawall c9480d055e sound: emu8000: constify emu8000_ops
The structure emu8000_ops is only copied into another structure, so
it can be const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-15 08:21:51 +02:00
Arvind Yadav 991768532d ALSA: sb8: constify snd_pcm_ops structures
snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-12 23:44:17 +02:00
Arvind Yadav 3066ad553d ALSA: sb16: constify snd_pcm_ops structures
snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-12 23:44:16 +02:00
Arvind Yadav 84c8f90f0d ALSA: emu8000: constify snd_pcm_ops structures
snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-08-12 23:44:15 +02:00
Takashi Iwai 111b0cdb97 ALSA: seq: Allow the modular sequencer registration
Many drivers bind the sequencer stuff in off-load by another driver
module, so that it's loaded only on demand.  In the current code, this
mechanism doesn't work when the driver is built-in while the sequencer
is module.  We check with IS_REACHABLE() and enable only when the
sequencer is in the same level of build.

However, this is basically a overshoot.  The binder code
(snd-seq-device) is an individual module from the sequencer core
(snd-seq), and we just have to make the former a built-in while
keeping the latter a module for allowing the scenario like the above.

This patch achieves that by rewriting Kconfig slightly.  Now, a driver
that provides the manual sequencer device binding should select
CONFIG_SND_SEQ_DEVICE in a way as
	select SND_SEQ_DEVICE if SND_SEQUENCER != n

Note that the "!=n" is needed here to avoid the influence of the
sequencer core is module while the driver is built-in.

Also, since rawmidi.o may be linked with snd_seq_device.o when
built-in, we have to shuffle the code to make the linker happy.
(the kernel linker isn't smart enough yet to handle such a case.)
That is, snd_seq_device.c is moved to sound/core from sound/core/seq,
as well as Makefile.

Last but not least, the patch replaces the code using IS_REACHABLE()
with IS_ENABLED(), since now the condition meets always when enabled.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-12 08:43:33 +02:00
Takashi Iwai 3d774d5ef0 ALSA: seq: Allow the tristate build of OSS emulation
Currently OSS sequencer emulation is tied with ALSA sequencer core,
both are built in the same level; i.e. when CONFIG_SND_SEQUENCER=y,
the OSS sequencer emulation is also always built-in, even though the
functionality can be built as an individual module.

This patch changes the rule and allows users to build snd-seq-oss
module while others are built-in.  Essentially, it's just a few simple
changes in Kconfig and Makefile.  Some driver codes like opl3 need to
convert from the simple ifdef to IS_ENABLED().  But that's all.

You might wonder how about the dependency: right, it can be messy, but
it still works.  Since we rewrote the sequencer binding with the
standard bus, the driver can be bound at any time on demand.  So, the
synthesizer driver module can be loaded individually from the OSS
emulation core before/after it.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-09 22:09:45 +02:00
Takashi Iwai b078bbfbb1 ALSA: sb: Constify hw_constraints
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-09 10:42:48 +02:00
Takashi Iwai 4b83eff81c ALSA: sb: Convert to the new PCM ops
Replace the copy and the silence ops with the new PCM ops.
For avoiding the code redundancy, slightly hackish macros are
introduced.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-06-02 19:38:02 +02:00
Takashi Sakamoto 6dbaf8b913 ALSA: sb: remove needless evaluation in implementation for copy callback
In design of ALSA pcm core, 'struct snd_pcm_ops.copy' is expected to
copy PCM frames, according to frame alignment on intermediate buffer for
userspace and dedicated buffer for data transmission. In this callback,
value of 'channel' argument depends on the frame alignment, which drivers
registers to runtime of PCM substream. When target devices can handle
non-interleaved buffer, this value has positive value, otherwise negative.

ALSA driver for PCM component of EMU8000 chip is programmed with local
macro to switch the frame alignment. The 'copy' operation in
non-interleaved side has evaluation of the 'channel' argument (actually
it's 'voice' argument). This is useless.

This commit remove the evaluation.

[tiwai: the negative channel argument was the inheritance from the old
 code where -1 was meant for interleaved mode.  The mix-up was dropped
 meanwhile, thus it's correct to assume that we receive no longer -1
 there, and it's safe to cleanup the relevant code.

 Also, voice=0 for channel==1 is trivial, and it can be dropped, too.]

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-24 23:49:38 +02:00
Bhumika Goyal 3a84d6c940 ALSA: sound/isa: constify snd_kcontrol_new structures
Declare snd_kcontrol_new structures as const as they are only passed an
argument to the function snd_ctl_new1. This argument is of type const,
so snd_kcontrol_new structures having this property can be made const.
Done using Coccinelle:

@r disable optional_qualifier@
identifier x;
position p;
@@
static struct snd_kcontrol_new x@p={...};

@ok@
identifier r.x;
position p;
@@
snd_ctl_new1(&x@p,...)

@bad@
position p != {r.p,ok.p};
identifier r.x;
@@
x@p

@depends on !bad disable optional_qualifier@
identifier r.x;
@@
+const
struct snd_kcontrol_new x;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-21 09:07:56 +02:00
Takashi Iwai a0af56de2c ALSA: sb: Use IS_REACHABLE()
Replace the complex ifdef conditions with IS_REACHABLE() macro.
No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-05-17 07:13:06 +02:00
David Howells e992ef5705 Annotate hardware config module parameters in sound/isa/
When the kernel is running in secure boot mode, we lock down the kernel to
prevent userspace from modifying the running kernel image.  Whilst this
includes prohibiting access to things like /dev/mem, it must also prevent
access by means of configuring driver modules in such a way as to cause a
device to access or modify the kernel image.

To this end, annotate module_param* statements that refer to hardware
configuration and indicate for future reference what type of parameter they
specify.  The parameter parser in the core sees this information and can
skip such parameters with an error message if the kernel is locked down.
The module initialisation then runs as normal, but just sees whatever the
default values for those parameters is.

Note that we do still need to do the module initialisation because some
drivers have viable defaults set in case parameters aren't specified and
some drivers support automatic configuration (e.g. PNP or PCI) in addition
to manually coded parameters.

This patch annotates drivers in sound/isa/.

Suggested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Jaroslav Kysela <perex@perex.cz>
cc: Takashi Iwai <tiwai@suse.com>
cc: alsa-devel@alsa-project.org
2017-04-20 12:02:32 +01:00
Ingo Molnar 174cd4b1e5 sched/headers: Prepare to move signal wakeup & sigpending methods from <linux/sched.h> into <linux/sched/signal.h>
Fix up affected files that include this signal functionality via sched.h.

Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
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>
2017-03-02 08:42:32 +01:00
Takashi Iwai 9021b2b8fd ALSA: isa: Constify snd_rawmidi_ops
Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi,
we can constify the definitions.

Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-01-12 12:50:16 +01:00
William Breathitt Gray fc733cf98c ALSA: jazz16: Utilize the module_isa_driver macro
This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-01 07:35:46 +02:00
William Breathitt Gray bb974b8f7b ALSA: sb8: Utilize the module_isa_driver macro
This driver does not do anything special in module init/exit. This patch
eliminates the module init/exit boilerplate code by utilizing the
module_isa_driver macro.

Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-06-01 07:35:45 +02:00
Takashi Iwai 056622053b ALSA: seq: Define driver object in each driver
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-02-12 14:15:54 +01:00
Takashi Iwai 976412fbc9 ALSA: Include linux/uaccess.h and linux/bitopts.h instead of asm/*
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 17:25:07 +01:00
Takashi Iwai 6cbbfe1c8d ALSA: Include linux/io.h instead of asm/io.h
Nowadays it's recommended.  Replace all in a shot.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-28 16:49:33 +01:00
Takashi Iwai f05b412773 ALSA: sb: Use setup_timer() and mod_timer()
No functional change, refactoring with the standard helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-01-19 11:32:28 +01:00
David Flater d2866409ba ALSA: log emu8000 DRAM size at level INFO
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-12 14:30:00 +01:00
David Flater 1730fd9cce ALSA: fix emu8000 DRAM sizing for AWE64 Value
Applicable to any kernel since 2013:

The special case added in commit 1338fc97d0 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-12 14:28:56 +01:00
Markus Elfring b76c0e95ab ALSA: sb: Delete an unnecessary check before the function call "snd_emux_free"
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-04 15:13:32 +01:00
Lars-Peter Clausen 92533f1888 ASoC: sb16: Simplify snd_sb16dsp_pcm()
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-02 16:28:35 +01:00
Lars-Peter Clausen 8c77629996 ALSA: sb8: Remove always NULL parameters
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-02 16:28:21 +01:00
Markus Elfring 966b7bc935 ALSA: sb: Deletion of unnecessary checks before two function calls
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-21 20:07:36 +01:00
Takashi Iwai 6b9e1288a5 ALSA: sb16: Use snd_ctl_enum_info()
... and reduce the open codes.  Also add missing const to text arrays.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-10-21 08:34:52 +02:00
Dan Carpenter 665ebe926e ALSA: sb_mixer: missing return statement
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-05-14 16:46:48 +02:00
Takashi Iwai 4323cc4d5b ALSA: isa: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-02-12 10:58:21 +01:00
Dan Carpenter bffbbc0a2c ALSA: sb16 - info leak in snd_sb_csp_ioctl()
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-07 10:17:18 +01:00
Takashi Iwai 8b5a1f9c46 ALSA: ISA: Remove superfluous *_set_drvdata(NULL) calls
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>
2013-05-29 12:50:28 +02:00
Takashi Iwai 6a0f56a784 ALSA: Remove the rest of __devinit* in comments
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-07 07:41:56 +01:00
Bill Pemberton 1bff292e9a ALSA: isa: remove __dev* attributes
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-12-07 07:32:17 +01:00
Peter Senna Tschudin 395d9dd5dd sound: Remove unnecessary semicolon
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-10-06 16:47:53 +02:00
David Flater 1338fc97d0 ALSA: emu8000: fix emu8000 DRAM sized 512 KiB too small
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-28 19:58:12 +02:00
Jesper Juhl 226e01ef0d ALSA: emu8000: Remove duplicate linux/moduleparam.h include from emu8000_patch.c
The header 'linux/moduleparam.h' is included twice in
'sound/isa/sb/emu8000_patch.c'. Once is enough.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-06 10:22:54 +01:00
Rusty Russell a67ff6a540 ALSA: module_param: make bool parameters really bool
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>
2011-12-19 10:34:41 +01:00
Paul Gortmaker d81a6d7176 sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where needed
These aren't modules, but they do make use of these macros, so
they will need export.h to get that definition.  Previously,
they got it via the implicit module.h inclusion.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:22 -04:00
Paul Gortmaker da155d5b40 sound: Add module.h to the previously silent sound users
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>
2011-10-31 19:31:21 -04:00
Paul Gortmaker 31623caaf0 sound: add moduleparam.h to users of module_param/MODULE_PARM_DESC
These files were getting access to these two via the implicit
presence of moduleparam.h everywhere.  But that is being fixed, so
get these guys what they need in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:20 -04:00
Paul Gortmaker 65a772172b sound: fix drivers needing module.h not moduleparam.h
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>
2011-10-31 19:31:19 -04:00
Yong Zhang 88e24c3a4b sound: irq: Remove IRQF_DISABLED
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-22 11:19:20 +02:00
Clemens Ladisch dba8b46992 ALSA: mpu401: clean up interrupt specification
The semantics of snd_mpu401_uart_new()'s interrupt parameters are
somewhat counterintuitive:  To prevent the function from allocating its
own interrupt, either the irq number must be invalid, or the irq_flags
parameter must be zero.  At the same time, the irq parameter being
invalid specifies that the mpu401 code has to work without an interrupt
allocated by the caller.  This implies that, if there is an interrupt
and it is allocated by the caller, the irq parameter must be set to
a valid-looking number which then isn't actually used.

With the removal of IRQF_DISABLED, zero becomes a valid irq_flags value,
which forces us to handle the parameters differently.

This patch introduces a new flag MPU401_INFO_IRQ_HOOK for when the
device interrupt is handled by the caller, and makes the allocation of
the interrupt to depend only on the irq parameter.  As suggested by
Takashi, the irq_flags parameter was dropped because, when used, it had
the constant value IRQF_DISABLED.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-09-14 11:00:51 +02:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Joe Perches 9fe856e47e sound: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-09-07 08:05:59 +02:00
Kulikov Vasiliy 5157cc8113 ALSA: sb: check get_user() return value
get_user() may fail, if so return -EFAULT.

[Fixed one missing place by tiwai]

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-29 12:24:22 +02:00
Krzysztof Helt a20971b201 ALSA: Merge es1688 and es968 drivers
The ESS ES968 chip is nothing more then a PnP companion
for a non-PnP audio chip. It was paired with non-PnP ESS' chips:
ES688 and ES1688. The ESS' audio chips are handled by the es1688
driver in native mode. The PnP cards are handled by the ES968
driver in SB compatible mode.

Move the ES968 chip handling to the es1688 driver so the driver
can handle both PnP and non-PnP cards. The es968 is removed.

Also, a new PnP id is added for the card I acquired (the change
was tested on this card).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-10 09:49:30 +02:00
Krzysztof Helt 867f1845c5 ALSA: es968: fix wrong PnP dma index
There is only one dma for the ESS ES968 based board.
Its index is 0 and not 1.

This make the es968 card working.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-26 09:05:44 +02:00