Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
Browse files Browse the repository at this point in the history
* master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa: (28 commits)
  [ALSA] Kconfig SND_SEQUENCER_OSS help text fix
  [ALSA] Add Aux input switch control for Aureon Universe
  [ALSA] pcxhr - Fix the crash with REV01 board
  [ALSA] sound/pci/hda: use create_singlethread_workqueue()
  [ALSA] hda-intel - Add support of ATI SB600
  [ALSA] cs4281 - Fix the check of timeout in probe
  [ALSA] cs4281 - Fix the check of right channel
  [ALSA] Test volume resolution of usb audio at initialization
  [ALSA] maestro3.c: fix BUG, optimization
  [ALSA] HDA/Realtek: multiple input mux definitions and pin mode additions
  [ALSA] AdLib FM card driver
  [ALSA] Fix / clean up PCM-OSS setup hooks
  [ALSA] Clean up PCM codes (take 2)
  [ALSA] Tiny clean up of PCM codes
  [ALSA] ISA drivers bailing on first !enable[i]
  [ALSA] Remove obsolete kfree_nocheck call
  [ALSA] Remove obsolete kfree_nocheck call
  [ALSA] Add snd-als300 driver for Avance Logic ALS300/ALS300+ soundcards
  [ALSA] Add snd-riptide driver for Conexant Riptide chip
  [ALSA] hda-codec - Fix noisy output wtih AD1986A 3stack model
  ...
  • Loading branch information
Linus Torvalds committed Apr 2, 2006
2 parents 6e0dd74 + c2f60c5 commit f27f0a0
Show file tree
Hide file tree
Showing 37 changed files with 5,658 additions and 472 deletions.
69 changes: 69 additions & 0 deletions Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,34 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
enable - enable card
- Default: enabled, for PCI and ISA PnP cards

Module snd-adlib
----------------

Module for AdLib FM cards.

port - port # for OPL chip

This module supports multiple cards. It does not support autoprobe, so
the port must be specified. For actual AdLib FM cards it will be 0x388.
Note that this card does not have PCM support and no mixer; only FM
synthesis.

Make sure you have "sbiload" from the alsa-tools package available and,
after loading the module, find out the assigned ALSA sequencer port
number through "sbiload -l". Example output:

Port Client name Port name
64:0 OPL2 FM synth OPL2 FM Port

Load the std.sb and drums.sb patches also supplied by sbiload:

sbiload -p 64:0 std.sb drums.sb

If you use this driver to drive an OPL3, you can use std.o3 and drums.o3
instead. To have the card produce sound, use aplaymidi from alsa-utils:

aplaymidi -p 64:0 foo.mid

Module snd-ad1816a
------------------

Expand Down Expand Up @@ -190,6 +218,15 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

The power-management is supported.

Module snd-als300
-----------------

Module for Avance Logic ALS300 and ALS300+

This module supports multiple cards.

The power-management is supported.

Module snd-als4000
------------------

Expand Down Expand Up @@ -701,6 +738,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
uniwill 3-jack
F1734 2-jack
lg LG laptop (m1 express dual)
lg-lw LG LW20 laptop
test for testing/debugging purpose, almost all controls can be
adjusted. Appearing only when compiled with
$CONFIG_SND_DEBUG=y
Expand Down Expand Up @@ -1013,6 +1051,23 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

The power-management is supported.

Module snd-miro
---------------

Module for Miro soundcards: miroSOUND PCM 1 pro,
miroSOUND PCM 12,
miroSOUND PCM 20 Radio.

port - Port # (0x530,0x604,0xe80,0xf40)
irq - IRQ # (5,7,9,10,11)
dma1 - 1st dma # (0,1,3)
dma2 - 2nd dma # (0,1)
mpu_port - MPU-401 port # (0x300,0x310,0x320,0x330)
mpu_irq - MPU-401 irq # (5,7,9,10)
fm_port - FM Port # (0x388)
wss - enable WSS mode
ide - enable onboard ide support

Module snd-mixart
-----------------

Expand Down Expand Up @@ -1202,6 +1257,20 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

The power-management is supported.

Module snd-riptide
------------------

Module for Conexant Riptide chip

joystick_port - Joystick port # (default: 0x200)
mpu_port - MPU401 port # (default: 0x330)
opl3_port - OPL3 port # (default: 0x388)

This module supports multiple cards.
The driver requires the firmware loader support on kernel.
You need to install the firmware file "riptide.hex" to the standard
firmware path (e.g. /lib/firmware).

Module snd-rme32
----------------

Expand Down
2 changes: 1 addition & 1 deletion include/sound/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ static inline void snd_power_change_state(struct snd_card *card, unsigned int st
}

/* init.c */
int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file);
int snd_power_wait(struct snd_card *card, unsigned int power_state);

#else /* ! CONFIG_PM */

Expand Down
15 changes: 7 additions & 8 deletions include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ struct snd_pcm_substream {
/* -- assigned files -- */
struct snd_pcm_file *file;
struct file *ffile;
void (*pcm_release)(struct snd_pcm_substream *);
#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
/* -- OSS things -- */
struct snd_pcm_oss_substream oss;
Expand All @@ -381,13 +382,10 @@ struct snd_pcm_substream {
struct snd_info_entry *proc_prealloc_entry;
/* misc flags */
unsigned int no_mmap_ctrl: 1;
unsigned int hw_opened: 1;
};

#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL || ((substream)->oss.file != NULL))
#else
#define SUBSTREAM_BUSY(substream) ((substream)->file != NULL)
#endif


struct snd_pcm_str {
Expand Down Expand Up @@ -460,19 +458,20 @@ int snd_pcm_info_user(struct snd_pcm_substream *substream,
struct snd_pcm_info __user *info);
int snd_pcm_status(struct snd_pcm_substream *substream,
struct snd_pcm_status *status);
int snd_pcm_prepare(struct snd_pcm_substream *substream);
int snd_pcm_start(struct snd_pcm_substream *substream);
int snd_pcm_stop(struct snd_pcm_substream *substream, int status);
int snd_pcm_drain_done(struct snd_pcm_substream *substream);
#ifdef CONFIG_PM
int snd_pcm_suspend(struct snd_pcm_substream *substream);
int snd_pcm_suspend_all(struct snd_pcm *pcm);
#endif
int snd_pcm_kernel_playback_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
int snd_pcm_kernel_capture_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg);
int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct snd_pcm_substream **rsubstream);
int snd_pcm_open_substream(struct snd_pcm *pcm, int stream, struct file *file,
struct snd_pcm_substream **rsubstream);
void snd_pcm_release_substream(struct snd_pcm_substream *substream);
int snd_pcm_attach_substream(struct snd_pcm *pcm, int stream, struct file *file,
struct snd_pcm_substream **rsubstream);
void snd_pcm_detach_substream(struct snd_pcm_substream *substream);
void snd_pcm_vma_notify_data(void *client, void *data);
int snd_pcm_mmap_data(struct snd_pcm_substream *substream, struct file *file, struct vm_area_struct *area);

Expand Down
3 changes: 1 addition & 2 deletions include/sound/pcm_oss.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ struct snd_pcm_oss_file {

struct snd_pcm_oss_substream {
unsigned oss: 1; /* oss mode */
struct snd_pcm_oss_setup *setup; /* active setup */
struct snd_pcm_oss_file *file;
struct snd_pcm_oss_setup setup; /* active setup */
};

struct snd_pcm_oss_stream {
Expand Down
5 changes: 3 additions & 2 deletions sound/core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@ config SND_SEQUENCER_OSS

Many programs still use the OSS API, so say Y.

To compile this driver as a module, choose M here: the module
will be called snd-seq-oss.
If you choose M in "Sequencer support" (SND_SEQUENCER),
this will be compiled as a module. The module will be called
snd-seq-oss.

config SND_RTCTIMER
tristate "RTC Timer support"
Expand Down
6 changes: 3 additions & 3 deletions sound/core/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ static int snd_ctl_elem_info_user(struct snd_ctl_file *ctl,
if (copy_from_user(&info, _info, sizeof(info)))
return -EFAULT;
snd_power_lock(ctl->card);
result = snd_power_wait(ctl->card, SNDRV_CTL_POWER_D0, NULL);
result = snd_power_wait(ctl->card, SNDRV_CTL_POWER_D0);
if (result >= 0)
result = snd_ctl_elem_info(ctl, &info);
snd_power_unlock(ctl->card);
Expand Down Expand Up @@ -718,7 +718,7 @@ static int snd_ctl_elem_read_user(struct snd_card *card,
return -EFAULT;
}
snd_power_lock(card);
result = snd_power_wait(card, SNDRV_CTL_POWER_D0, NULL);
result = snd_power_wait(card, SNDRV_CTL_POWER_D0);
if (result >= 0)
result = snd_ctl_elem_read(card, control);
snd_power_unlock(card);
Expand Down Expand Up @@ -783,7 +783,7 @@ static int snd_ctl_elem_write_user(struct snd_ctl_file *file,
}
card = file->card;
snd_power_lock(card);
result = snd_power_wait(card, SNDRV_CTL_POWER_D0, NULL);
result = snd_power_wait(card, SNDRV_CTL_POWER_D0);
if (result >= 0)
result = snd_ctl_elem_write(card, file, control);
snd_power_unlock(card);
Expand Down
6 changes: 3 additions & 3 deletions sound/core/control_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static int snd_ctl_elem_info_compat(struct snd_ctl_file *ctl,
goto error;

snd_power_lock(ctl->card);
err = snd_power_wait(ctl->card, SNDRV_CTL_POWER_D0, NULL);
err = snd_power_wait(ctl->card, SNDRV_CTL_POWER_D0);
if (err >= 0)
err = snd_ctl_elem_info(ctl, data);
snd_power_unlock(ctl->card);
Expand Down Expand Up @@ -294,7 +294,7 @@ static int snd_ctl_elem_read_user_compat(struct snd_card *card,
goto error;

snd_power_lock(card);
err = snd_power_wait(card, SNDRV_CTL_POWER_D0, NULL);
err = snd_power_wait(card, SNDRV_CTL_POWER_D0);
if (err >= 0)
err = snd_ctl_elem_read(card, data);
snd_power_unlock(card);
Expand All @@ -320,7 +320,7 @@ static int snd_ctl_elem_write_user_compat(struct snd_ctl_file *file,
goto error;

snd_power_lock(card);
err = snd_power_wait(card, SNDRV_CTL_POWER_D0, NULL);
err = snd_power_wait(card, SNDRV_CTL_POWER_D0);
if (err >= 0)
err = snd_ctl_elem_write(card, file, data);
snd_power_unlock(card);
Expand Down
9 changes: 1 addition & 8 deletions sound/core/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,13 +722,12 @@ int snd_card_file_remove(struct snd_card *card, struct file *file)
* snd_power_wait - wait until the power-state is changed.
* @card: soundcard structure
* @power_state: expected power state
* @file: file structure for the O_NONBLOCK check (optional)
*
* Waits until the power-state is changed.
*
* Note: the power lock must be active before call.
*/
int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file)
int snd_power_wait(struct snd_card *card, unsigned int power_state)
{
wait_queue_t wait;
int result = 0;
Expand All @@ -745,12 +744,6 @@ int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file
}
if (snd_power_get_state(card) == power_state)
break;
#if 0 /* block all devices */
if (file && (file->f_flags & O_NONBLOCK)) {
result = -EAGAIN;
break;
}
#endif
set_current_state(TASK_UNINTERRUPTIBLE);
snd_power_unlock(card);
schedule_timeout(30 * HZ);
Expand Down
Loading

0 comments on commit f27f0a0

Please sign in to comment.