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

Commit 6eb7365d authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Overwrite pin config on intel DG45ID board.
  intelhdmi - dont power off HDA link
  ALSA: hrtimer - Fix lock-up
  ALSA: intelhdmi - add channel mapping for typical configurations
  ALSA: intelhdmi - channel mapping applies to Pin
  ALSA: intelhdmi - accept DisplayPort pin
  ALSA: hda - show HBR(High Bit Rate) pin cap in procfs
  ALSA: hda - Fix LED GPIO setup for HP laptops with IDT codecs
  ASoC: Fix build of OMAP sound drivers
  ALSA: opti93x: fix irq releasing if the irq cannot be allocated
parents 9c3936cb 84a3bd06
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -37,14 +37,22 @@ static unsigned int resolution;
struct snd_hrtimer {
	struct snd_timer *timer;
	struct hrtimer hrt;
	atomic_t running;
};

static enum hrtimer_restart snd_hrtimer_callback(struct hrtimer *hrt)
{
	struct snd_hrtimer *stime = container_of(hrt, struct snd_hrtimer, hrt);
	struct snd_timer *t = stime->timer;

	if (!atomic_read(&stime->running))
		return HRTIMER_NORESTART;

	hrtimer_forward_now(hrt, ns_to_ktime(t->sticks * resolution));
	snd_timer_interrupt(stime->timer, t->sticks);

	if (!atomic_read(&stime->running))
		return HRTIMER_NORESTART;
	return HRTIMER_RESTART;
}

@@ -58,6 +66,7 @@ static int snd_hrtimer_open(struct snd_timer *t)
	hrtimer_init(&stime->hrt, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
	stime->timer = t;
	stime->hrt.function = snd_hrtimer_callback;
	atomic_set(&stime->running, 0);
	t->private_data = stime;
	return 0;
}
@@ -78,16 +87,18 @@ static int snd_hrtimer_start(struct snd_timer *t)
{
	struct snd_hrtimer *stime = t->private_data;

	atomic_set(&stime->running, 0);
	hrtimer_cancel(&stime->hrt);
	hrtimer_start(&stime->hrt, ns_to_ktime(t->sticks * resolution),
		      HRTIMER_MODE_REL);
	atomic_set(&stime->running, 1);
	return 0;
}

static int snd_hrtimer_stop(struct snd_timer *t)
{
	struct snd_hrtimer *stime = t->private_data;

	hrtimer_cancel(&stime->hrt);
	atomic_set(&stime->running, 0);
	return 0;
}

+10 −8
Original line number Diff line number Diff line
@@ -548,10 +548,13 @@ __skip_mpu:

static irqreturn_t snd_opti93x_interrupt(int irq, void *dev_id)
{
	struct snd_wss *codec = dev_id;
	struct snd_opti9xx *chip = codec->card->private_data;
	struct snd_opti9xx *chip = dev_id;
	struct snd_wss *codec = chip->codec;
	unsigned char status;

	if (!codec)
		return IRQ_HANDLED;

	status = snd_opti9xx_read(chip, OPTi9XX_MC_REG(11));
	if ((status & OPTi93X_IRQ_PLAYBACK) && codec->playback_substream)
		snd_pcm_period_elapsed(codec->playback_substream);
@@ -691,10 +694,9 @@ static void snd_card_opti9xx_free(struct snd_card *card)

	if (chip) {
#ifdef OPTi93X
		struct snd_wss *codec = chip->codec;
		if (codec && codec->irq > 0) {
			disable_irq(codec->irq);
			free_irq(codec->irq, codec);
		if (chip->irq > 0) {
			disable_irq(chip->irq);
			free_irq(chip->irq, chip);
		}
		release_and_free_resource(chip->res_mc_indir);
#endif
@@ -759,9 +761,9 @@ static int __devinit snd_opti9xx_probe(struct snd_card *card)
#endif
#ifdef OPTi93X
	error = request_irq(irq, snd_opti93x_interrupt,
			    IRQF_DISABLED, DEV_NAME" - WSS", codec);
			    IRQF_DISABLED, DEV_NAME" - WSS", chip);
	if (error < 0) {
		snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq);
		snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", irq);
		return error;
	}
#endif
+5 −0
Original line number Diff line number Diff line
@@ -255,9 +255,13 @@ enum {
 *       in HD-audio specification
 */
#define AC_PINCAP_HDMI			(1<<7)	/* HDMI pin */
#define AC_PINCAP_DP			(1<<24)	/* DisplayPort pin, can
						 * coexist with AC_PINCAP_HDMI
						 */
#define AC_PINCAP_VREF			(0x37<<8)
#define AC_PINCAP_VREF_SHIFT		8
#define AC_PINCAP_EAPD			(1<<16)	/* EAPD capable */
#define AC_PINCAP_HBR			(1<<27)	/* High Bit Rate */
/* Vref status (used in pin cap) */
#define AC_PINCAP_VREF_HIZ		(1<<0)	/* Hi-Z */
#define AC_PINCAP_VREF_50		(1<<1)	/* 50% */
@@ -635,6 +639,7 @@ struct hda_bus {
	unsigned int rirb_error:1;	/* error in codec communication */
	unsigned int response_reset:1;	/* controller was reset */
	unsigned int in_reset:1;	/* during reset operation */
	unsigned int power_keep_link_on:1; /* don't power off HDA link */
};

/*
+2 −1
Original line number Diff line number Diff line
@@ -2082,7 +2082,8 @@ static void azx_power_notify(struct hda_bus *bus)
	}
	if (power_on)
		azx_init_chip(chip);
	else if (chip->running && power_save_controller)
	else if (chip->running && power_save_controller &&
		 !bus->power_keep_link_on)
		azx_stop_chip(chip);
}
#endif /* CONFIG_SND_HDA_POWER_SAVE */
+6 −1
Original line number Diff line number Diff line
@@ -240,9 +240,14 @@ static void print_pin_caps(struct snd_info_buffer *buffer,
		/* Realtek uses this bit as a different meaning */
		if ((codec->vendor_id >> 16) == 0x10ec)
			snd_iprintf(buffer, " R/L");
		else
		else {
			if (caps & AC_PINCAP_HBR)
				snd_iprintf(buffer, " HBR");
			snd_iprintf(buffer, " HDMI");
		}
	}
	if (caps & AC_PINCAP_DP)
		snd_iprintf(buffer, " DP");
	if (caps & AC_PINCAP_TRIG_REQ)
		snd_iprintf(buffer, " Trigger");
	if (caps & AC_PINCAP_IMP_SENSE)
Loading