From: "Ahmet İnan" <ainan@mathematik.uni-freiburg.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] improved snd-aloop quality when using certain samplerates and kernel HZ
Date: Wed, 20 Feb 2008 15:19:06 +0100 [thread overview]
Message-ID: <20080220141906.GA15096@mathematik.uni-freiburg.de> (raw)
In-Reply-To: <s5hhcg3svd4.wl%tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 453 bytes --]
more cleanups.
removed some unneeded stuff.
patch is relative to current hg-tree.
http://www.mathematik.uni-freiburg.de/IAM/homepages/ainan/alsa-driver-hg-aloop-ainan-patch0.diff
Signed-off-by: Ahmet İnan <ainan <at> mathematik.uni-freiburg.de>
btw, my "nice" idea turned out to be a bitch, again. its really funny how
worse almoust always is better. :(
ahmet
--
admin der abteilung für angewandte mathematik, tel. 0761-203-5626
[-- Attachment #2: alsa-driver-hg-aloop-ainan-patch0.diff --]
[-- Type: text/plain, Size: 1257 bytes --]
diff -r 4ce2c0f9f2ef drivers/aloop-kernel.c
--- a/drivers/aloop-kernel.c Wed Feb 20 12:46:42 2008 +0100
+++ b/drivers/aloop-kernel.c Wed Feb 20 15:05:16 2008 +0100
@@ -86,7 +86,6 @@ typedef struct snd_card_loopback_pcm {
unsigned int pcm_bps; /* bytes per second */
unsigned int pcm_hz; /* HZ */
unsigned int pcm_irq_pos; /* IRQ position */
- unsigned int pcm_buf_pos; /* position in buffer */
unsigned int pcm_period_pos; /* period aligned pos in buffer */
struct snd_pcm_substream *substream;
struct snd_card_loopback_cable *cable;
@@ -165,7 +164,6 @@ static int snd_card_loopback_prepare(str
dpcm->pcm_size = frames_to_bytes(runtime, runtime->buffer_size);
dpcm->pcm_count = frames_to_bytes(runtime, runtime->period_size);
dpcm->pcm_irq_pos = 0;
- dpcm->pcm_buf_pos = 0;
dpcm->pcm_period_pos = 0;
cable->hw.formats = (1ULL << runtime->format);
@@ -216,8 +214,6 @@ static void snd_card_loopback_timer_func
spin_lock_irq(&dpcm->lock);
dpcm->pcm_irq_pos += dpcm->pcm_bps;
- dpcm->pcm_buf_pos += dpcm->pcm_bps;
- dpcm->pcm_buf_pos %= dpcm->pcm_size * dpcm->pcm_hz;
if (dpcm->pcm_irq_pos >= dpcm->pcm_count * dpcm->pcm_hz) {
dpcm->pcm_irq_pos %= dpcm->pcm_count * dpcm->pcm_hz;
dpcm->pcm_period_pos += dpcm->pcm_count;
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2008-02-20 14:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 3:01 [PATCH] improved snd-aloop quality when using certain samplerates and kernel HZ Ahmet İnan
2008-02-19 12:50 ` Ahmet İnan
2008-02-20 11:47 ` Takashi Iwai
2008-02-20 14:19 ` Ahmet İnan [this message]
2008-02-20 16:08 ` Takashi Iwai
2008-02-21 0:06 ` Ahmet İnan
2008-02-21 6:54 ` Takashi Iwai
2008-02-22 18:05 ` Ahmet İnan
2008-02-28 11:48 ` Takashi Iwai
2008-03-01 11:55 ` Ahmet İnan
2008-03-01 15:22 ` Takashi Iwai
2008-03-01 23:35 ` Ahmet İnan
2008-03-06 15:51 ` Takashi Iwai
2008-03-06 20:51 ` Ahmet İnan
2008-05-31 20:00 ` Problem with aloop Ahmet İnan
2008-06-01 16:15 ` Benjamin van den Hout
2008-06-02 8:08 ` Ahmet İnan
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=20080220141906.GA15096@mathematik.uni-freiburg.de \
--to=ainan@mathematik.uni-freiburg.de \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/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