Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8aa19ad8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa

parents 58a2c322 a25f175c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -527,6 +527,8 @@ struct _snd_ac97 {
	struct device dev;
};

#define to_ac97_t(d) container_of(d, struct _snd_ac97, dev)

/* conditions */
static inline int ac97_is_audio(ac97_t * ac97)
{
+1 −1
Original line number Diff line number Diff line
@@ -1059,7 +1059,7 @@ typedef struct {
	unsigned char spk71;        /* Has 7.1 speakers */
	unsigned char sblive51;	    /* SBLive! 5.1 - extout 0x11 -> center, 0x12 -> lfe */
	unsigned char spdif_bug;    /* Has Spdif phasing bug */
	unsigned char ac97_chip;    /* Has an AC97 chip */
	unsigned char ac97_chip;    /* Has an AC97 chip: 1 = mandatory, 2 = optional */
	unsigned char ecard;        /* APS EEPROM */
	const char *driver;
	const char *name;
+1 −1
Original line number Diff line number Diff line
@@ -245,7 +245,7 @@ static pxa2xx_pcm_client_t pxa2xx_ac97_pcm_client = {

#ifdef CONFIG_PM

static int pxa2xx_ac97_do_suspend(snd_card_t *card, unsigned int state)
static int pxa2xx_ac97_do_suspend(snd_card_t *card, pm_message_t state)
{
	if (card->power_state != SNDRV_CTL_POWER_D3cold) {
		pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data;
+2 −0
Original line number Diff line number Diff line
@@ -914,6 +914,7 @@ static int __init alsa_card_opl3sa2_init(void)
#endif
#ifdef CONFIG_PNP
		pnp_unregister_card_driver(&opl3sa2_pnpc_driver);
		pnp_unregister_driver(&opl3sa2_pnp_driver);
#endif
		return -ENODEV;
	}
@@ -927,6 +928,7 @@ static void __exit alsa_card_opl3sa2_exit(void)
#ifdef CONFIG_PNP
	/* PnP cards first */
	pnp_unregister_card_driver(&opl3sa2_pnpc_driver);
	pnp_unregister_driver(&opl3sa2_pnp_driver);
#endif
	for (idx = 0; idx < SNDRV_CARDS; idx++)
		snd_card_free(snd_opl3sa2_legacy[idx]);
+7 −16
Original line number Diff line number Diff line
@@ -17,25 +17,21 @@
#include <linux/string.h>

/*
 * Codec families have names seperated by commas, so we search for an
 * individual codec name within the family string. 
 * Let drivers decide whether they want to support given codec from their
 * probe method.  Drivers have direct access to the ac97_t structure and may
 * decide based on the id field amongst other things.
 */
static int ac97_bus_match(struct device *dev, struct device_driver *drv)
{
	return (strstr(dev->bus_id, drv->name) != NULL);
	return 1;
}

static int ac97_bus_suspend(struct device *dev, pm_message_t state)
{
	int ret = 0;

	if (dev->driver && dev->driver->suspend) {
		ret = dev->driver->suspend(dev, state, SUSPEND_DISABLE);
		if (ret == 0)
			ret = dev->driver->suspend(dev, state, SUSPEND_SAVE_STATE);
		if (ret == 0)
	if (dev->driver && dev->driver->suspend)
		ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN);
	}
	return ret;
}

@@ -43,13 +39,8 @@ static int ac97_bus_resume(struct device *dev)
{
	int ret = 0;

	if (dev->driver && dev->driver->resume) {
	if (dev->driver && dev->driver->resume)
		ret = dev->driver->resume(dev, RESUME_POWER_ON);
		if (ret == 0)
			ret = dev->driver->resume(dev, RESUME_RESTORE_STATE);
		if (ret == 0)
			ret = dev->driver->resume(dev, RESUME_ENABLE);
	}
	return ret;
}

Loading