diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 11:58:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-01 11:58:44 -0500 |
commit | 524df55725217b13d5a232fb5badb5846418ea0e (patch) | |
tree | c041613577ac7e68737cfd8af16a37d1ed37e6af /sound/oss | |
parent | 0f4533979473a456a8adb3869365e12c7a99cf65 (diff) | |
parent | 6679ee1870f7ccdd48e2e5c57919240b8f19a6dc (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (252 commits)
ASoC: Check progress when reporting periods from i.MX FIQ handler
ASoC: Remove a unused variables from i.MX FIQ runtime data
ALSA: hda - Add/fix ALC269 FSC and Quanta models
ALSA: hda - Add ALC670 codec support
OMAP4: PMIC: Add support for twl6030 codec
ALSA: hda - remove unnecessary msleep on power state transitions
usb/gadget/{f_audio,gmidi}.c: follow recent changes in audio.h
ASoC: fsi: Modify over/under run error settlement
ASoC: OMAP4: Add McPDM platform driver
ASoC: OMAP4: Add support for McPDM
ASoC: OMAP: data_type and sync_mode configurable in audio dma
ALSA: hda - Add missing description in HD-Audio-Models.txt
ALSA: add support for Macbook Air 2,1 internal speaker
ALSA: usbaudio: consolidate header files
ALSA: usbmixer: bail out early when parsing audio class v2 descriptors
ALSA: usbaudio: implement basic set of class v2.0 parser
ALSA: usbaudio: introduce new types for audio class v2
ALSA: usbaudio: parse USB descriptors with structs
ALSA: hda - enable snoop for Intel Cougar Point
ALSA: hda - Remove identical definitions for macmini3 model
...
Diffstat (limited to 'sound/oss')
-rw-r--r-- | sound/oss/kahlua.c | 2 | ||||
-rw-r--r-- | sound/oss/soundcard.c | 35 |
2 files changed, 23 insertions, 14 deletions
diff --git a/sound/oss/kahlua.c b/sound/oss/kahlua.c index 89466b056be7..24d152ccf80d 100644 --- a/sound/oss/kahlua.c +++ b/sound/oss/kahlua.c | |||
@@ -198,7 +198,7 @@ MODULE_LICENSE("GPL"); | |||
198 | * 5530 only. The 5510/5520 decode is different. | 198 | * 5530 only. The 5510/5520 decode is different. |
199 | */ | 199 | */ |
200 | 200 | ||
201 | static struct pci_device_id id_tbl[] = { | 201 | static DEFINE_PCI_DEVICE_TABLE(id_tbl) = { |
202 | { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_AUDIO), 0 }, | 202 | { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_AUDIO), 0 }, |
203 | { } | 203 | { } |
204 | }; | 204 | }; |
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c index c62530943888..fde7c12fe5da 100644 --- a/sound/oss/soundcard.c +++ b/sound/oss/soundcard.c | |||
@@ -328,11 +328,11 @@ static int sound_mixer_ioctl(int mixdev, unsigned int cmd, void __user *arg) | |||
328 | return mixer_devs[mixdev]->ioctl(mixdev, cmd, arg); | 328 | return mixer_devs[mixdev]->ioctl(mixdev, cmd, arg); |
329 | } | 329 | } |
330 | 330 | ||
331 | static int sound_ioctl(struct inode *inode, struct file *file, | 331 | static long sound_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
332 | unsigned int cmd, unsigned long arg) | ||
333 | { | 332 | { |
334 | int len = 0, dtype; | 333 | int len = 0, dtype; |
335 | int dev = iminor(inode); | 334 | int dev = iminor(file->f_dentry->d_inode); |
335 | long ret = -EINVAL; | ||
336 | void __user *p = (void __user *)arg; | 336 | void __user *p = (void __user *)arg; |
337 | 337 | ||
338 | if (_SIOC_DIR(cmd) != _SIOC_NONE && _SIOC_DIR(cmd) != 0) { | 338 | if (_SIOC_DIR(cmd) != _SIOC_NONE && _SIOC_DIR(cmd) != 0) { |
@@ -353,6 +353,7 @@ static int sound_ioctl(struct inode *inode, struct file *file, | |||
353 | if (cmd == OSS_GETVERSION) | 353 | if (cmd == OSS_GETVERSION) |
354 | return __put_user(SOUND_VERSION, (int __user *)p); | 354 | return __put_user(SOUND_VERSION, (int __user *)p); |
355 | 355 | ||
356 | lock_kernel(); | ||
356 | if (_IOC_TYPE(cmd) == 'M' && num_mixers > 0 && /* Mixer ioctl */ | 357 | if (_IOC_TYPE(cmd) == 'M' && num_mixers > 0 && /* Mixer ioctl */ |
357 | (dev & 0x0f) != SND_DEV_CTL) { | 358 | (dev & 0x0f) != SND_DEV_CTL) { |
358 | dtype = dev & 0x0f; | 359 | dtype = dev & 0x0f; |
@@ -360,24 +361,31 @@ static int sound_ioctl(struct inode *inode, struct file *file, | |||
360 | case SND_DEV_DSP: | 361 | case SND_DEV_DSP: |
361 | case SND_DEV_DSP16: | 362 | case SND_DEV_DSP16: |
362 | case SND_DEV_AUDIO: | 363 | case SND_DEV_AUDIO: |
363 | return sound_mixer_ioctl(audio_devs[dev >> 4]->mixer_dev, | 364 | ret = sound_mixer_ioctl(audio_devs[dev >> 4]->mixer_dev, |
364 | cmd, p); | 365 | cmd, p); |
365 | 366 | break; | |
366 | default: | 367 | default: |
367 | return sound_mixer_ioctl(dev >> 4, cmd, p); | 368 | ret = sound_mixer_ioctl(dev >> 4, cmd, p); |
369 | break; | ||
368 | } | 370 | } |
371 | unlock_kernel(); | ||
372 | return ret; | ||
369 | } | 373 | } |
374 | |||
370 | switch (dev & 0x0f) { | 375 | switch (dev & 0x0f) { |
371 | case SND_DEV_CTL: | 376 | case SND_DEV_CTL: |
372 | if (cmd == SOUND_MIXER_GETLEVELS) | 377 | if (cmd == SOUND_MIXER_GETLEVELS) |
373 | return get_mixer_levels(p); | 378 | ret = get_mixer_levels(p); |
374 | if (cmd == SOUND_MIXER_SETLEVELS) | 379 | else if (cmd == SOUND_MIXER_SETLEVELS) |
375 | return set_mixer_levels(p); | 380 | ret = set_mixer_levels(p); |
376 | return sound_mixer_ioctl(dev >> 4, cmd, p); | 381 | else |
382 | ret = sound_mixer_ioctl(dev >> 4, cmd, p); | ||
383 | break; | ||
377 | 384 | ||
378 | case SND_DEV_SEQ: | 385 | case SND_DEV_SEQ: |
379 | case SND_DEV_SEQ2: | 386 | case SND_DEV_SEQ2: |
380 | return sequencer_ioctl(dev, file, cmd, p); | 387 | ret = sequencer_ioctl(dev, file, cmd, p); |
388 | break; | ||
381 | 389 | ||
382 | case SND_DEV_DSP: | 390 | case SND_DEV_DSP: |
383 | case SND_DEV_DSP16: | 391 | case SND_DEV_DSP16: |
@@ -390,7 +398,8 @@ static int sound_ioctl(struct inode *inode, struct file *file, | |||
390 | break; | 398 | break; |
391 | 399 | ||
392 | } | 400 | } |
393 | return -EINVAL; | 401 | unlock_kernel(); |
402 | return ret; | ||
394 | } | 403 | } |
395 | 404 | ||
396 | static unsigned int sound_poll(struct file *file, poll_table * wait) | 405 | static unsigned int sound_poll(struct file *file, poll_table * wait) |
@@ -490,7 +499,7 @@ const struct file_operations oss_sound_fops = { | |||
490 | .read = sound_read, | 499 | .read = sound_read, |
491 | .write = sound_write, | 500 | .write = sound_write, |
492 | .poll = sound_poll, | 501 | .poll = sound_poll, |
493 | .ioctl = sound_ioctl, | 502 | .unlocked_ioctl = sound_ioctl, |
494 | .mmap = sound_mmap, | 503 | .mmap = sound_mmap, |
495 | .open = sound_open, | 504 | .open = sound_open, |
496 | .release = sound_release, | 505 | .release = sound_release, |