Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Feb 2, 2006
2 parents 59ed2f5 + 1494a92 commit b410333
Show file tree
Hide file tree
Showing 34 changed files with 364 additions and 111 deletions.
10 changes: 9 additions & 1 deletion Documentation/sound/alsa/ALSA-Configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -837,8 +837,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.

Module for AC'97 motherboards from Intel and compatibles.
* Intel i810/810E, i815, i820, i830, i84x, MX440
ICH5, ICH6, ICH7, ESB2
* SiS 7012 (SiS 735)
* NVidia NForce, NForce2
* NVidia NForce, NForce2, NForce3, MCP04, CK804
CK8, CK8S, MCP501
* AMD AMD768, AMD8111
* ALi m5455

Expand Down Expand Up @@ -868,6 +870,12 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
--------------------

Module for Intel ICH (i8x0) chipset MC97 modems.
* Intel i810/810E, i815, i820, i830, i84x, MX440
ICH5, ICH6, ICH7
* SiS 7013 (SiS 735)
* NVidia NForce, NForce2, NForce2s, NForce3
* AMD AMD8111
* ALi m5455

ac97_clock - AC'97 codec clock base (0 = auto-detect)

Expand Down
4 changes: 2 additions & 2 deletions Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5206,14 +5206,14 @@ struct _snd_pcm_runtime {
You need to pass the <function>snd_dma_pci_data(pci)</function>,
where pci is the struct <structname>pci_dev</structname> pointer
of the chip as well.
The <type>snd_sg_buf_t</type> instance is created as
The <type>struct snd_sg_buf</type> instance is created as
substream-&gt;dma_private. You can cast
the pointer like:

<informalexample>
<programlisting>
<![CDATA[
struct snd_sg_buf *sgbuf = (struct snd_sg_buf_t*)substream->dma_private;
struct snd_sg_buf *sgbuf = (struct snd_sg_buf *)substream->dma_private;
]]>
</programlisting>
</informalexample>
Expand Down
9 changes: 7 additions & 2 deletions drivers/pnp/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static int card_resume(struct pnp_dev *dev)

int pnp_register_card_driver(struct pnp_card_driver * drv)
{
int count = 0;
int count;
struct list_head *pos, *temp;

drv->link.name = drv->name;
Expand All @@ -374,10 +374,15 @@ int pnp_register_card_driver(struct pnp_card_driver * drv)
drv->link.suspend = drv->suspend ? card_suspend : NULL;
drv->link.resume = drv->resume ? card_resume : NULL;

count = pnp_register_driver(&drv->link);
if (count < 0)
return count;

spin_lock(&pnp_lock);
list_add_tail(&drv->global_list, &pnp_card_drivers);
spin_unlock(&pnp_lock);
pnp_register_driver(&drv->link);

count = 0;

list_for_each_safe(pos,temp,&pnp_cards){
struct pnp_card *card = list_entry(pos, struct pnp_card, global_list);
Expand Down
33 changes: 11 additions & 22 deletions sound/core/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,8 @@ static unsigned int snd_info_entry_poll(struct file *file, poll_table * wait)
return mask;
}

static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
static long snd_info_entry_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct snd_info_private_data *data;
struct snd_info_entry *entry;
Expand All @@ -465,17 +465,6 @@ static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file,
return -ENOTTY;
}

/* FIXME: need to unlock BKL to allow preemption */
static int snd_info_entry_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
{
int err;
unlock_kernel();
err = _snd_info_entry_ioctl(inode, file, cmd, arg);
lock_kernel();
return err;
}

static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma)
{
struct inode *inode = file->f_dentry->d_inode;
Expand All @@ -499,15 +488,15 @@ static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma)

static struct file_operations snd_info_entry_operations =
{
.owner = THIS_MODULE,
.llseek = snd_info_entry_llseek,
.read = snd_info_entry_read,
.write = snd_info_entry_write,
.poll = snd_info_entry_poll,
.ioctl = snd_info_entry_ioctl,
.mmap = snd_info_entry_mmap,
.open = snd_info_entry_open,
.release = snd_info_entry_release,
.owner = THIS_MODULE,
.llseek = snd_info_entry_llseek,
.read = snd_info_entry_read,
.write = snd_info_entry_write,
.poll = snd_info_entry_poll,
.unlocked_ioctl = snd_info_entry_ioctl,
.mmap = snd_info_entry_mmap,
.open = snd_info_entry_open,
.release = snd_info_entry_release,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion sound/drivers/serial-u16550.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ static int __init snd_uart16550_create(struct snd_card *card,

if ((err = snd_uart16550_detect(uart)) <= 0) {
printk(KERN_ERR "no UART detected at 0x%lx\n", iobase);
return err;
return -ENODEV;
}

if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
Expand Down
6 changes: 6 additions & 0 deletions sound/isa/cmi8330.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ module_param_array(wssdma, int, NULL, 0444);
MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver.");

static struct platform_device *platform_devices[SNDRV_CARDS];
#ifdef CONFIG_PNP
static int pnp_registered;
#endif

#define CMI8330_RMUX3D 16
#define CMI8330_MUTEMUX 17
Expand Down Expand Up @@ -672,8 +674,10 @@ static void __init_or_module snd_cmi8330_unregister_all(void)
{
int i;

#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&cmi8330_pnpc_driver);
#endif
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&snd_cmi8330_driver);
Expand All @@ -700,11 +704,13 @@ static int __init alsa_card_cmi8330_init(void)
cards++;
}

#ifdef CONFIG_PNP
err = pnp_register_card_driver(&cmi8330_pnpc_driver);
if (err >= 0) {
pnp_registered = 1;
cards += err;
}
#endif

if (!cards) {
#ifdef MODULE
Expand Down
13 changes: 11 additions & 2 deletions sound/isa/cs423x/cs4236.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ MODULE_SUPPORTED_DEVICE("{{Crystal Semiconductors,CS4235},"

#ifdef CS4232
#define IDENT "CS4232"
#define CS423X_DRIVER "snd_cs4232"
#else
#define IDENT "CS4236+"
#define CS423X_DRIVER "snd_cs4236"
#endif

static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
Expand Down Expand Up @@ -125,10 +127,12 @@ module_param_array(dma2, int, NULL, 0444);
MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");

static struct platform_device *platform_devices[SNDRV_CARDS];
#ifdef CONFIG_PNP
static int pnpc_registered;
#ifdef CS4232
static int pnp_registered;
#endif
#endif /* CONFIG_PNP */

struct snd_card_cs4236 {
struct snd_cs4231 *chip;
Expand Down Expand Up @@ -158,7 +162,6 @@ MODULE_DEVICE_TABLE(pnp, snd_cs4232_pnpbiosids);
#endif /* CS4232 */

#ifdef CS4232
#define CS423X_DRIVER "snd_cs4232"
#define CS423X_ISAPNP_DRIVER "cs4232_isapnp"
static struct pnp_card_device_id snd_cs423x_pnpids[] = {
/* Philips PCA70PS */
Expand All @@ -175,11 +178,12 @@ static struct pnp_card_device_id snd_cs423x_pnpids[] = {
{ .id = "CSC7632", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } },
/* SIC CrystalWave 32 (CS4232) */
{ .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
/* Netfinity 3000 on-board soundcard */
{ .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC010f" } } },
/* --- */
{ .id = "" } /* end */
};
#else /* CS4236 */
#define CS423X_DRIVER "snd_cs4236"
#define CS423X_ISAPNP_DRIVER "cs4236_isapnp"
static struct pnp_card_device_id snd_cs423x_pnpids[] = {
/* Intel Marlin Spike Motherboard - CS4235 */
Expand Down Expand Up @@ -747,12 +751,14 @@ static void __init_or_module snd_cs423x_unregister_all(void)
{
int i;

#ifdef CONFIG_PNP
if (pnpc_registered)
pnp_unregister_card_driver(&cs423x_pnpc_driver);
#ifdef CS4232
if (pnp_registered)
pnp_unregister_driver(&cs4232_pnp_driver);
#endif
#endif /* CONFIG_PNP */
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&cs423x_nonpnp_driver);
Expand All @@ -778,6 +784,7 @@ static int __init alsa_card_cs423x_init(void)
platform_devices[i] = device;
cards++;
}
#ifdef CONFIG_PNP
#ifdef CS4232
i = pnp_register_driver(&cs4232_pnp_driver);
if (i >= 0) {
Expand All @@ -790,6 +797,8 @@ static int __init alsa_card_cs423x_init(void)
pnpc_registered = 1;
cards += i;
}
#endif /* CONFIG_PNP */

if (!cards) {
#ifdef MODULE
printk(KERN_ERR IDENT " soundcard not found or device busy\n");
Expand Down
6 changes: 5 additions & 1 deletion sound/isa/es18xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1878,9 +1878,9 @@ module_param_array(dma2, int, NULL, 0444);
MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver.");

static struct platform_device *platform_devices[SNDRV_CARDS];
static int pnp_registered;

#ifdef CONFIG_PNP
static int pnp_registered;

static struct pnp_card_device_id snd_audiodrive_pnpids[] = {
/* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */
Expand Down Expand Up @@ -2209,8 +2209,10 @@ static void __init_or_module snd_es18xx_unregister_all(void)
{
int i;

#ifdef CONFIG_PNP
if (pnp_registered)
pnp_unregister_card_driver(&es18xx_pnpc_driver);
#endif
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&snd_es18xx_nonpnp_driver);
Expand All @@ -2237,11 +2239,13 @@ static int __init alsa_card_es18xx_init(void)
cards++;
}

#ifdef CONFIG_PNP
i = pnp_register_card_driver(&es18xx_pnpc_driver);
if (i >= 0) {
pnp_registered = 1;
cards += i;
}
#endif

if(!cards) {
#ifdef MODULE
Expand Down
2 changes: 1 addition & 1 deletion sound/isa/gus/gusclassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static int __init snd_gusclassic_probe(struct platform_device *pdev)
goto _err;
}
sprintf(card->longname + strlen(card->longname), " at 0x%lx, irq %d, dma %d", gus->gf1.port, xirq, xdma1);
if (dma2 >= 0)
if (xdma2 >= 0)
sprintf(card->longname + strlen(card->longname), "&%d", xdma2);

snd_card_set_dev(card, &pdev->dev);
Expand Down
12 changes: 9 additions & 3 deletions sound/isa/opl3sa2.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ module_param_array(opl3sa3_ymode, int, NULL, 0444);
MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi.");

static struct platform_device *platform_devices[SNDRV_CARDS];
#ifdef CONFIG_PNP
static int pnp_registered;
static int pnpc_registered;
#endif

/* control ports */
#define OPL3SA2_PM_CTRL 0x01
Expand Down Expand Up @@ -721,7 +723,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev)
}
sprintf(card->longname, "%s at 0x%lx, irq %d, dma %d",
card->shortname, chip->port, xirq, xdma1);
if (dma2 >= 0)
if (xdma2 >= 0)
sprintf(card->longname + strlen(card->longname), "&%d", xdma2);

return snd_card_register(card);
Expand Down Expand Up @@ -779,7 +781,7 @@ static int snd_opl3sa2_pnp_resume(struct pnp_dev *pdev)
#endif

static struct pnp_driver opl3sa2_pnp_driver = {
.name = "opl3sa2-pnpbios",
.name = "snd-opl3sa2-pnpbios",
.id_table = snd_opl3sa2_pnpbiosids,
.probe = snd_opl3sa2_pnp_detect,
.remove = __devexit_p(snd_opl3sa2_pnp_remove),
Expand Down Expand Up @@ -846,7 +848,7 @@ static int snd_opl3sa2_pnp_cresume(struct pnp_card_link *pcard)

static struct pnp_card_driver opl3sa2_pnpc_driver = {
.flags = PNP_DRIVER_RES_DISABLE,
.name = "opl3sa2",
.name = "snd-opl3sa2-cpnp",
.id_table = snd_opl3sa2_pnpids,
.probe = snd_opl3sa2_pnp_cdetect,
.remove = __devexit_p(snd_opl3sa2_pnp_cremove),
Expand Down Expand Up @@ -929,10 +931,12 @@ static void __init_or_module snd_opl3sa2_unregister_all(void)
{
int i;

#ifdef CONFIG_PNP
if (pnpc_registered)
pnp_unregister_card_driver(&opl3sa2_pnpc_driver);
if (pnp_registered)
pnp_unregister_driver(&opl3sa2_pnp_driver);
#endif
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
platform_device_unregister(platform_devices[i]);
platform_driver_unregister(&snd_opl3sa2_nonpnp_driver);
Expand Down Expand Up @@ -961,6 +965,7 @@ static int __init alsa_card_opl3sa2_init(void)
cards++;
}

#ifdef CONFIG_PNP
err = pnp_register_driver(&opl3sa2_pnp_driver);
if (err >= 0) {
pnp_registered = 1;
Expand All @@ -971,6 +976,7 @@ static int __init alsa_card_opl3sa2_init(void)
pnpc_registered = 1;
cards += err;
}
#endif

if (!cards) {
#ifdef MODULE
Expand Down
2 changes: 1 addition & 1 deletion sound/isa/opti9xx/opti92x-ad1848.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ static int snd_opti93x_pcm(struct snd_opti93x *codec, int device, struct snd_pcm
int error;
struct snd_pcm *pcm;

if ((error = snd_pcm_new(codec->card, "OPTi 82C93X", device, 1, 1, &pcm)))
if ((error = snd_pcm_new(codec->card, "OPTi 82C93X", device, 1, 1, &pcm)) < 0)
return error;

snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_opti93x_playback_ops);
Expand Down
4 changes: 2 additions & 2 deletions sound/isa/sb/sb16.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ static struct pnp_card_device_id snd_sb16_pnpids[] = {
{ .id = "CTL0086", .devs = { { "CTL0041" } } },
/* Sound Blaster Vibra16X */
{ .id = "CTL00f0", .devs = { { "CTL0043" } } },
/* Sound Blaster 16 (Virtual PC 2004) */
{ .id = "tBA03b0", .devs = { {.id="PNPb003" } } },
#else /* SNDRV_SBAWE defined */
/* Sound Blaster AWE 32 PnP */
{ .id = "CTL0035", .devs = { { "CTL0031" }, { "CTL0021" } } },
Expand Down Expand Up @@ -235,8 +237,6 @@ static struct pnp_card_device_id snd_sb16_pnpids[] = {
{ .id = "CTLXXXX" , .devs = { { "CTL0044" }, { "CTL0023" } } },
{ .id = "CTLXXXX" , .devs = { { "CTL0045" }, { "CTL0022" } } },
#endif /* SNDRV_SBAWE */
/* Sound Blaster 16 PnP (Virtual PC 2004)*/
{ .id = "tBA03b0", .devs = { { "PNPb003" } } },
{ .id = "", }
};

Expand Down
Loading

0 comments on commit b410333

Please sign in to comment.