You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/perex/alsa
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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->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>
|
||||
|
||||
+7
-2
@@ -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;
|
||||
@@ -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);
|
||||
|
||||
+11
-22
@@ -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;
|
||||
@@ -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;
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
@@ -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);
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
@@ -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;
|
||||
@@ -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 */
|
||||
@@ -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 */
|
||||
@@ -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);
|
||||
@@ -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) {
|
||||
@@ -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");
|
||||
|
||||
+5
-1
@@ -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) */
|
||||
@@ -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);
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
+9
-3
@@ -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
|
||||
@@ -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);
|
||||
@@ -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),
|
||||
@@ -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),
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
@@ -971,6 +976,7 @@ static int __init alsa_card_opl3sa2_init(void)
|
||||
pnpc_registered = 1;
|
||||
cards += err;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!cards) {
|
||||
#ifdef MODULE
|
||||
|
||||
@@ -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);
|
||||
|
||||
+2
-2
@@ -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" } } },
|
||||
@@ -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 = "", }
|
||||
};
|
||||
|
||||
|
||||
+5
-1
@@ -69,9 +69,9 @@ module_param_array(dma, int, NULL, 0444);
|
||||
MODULE_PARM_DESC(dma, "DMA # for SoundScape 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 sscape_pnpids[] = {
|
||||
{ .id = "ENS3081", .devs = { { "ENS0000" } } },
|
||||
{ .id = "" } /* end */
|
||||
@@ -1391,8 +1391,10 @@ static void __init_or_module sscape_unregister_all(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
#ifdef CONFIG_PNP
|
||||
if (pnp_registered)
|
||||
pnp_unregister_card_driver(&sscape_pnpc_driver);
|
||||
#endif
|
||||
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
|
||||
platform_device_unregister(platform_devices[i]);
|
||||
platform_driver_unregister(&snd_sscape_driver);
|
||||
@@ -1466,8 +1468,10 @@ static int __init sscape_init(void)
|
||||
ret = sscape_manual_probe();
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
#ifdef CONFIG_PNP
|
||||
if (pnp_register_card_driver(&sscape_pnpc_driver) >= 0)
|
||||
pnp_registered = 1;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,10 +84,9 @@ module_param_array(use_cs4232_midi, bool, NULL, 0444);
|
||||
MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)");
|
||||
|
||||
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_wavefront_pnpids[] = {
|
||||
/* Tropez */
|
||||
@@ -695,8 +694,10 @@ static void __init_or_module snd_wavefront_unregister_all(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
#ifdef CONFIG_PNP
|
||||
if (pnp_registered)
|
||||
pnp_unregister_card_driver(&wavefront_pnpc_driver);
|
||||
#endif
|
||||
for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
|
||||
platform_device_unregister(platform_devices[i]);
|
||||
platform_driver_unregister(&snd_wavefront_driver);
|
||||
@@ -725,11 +726,13 @@ static int __init alsa_card_wavefront_init(void)
|
||||
cards++;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PNP
|
||||
i = pnp_register_card_driver(&wavefront_pnpc_driver);
|
||||
if (i >= 0) {
|
||||
pnp_registered = 1;
|
||||
cards += i;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!cards) {
|
||||
#ifdef MODULE
|
||||
|
||||
@@ -866,7 +866,7 @@ wavefront_send_sample (snd_wavefront_t *dev,
|
||||
divided by 2.
|
||||
*/
|
||||
|
||||
u16 sample_short;
|
||||
u16 sample_short = 0;
|
||||
u32 length;
|
||||
u16 __user *data_end = NULL;
|
||||
unsigned int i;
|
||||
|
||||
+39
-14
@@ -1621,8 +1621,27 @@ static const struct snd_kcontrol_new snd_ac97_ad1981x_jack_sense[] = {
|
||||
AC97_SINGLE("Line Jack Sense", AC97_AD_JACK_SPDIF, 12, 1, 0),
|
||||
};
|
||||
|
||||
/* black list to avoid HP/Line jack-sense controls
|
||||
* (SS vendor << 16 | device)
|
||||
*/
|
||||
static unsigned int ad1981_jacks_blacklist[] = {
|
||||
0x10140554, /* Thinkpad T42p/R50p */
|
||||
0 /* end */
|
||||
};
|
||||
|
||||
static int check_list(struct snd_ac97 *ac97, const unsigned int *list)
|
||||
{
|
||||
u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device;
|
||||
for (; *list; list++)
|
||||
if (*list == subid)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int patch_ad1981a_specific(struct snd_ac97 * ac97)
|
||||
{
|
||||
if (check_list(ac97, ad1981_jacks_blacklist))
|
||||
return 0;
|
||||
return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
|
||||
ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
|
||||
}
|
||||
@@ -1635,22 +1654,26 @@ static struct snd_ac97_build_ops patch_ad1981a_build_ops = {
|
||||
#endif
|
||||
};
|
||||
|
||||
/* white list to enable HP jack-sense bits
|
||||
* (SS vendor << 16 | device)
|
||||
*/
|
||||
static unsigned int ad1981_jacks_whitelist[] = {
|
||||
0x0e11005a, /* HP nc4000/4010 */
|
||||
0x103c0890, /* HP nc6000 */
|
||||
0x103c0938, /* HP nc4220 */
|
||||
0x103c099c, /* HP nx6110 */
|
||||
0x103c0944, /* HP nc6220 */
|
||||
0x103c0934, /* HP nc8220 */
|
||||
0x103c006d, /* HP nx9105 */
|
||||
0x17340088, /* FSC Scenic-W */
|
||||
0 /* end */
|
||||
};
|
||||
|
||||
static void check_ad1981_hp_jack_sense(struct snd_ac97 *ac97)
|
||||
{
|
||||
u32 subid = ((u32)ac97->subsystem_vendor << 16) | ac97->subsystem_device;
|
||||
switch (subid) {
|
||||
case 0x0e11005a: /* HP nc4000/4010 */
|
||||
case 0x103c0890: /* HP nc6000 */
|
||||
case 0x103c0938: /* HP nc4220 */
|
||||
case 0x103c099c: /* HP nx6110 */
|
||||
case 0x103c0944: /* HP nc6220 */
|
||||
case 0x103c0934: /* HP nc8220 */
|
||||
case 0x103c006d: /* HP nx9105 */
|
||||
case 0x17340088: /* FSC Scenic-W */
|
||||
if (check_list(ac97, ad1981_jacks_whitelist))
|
||||
/* enable headphone jack sense */
|
||||
snd_ac97_update_bits(ac97, AC97_AD_JACK_SPDIF, 1<<11, 1<<11);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int patch_ad1981a(struct snd_ac97 *ac97)
|
||||
@@ -1672,6 +1695,8 @@ static int patch_ad1981b_specific(struct snd_ac97 *ac97)
|
||||
|
||||
if ((err = patch_build_controls(ac97, &snd_ac97_ad198x_2cmic, 1)) < 0)
|
||||
return err;
|
||||
if (check_list(ac97, ad1981_jacks_blacklist))
|
||||
return 0;
|
||||
return patch_build_controls(ac97, snd_ac97_ad1981x_jack_sense,
|
||||
ARRAY_SIZE(snd_ac97_ad1981x_jack_sense));
|
||||
}
|
||||
@@ -2210,9 +2235,9 @@ static void alc850_update_jacks(struct snd_ac97 *ac97)
|
||||
/* Vref disable (bit12), 1kOhm (bit13) */
|
||||
snd_ac97_update_bits(ac97, AC97_ALC850_MISC1, (1<<12)|(1<<13),
|
||||
shared ? (1<<12) : (1<<13));
|
||||
/* MIC-IN = 1, CENTER-LFE = 2 */
|
||||
/* MIC-IN = 1, CENTER-LFE = 5 */
|
||||
snd_ac97_update_bits(ac97, AC97_ALC850_JACK_SELECT, 7 << 4,
|
||||
shared ? (2<<4) : (1<<4));
|
||||
shared ? (5<<4) : (1<<4));
|
||||
}
|
||||
|
||||
static const struct snd_kcontrol_new snd_ac97_controls_alc850[] = {
|
||||
|
||||
@@ -279,7 +279,7 @@ struct snd_ali {
|
||||
};
|
||||
|
||||
static struct pci_device_id snd_ali_ids[] = {
|
||||
{0x10b9, 0x5451, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
|
||||
{PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5451), 0, 0, 0},
|
||||
{0, }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, snd_ali_ids);
|
||||
|
||||
@@ -849,7 +849,7 @@ static int
|
||||
snd_vortex_peaks_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
|
||||
int i, count;
|
||||
int i, count = 0;
|
||||
u16 peaks[20];
|
||||
|
||||
vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count);
|
||||
|
||||
+3
-1
@@ -781,6 +781,8 @@ static struct pci_device_id snd_bt87x_ids[] = {
|
||||
BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_879, 0x0070, 0x13eb, 32000),
|
||||
/* Viewcast Osprey 200 */
|
||||
BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x0070, 0xff01, 44100),
|
||||
/* AVerMedia Studio No. 103, 203, ...? */
|
||||
BT_DEVICE(PCI_DEVICE_ID_BROOKTREE_878, 0x1461, 0x0003, 48000),
|
||||
{ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(pci, snd_bt87x_ids);
|
||||
@@ -808,7 +810,7 @@ static int __devinit snd_bt87x_detect_card(struct pci_dev *pci)
|
||||
const struct pci_device_id *supported;
|
||||
|
||||
supported = pci_match_device(&driver, pci);
|
||||
if (supported)
|
||||
if (supported && supported->driver_data > 0)
|
||||
return supported->driver_data;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(blacklist); ++i)
|
||||
|
||||
@@ -199,7 +199,8 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
|
||||
.name = "MSI K8N Diamond MB [SB0438]",
|
||||
.gpio_type = 1,
|
||||
.i2c_adc = 1 } ,
|
||||
/* Shuttle XPC SD31P which has an onboard Creative Labs Sound Blaster Live! 24-bit EAX
|
||||
/* Shuttle XPC SD31P which has an onboard Creative Labs
|
||||
* Sound Blaster Live! 24-bit EAX
|
||||
* high-definition 7.1 audio processor".
|
||||
* Added using info from andrewvegan in alsa bug #1298
|
||||
*/
|
||||
@@ -207,6 +208,15 @@ static struct snd_ca0106_details ca0106_chip_details[] = {
|
||||
.name = "Shuttle XPC SD31P [SD31P]",
|
||||
.gpio_type = 1,
|
||||
.i2c_adc = 1 } ,
|
||||
/* Shuttle XPC SD11G5 which has an onboard Creative Labs
|
||||
* Sound Blaster Live! 24-bit EAX
|
||||
* high-definition 7.1 audio processor".
|
||||
* Fixes ALSA bug#1600
|
||||
*/
|
||||
{ .serial = 0x30411297,
|
||||
.name = "Shuttle XPC SD11G5 [SD11G5]",
|
||||
.gpio_type = 1,
|
||||
.i2c_adc = 1 } ,
|
||||
{ .serial = 0,
|
||||
.name = "AudigyLS [Unknown]" }
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user