From: "Krzysztof Helt" <krzysztof.h1@wp.pl>
To: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: [PATCH] sparc dbri: info->offset is now zeroed
Date: Thu, 24 Aug 2006 20:55:38 +0200 [thread overview]
Message-ID: <44edf62ae7198@wp.pl> (raw)
[-- Attachment #1: Type: text/plain, Size: 525 bytes --]
From: Krzysztof Helt (krzysztof.h1@wp.pl)
This patch fixes two issues:
1. The info->offset is not zeroed when new stream is prepared to
be played or recorded.
2. Incorrect modulo value used in pointer function (pointed out
by Takashi Iwai).
Signed-off-by: Krzysztof Helt (krzysztof.h1@wp.pl)
---
----------------------------------------------------
Nic nie musisz zamawiać, nic nie musisz kupować!
Po prostu odszukaj obrazek i wygraj nagrody:
http://klik.wp.pl/?adr=www.pasaz.wp.pl%2Fkonkurs.html&sid=853
[-- Attachment #2: dbri-patch13.diff --]
[-- Type: application/octet-stream, Size: 1117 bytes --]
--- alsa-driver-1.0.12rc2/alsa-kernel/sparc/dbri.c 2006-08-24 20:33:35.000000000 +0200
+++ linux-2.6.17a/sound/sparc/dbri.c 2006-08-24 20:21:40.000000000 +0200
@@ -628,7 +628,7 @@ to send them to the DBRI.
*/
-#define MAXLOOPS 10
+#define MAXLOOPS 20
/*
* Wait for the current command string to execute
*/
@@ -2110,12 +2118,13 @@ static int snd_dbri_prepare(struct snd_p
*/
ret = setup_descs(dbri, DBRI_STREAMNO(substream),
snd_pcm_lib_period_bytes(substream));
+ info->offset = 0;
runtime->stop_threshold = DBRI_TD_MAXCNT / runtime->channels;
spin_unlock_irq(&dbri->lock);
- dprintk(D_USR, "prepare audio output. %d bytes\n", info->size);
+ dprintk(D_USR, "prepare audio output. pipe %d, %d bytes\n", info->pipe, info->size);
return ret;
}
@@ -2150,7 +2159,7 @@ static snd_pcm_uframes_t snd_dbri_pointe
snd_pcm_uframes_t ret;
ret = bytes_to_frames(substream->runtime, info->offset)
- % (substream->runtime->buffer_size + 1);
+ % substream->runtime->buffer_size;
dprintk(D_USR, "I/O pointer: %ld frames of %ld.\n",
ret, substream->runtime->buffer_size);
return ret;
[-- Attachment #3: Type: text/plain, Size: 373 bytes --]
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
[-- Attachment #4: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel
next reply other threads:[~2006-08-24 18:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-24 18:55 Krzysztof Helt [this message]
2006-08-25 9:29 ` [PATCH] sparc dbri: info->offset is now zeroed Takashi Iwai
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=44edf62ae7198@wp.pl \
--to=krzysztof.h1@wp.pl \
--cc=alsa-devel@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.