Commit 29d1acb7 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA and PnP update

  - compilation fixes
  - enhanced linux/pnp.h:
      pnp_device_is_isapnp(dev)
      pnp_device_is_pnpbios(dev)
      isapnp_card_number(dev)
      isapnp_csn_number(dev)
parent 4d6dcf60
...@@ -106,8 +106,6 @@ static int isapnp_detected; ...@@ -106,8 +106,6 @@ static int isapnp_detected;
/* some prototypes */ /* some prototypes */
extern struct pnp_protocol isapnp_protocol;
static inline void write_data(unsigned char x) static inline void write_data(unsigned char x)
{ {
outb(x, _PNPWRP); outb(x, _PNPWRP);
......
...@@ -869,7 +869,7 @@ static int pnpbios_disable_resources(struct pnp_dev *dev) ...@@ -869,7 +869,7 @@ static int pnpbios_disable_resources(struct pnp_dev *dev)
/* PnP Layer support */ /* PnP Layer support */
static struct pnp_protocol pnpbios_protocol = { struct pnp_protocol pnpbios_protocol = {
.name = "Plug and Play BIOS", .name = "Plug and Play BIOS",
.get = pnpbios_get_resources, .get = pnpbios_get_resources,
.set = pnpbios_set_resources, .set = pnpbios_set_resources,
......
...@@ -274,12 +274,31 @@ struct pnp_fixup { ...@@ -274,12 +274,31 @@ struct pnp_fixup {
#define pnp_can_configure(dev) ((!(dev)->active) && ((dev)->config_mode & PNP_CONFIG_AUTO) && \ #define pnp_can_configure(dev) ((!(dev)->active) && ((dev)->config_mode & PNP_CONFIG_AUTO) && \
((dev)->capabilities & PNP_CONFIGURABLE)) ((dev)->capabilities & PNP_CONFIGURABLE))
#ifdef CONFIG_ISAPNP
extern struct pnp_protocol isapnp_protocol;
#define pnp_device_is_isapnp(dev) ((dev)->protocol == (&isapnp_protocol))
#else
#define pnp_device_is_isapnp(dev) 0
#endif
#ifdef CONFIG_PNPBIOS
extern struct pnp_protocol pnpbios_protocol;
#define pnp_device_is_pnpbios(dev) ((dev)->protocol == (&pnpbios_protocol))
#else
#define pnp_device_is_pnpbios(dev) 0
#endif
/* status */ /* status */
#define PNP_READY 0x0000 #define PNP_READY 0x0000
#define PNP_ATTACHED 0x0001 #define PNP_ATTACHED 0x0001
#define PNP_BUSY 0x0002 #define PNP_BUSY 0x0002
#define PNP_FAULTY 0x0004 #define PNP_FAULTY 0x0004
/* isapnp specific macros */
#define isapnp_card_number(dev) ((dev)->card ? (dev)->card->number : -1)
#define isapnp_csn_number(dev) ((dev)->number)
/* /*
* Driver Management * Driver Management
......
...@@ -71,6 +71,7 @@ ...@@ -71,6 +71,7 @@
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pnp.h> #include <linux/pnp.h>
#include <linux/isapnp.h>
#include <sound/core.h> #include <sound/core.h>
#include <sound/control.h> #include <sound/control.h>
#include <sound/pcm.h> #include <sound/pcm.h>
...@@ -1987,7 +1988,7 @@ static int __devinit snd_audiodrive_pnp(int dev, struct snd_audiodrive *acard, ...@@ -1987,7 +1988,7 @@ static int __devinit snd_audiodrive_pnp(int dev, struct snd_audiodrive *acard,
snd_printk(KERN_ERR PFX "PnP control configure failure (out of resources?)\n"); snd_printk(KERN_ERR PFX "PnP control configure failure (out of resources?)\n");
return -EAGAIN; return -EAGAIN;
} }
snd_printdd("pnp: port=0x%lx\n", acard->devc->resource[0].start); snd_printdd("pnp: port=0x%lx\n", pnp_port_start(acard->devc, 0));
/* PnP initialization */ /* PnP initialization */
pdev = acard->dev; pdev = acard->dev;
pnp_init_resource_table(cfg); pnp_init_resource_table(cfg);
......
...@@ -2908,7 +2908,7 @@ int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk) ...@@ -2908,7 +2908,7 @@ int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk)
for (; quirk->vendor; quirk++) { for (; quirk->vendor; quirk++) {
if (quirk->vendor == ac97->subsystem_vendor && quirk->device == ac97->subsystem_device) { if (quirk->vendor == ac97->subsystem_vendor && quirk->device == ac97->subsystem_device) {
snd_printdd("ac97 quirk for %s (%04x:%04x)\n", quirk->name, vendor, device); snd_printdd("ac97 quirk for %s (%04x:%04x)\n", quirk->name, ac97->subsystem_vendor, ac97->subsystem_device);
switch (quirk->type) { switch (quirk->type) {
case AC97_TUNE_HP_ONLY: case AC97_TUNE_HP_ONLY:
return swap_headphone(ac97, 1); return swap_headphone(ac97, 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment