From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4773] Emit warning message if user supplied buffer/period size/ time was rejected
Date: Sat, 21 Jun 2008 20:09:32 +0000 [thread overview]
Message-ID: <E1KA9Ou-0000iL-IU@cvs.savannah.gnu.org> (raw)
Revision: 4773
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4773
Author: malc
Date: 2008-06-21 20:09:32 +0000 (Sat, 21 Jun 2008)
Log Message:
-----------
Emit warning message if user supplied buffer/period size/time was rejected
Modified Paths:
--------------
trunk/audio/alsaaudio.c
Modified: trunk/audio/alsaaudio.c
===================================================================
--- trunk/audio/alsaaudio.c 2008-06-21 19:50:10 UTC (rev 4772)
+++ trunk/audio/alsaaudio.c 2008-06-21 20:09:32 UTC (rev 4773)
@@ -334,6 +334,8 @@
}
if (req->buffer_size) {
+ unsigned long obt;
+
if (size_in_usec) {
int dir = 0;
unsigned int btime = req->buffer_size;
@@ -344,6 +346,7 @@
&btime,
&dir
);
+ obt = btime;
}
else {
snd_pcm_uframes_t bsize = req->buffer_size;
@@ -353,15 +356,22 @@
hw_params,
&bsize
);
+ obt = bsize;
}
if (err < 0) {
alsa_logerr2 (err, typ, "Failed to set buffer %s to %d\n",
size_in_usec ? "time" : "size", req->buffer_size);
goto err;
}
+
+ if (obt - req->buffer_size)
+ dolog ("Requested buffer %s %u was rejected, using %lu\n",
+ size_in_usec ? "time" : "size", req->buffer_size, obt);
}
if (req->period_size) {
+ unsigned long obt;
+
if (size_in_usec) {
int dir = 0;
unsigned int ptime = req->period_size;
@@ -372,6 +382,7 @@
&ptime,
&dir
);
+ obt = ptime;
}
else {
snd_pcm_uframes_t psize = req->period_size;
@@ -381,6 +392,7 @@
hw_params,
&psize
);
+ obt = psize;
}
if (err < 0) {
@@ -388,6 +400,10 @@
size_in_usec ? "time" : "size", req->period_size);
goto err;
}
+
+ if (obt - req->period_size)
+ dolog ("Requested period %s %u was rejected, using %lu\n",
+ size_in_usec ? "time" : "size", req->period_size, obt);
}
err = snd_pcm_hw_params (handle, hw_params);
reply other threads:[~2008-06-21 20:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1KA9Ou-0000iL-IU@cvs.savannah.gnu.org \
--to=av1474@comtv.ru \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).