Commit Graph

12 Commits

Author SHA1 Message Date
Takashi Iwai 2451dcefc2 ALSA: ak411x: Fix stall in work callback
commit 4161b4505f upstream.

When ak4114 work calls its callback and the callback invokes
ak4114_reinit(), it stalls due to flush_delayed_work().  For avoiding
this, control the reentrance by introducing a refcount.  Also
flush_delayed_work() is replaced with cancel_delayed_work_sync().

The exactly same bug is present in ak4113.c and fixed as well.

Reported-by: Pavel Hofman <pavel.hofman@ivitera.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Tested-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-11 14:54:49 +08:00
Takashi Iwai e12483e0f3 ALSA: ak4114: Fix wrong register array size
The size of the register cache array is actually 6 instead of 7,
as it caches up to AK4114_REG_INT1_MASK.  This resulted in unexpected
access out of array range, although most of them aren't so serious
(just reading one more byte on the stack at snd_ak4114_create()).

Also, the check of cache size was wrongly done by checking with
sizeof() instead of ARRAY_SIZE().  Fixed this together.

(And yes, hardcoded numbers are bad, but I keep the coding style as is
 for making it clear what this patch actually does.)

Spotted by coverity among several CIDs, e.g. 711621.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-29 16:42:36 +01:00
Pavel Hofman c0a9eedf9a ALSA: ak4114 - fix errors in output selector bits
* the previous version had a typo - values of AK4114_OPS10-12 were
  identical with AK4114_OPS00-02
* Since no cards actually use this feature, the bug was not identified earlier

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-09-21 15:44:39 +02:00
Pavel Hofman 841b23d4d7 [ALSA] some fixes and cleanup for ICE1724 cards
* removing the hack with NON_AKM ak4xxx type
* support for card-specific flags in ak4114_stats
* definition of the flags for corresponding cards

Signed-off-by: Pavel Hofman <dustin@seznam.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Jaroslav Kysela c1017a4cdb [ALSA] Changed Jaroslav Kysela's e-mail from perex@suse.cz to perex@perex.cz
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-10-16 16:51:18 +02:00
Pavel Hofman c4116ae717 [ALSA] Fix misc bugs in i2c/others/ak4114.c
* correct register for 'IEC958 Non-PCM Bitstream', 'IEC958 DTS Bitstream'
  to use AK4114_REG_RCS0
* correct check for control name: if (strstr(kctl->id.name, 'Playback'))
* correct check: if (!chip->init) in snd_ak4114_external_rate
* added PCM control 'IEC958 PPL Lock Status'

Signed-off-by: Pavel Hofman <dustin@seznam.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:57 +02:00
Takashi Iwai 6d5fc07aee [ALSA] ak4114 - Fix a typo in DIF2 bit definition
Fixed a typo in AK4114_DIF2 bit definition.  This may fix some
problems for Audiophile 192 and Juli boards.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-05-11 16:55:53 +02:00
Takashi Iwai 517400cbc7 [ALSA] Add some more 'const', but needs changes in i2c/other/ak4*
Make data passed to ak4xxx_create 'const'.
Signed-of-by: Philipp Matthias Hahn <pmhahn@pmhahn.de>

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:03:17 +01:00
Takashi Iwai 4014c38bd9 [ALSA] ak4114 - Use global workqueue
Use global workqueue for simplicity instead of own workqueue.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
2007-02-09 09:02:41 +01:00
David Howells c4028958b6 WorkStruct: make allyesconfig
Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:57:56 +00:00
Takashi Iwai dc4cafbada [ALSA] Remove xxx_t typedefs: I2C drivers
Modules: AK4114 receiver,AK4117 receiver,AK4XXX AD/DA converters

[Missing files in last commit]
Remove xxx_t typedefs from the i2c drivers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2006-01-03 12:18:09 +01:00
Linus Torvalds 1da177e4c3 Linux-2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
2005-04-16 15:20:36 -07:00