summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorLinus Torvalds2014-06-13 16:42:49 +0200
committerLinus Torvalds2014-06-13 16:42:49 +0200
commit6391f34e844c71ebf645058b2b643f70fed5b990 (patch)
tree047ddfa92471f44037a984b78d05161c101ec423 /sound/core
parentMerge tag 'dlm-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/teiglan... (diff)
parentALSA: hda/realtek - Add more entry for enable HP mute led (diff)
downloadkernel-qcow2-linux-6391f34e844c71ebf645058b2b643f70fed5b990.tar.gz
kernel-qcow2-linux-6391f34e844c71ebf645058b2b643f70fed5b990.tar.xz
kernel-qcow2-linux-6391f34e844c71ebf645058b2b643f70fed5b990.zip
Merge tag 'sound-fix-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound fixes from Takashi Iwai: "Most of changes are small and easy cleanup or fixes: - a few HD-audio Realtek codec fixes and quirks - Intel HDMI audio fixes for Broadwell and Haswell / ValleyView - FireWire sound stack cleanups - a couple of sequencer core fixes - compress ABI fix for 64bit - conversion to modern ktime*() API" * tag 'sound-fix-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits) ALSA: hda/realtek - Add more entry for enable HP mute led ALSA: hda - Add quirk for external mic on Lifebook U904 ALSA: hda - fix a fixup value for codec alc293 in the pin_quirk table ALSA: intel8x0: Use ktime and ktime_get() ALSA: core: Use ktime_get_ts() ALSA: hda - verify pin:converter connection on unsol event for HSW and VLV ALSA: compress: Cancel the optimization of compiler and fix the size of struct for all platform. ALSA: hda - Add quirk for ABit AA8XE Revert "ALSA: hda - mask buggy stream DMA0 for Broadwell display controller" ALSA: hda - using POS_FIX_LPIB on Broadwell HDMI Audio ALSA: hda/realtek - Add support of ALC667 codec ALSA: hda/realtek - Add more codec rename ALSA: hda/realtek - New vendor ID for ALC233 ALSA: hda - add two new pin tables ALSA: hda/realtek - Add support of ALC891 codec ALSA: seq: Continue broadcasting events to ports if one of them fails ALSA: bebob: Remove unused function prototype ALSA: fireworks: Remove meaningless mutex_destroy() ALSA: fireworks: Remove a constant over width to which it's applied ALSA: fireworks: Improve comments about Fireworks transaction ...
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/seq_clientmgr.c36
-rw-r--r--sound/core/seq/seq_fifo.c2
-rw-r--r--sound/core/timer.c4
3 files changed, 27 insertions, 15 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 9ca5e647e54b..225c73152ee9 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -660,7 +660,7 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
int atomic, int hop)
{
struct snd_seq_subscribers *subs;
- int err = 0, num_ev = 0;
+ int err, result = 0, num_ev = 0;
struct snd_seq_event event_saved;
struct snd_seq_client_port *src_port;
struct snd_seq_port_subs_info *grp;
@@ -685,8 +685,12 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIME_REAL);
err = snd_seq_deliver_single_event(client, event,
0, atomic, hop);
- if (err < 0)
- break;
+ if (err < 0) {
+ /* save first error that occurs and continue */
+ if (!result)
+ result = err;
+ continue;
+ }
num_ev++;
/* restore original event record */
*event = event_saved;
@@ -697,7 +701,7 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
up_read(&grp->list_mutex);
*event = event_saved; /* restore */
snd_seq_port_unlock(src_port);
- return (err < 0) ? err : num_ev;
+ return (result < 0) ? result : num_ev;
}
@@ -709,7 +713,7 @@ static int port_broadcast_event(struct snd_seq_client *client,
struct snd_seq_event *event,
int atomic, int hop)
{
- int num_ev = 0, err = 0;
+ int num_ev = 0, err, result = 0;
struct snd_seq_client *dest_client;
struct snd_seq_client_port *port;
@@ -724,14 +728,18 @@ static int port_broadcast_event(struct snd_seq_client *client,
err = snd_seq_deliver_single_event(NULL, event,
SNDRV_SEQ_FILTER_BROADCAST,
atomic, hop);
- if (err < 0)
- break;
+ if (err < 0) {
+ /* save first error that occurs and continue */
+ if (!result)
+ result = err;
+ continue;
+ }
num_ev++;
}
read_unlock(&dest_client->ports_lock);
snd_seq_client_unlock(dest_client);
event->dest.port = SNDRV_SEQ_ADDRESS_BROADCAST; /* restore */
- return (err < 0) ? err : num_ev;
+ return (result < 0) ? result : num_ev;
}
/*
@@ -741,7 +749,7 @@ static int port_broadcast_event(struct snd_seq_client *client,
static int broadcast_event(struct snd_seq_client *client,
struct snd_seq_event *event, int atomic, int hop)
{
- int err = 0, num_ev = 0;
+ int err, result = 0, num_ev = 0;
int dest;
struct snd_seq_addr addr;
@@ -760,12 +768,16 @@ static int broadcast_event(struct snd_seq_client *client,
err = snd_seq_deliver_single_event(NULL, event,
SNDRV_SEQ_FILTER_BROADCAST,
atomic, hop);
- if (err < 0)
- break;
+ if (err < 0) {
+ /* save first error that occurs and continue */
+ if (!result)
+ result = err;
+ continue;
+ }
num_ev += err;
}
event->dest = addr; /* restore */
- return (err < 0) ? err : num_ev;
+ return (result < 0) ? result : num_ev;
}
diff --git a/sound/core/seq/seq_fifo.c b/sound/core/seq/seq_fifo.c
index 559989992bef..53a403e17c5b 100644
--- a/sound/core/seq/seq_fifo.c
+++ b/sound/core/seq/seq_fifo.c
@@ -124,7 +124,7 @@ int snd_seq_fifo_event_in(struct snd_seq_fifo *f,
snd_use_lock_use(&f->use_lock);
err = snd_seq_event_dup(f->pool, event, &cell, 1, NULL); /* always non-blocking */
if (err < 0) {
- if (err == -ENOMEM)
+ if ((err == -ENOMEM) || (err == -EAGAIN))
atomic_inc(&f->overflow);
snd_use_lock_free(&f->use_lock);
return err;
diff --git a/sound/core/timer.c b/sound/core/timer.c
index cfd455a8ac1a..777a45e08e53 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -390,7 +390,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
struct timespec tstamp;
if (timer_tstamp_monotonic)
- do_posix_clock_monotonic_gettime(&tstamp);
+ ktime_get_ts(&tstamp);
else
getnstimeofday(&tstamp);
if (snd_BUG_ON(event < SNDRV_TIMER_EVENT_START ||
@@ -1203,7 +1203,7 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
}
if (tu->last_resolution != resolution || ticks > 0) {
if (timer_tstamp_monotonic)
- do_posix_clock_monotonic_gettime(&tstamp);
+ ktime_get_ts(&tstamp);
else
getnstimeofday(&tstamp);
}