All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Paul Davis <paul@linuxaudiosystems.com>,
	Jaroslav Kysela <perex@suse.cz>,
	alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: emu10k1 multichannel playback design (was Re: [PATCH] emu10k1: add interval timer support)
Date: Sat, 25 Sep 2004 22:51:46 -0400	[thread overview]
Message-ID: <1096167105.1357.5.camel@krustophenia.net> (raw)
In-Reply-To: <1096160120.3697.35.camel@krustophenia.net>

On Sat, 2004-09-25 at 20:55, Lee Revell wrote:
> Looks good, until it Oops'es.  This is because currently the voice
> allocator only handles one or two voices at a time, it blows up as soon
> as I go to initialize the third voice.  I am working on this.

OK, I fixed the voice allocator to handle multichannel PCM.  Now it
looks like the prepare callback is being called over and over in a loop.

Here is the debug output from the prepare callback:

in snd_emu10k1_efx_playback_prepare - start_addr 0x1000 end_addr 0x11000
init voice - master 1 extra 0 start_addr 0x1000 end_addr 0x2000
init voice - master 1 extra 0 start_addr 0x2000 end_addr 0x3000
init voice - master 1 extra 0 start_addr 0x3000 end_addr 0x4000
init voice - master 1 extra 0 start_addr 0x4000 end_addr 0x5000
init voice - master 1 extra 0 start_addr 0x5000 end_addr 0x6000
init voice - master 1 extra 0 start_addr 0x6000 end_addr 0x7000
init voice - master 1 extra 0 start_addr 0x7000 end_addr 0x8000
init voice - master 1 extra 0 start_addr 0x8000 end_addr 0x9000
init voice - master 1 extra 0 start_addr 0x9000 end_addr 0xa000
init voice - master 1 extra 0 start_addr 0xa000 end_addr 0xb000
init voice - master 1 extra 0 start_addr 0xb000 end_addr 0xc000
init voice - master 1 extra 0 start_addr 0xc000 end_addr 0xd000
init voice - master 1 extra 0 start_addr 0xd000 end_addr 0xe000
init voice - master 1 extra 0 start_addr 0xe000 end_addr 0xf000
init voice - master 1 extra 0 start_addr 0xf000 end_addr 0x10000
init voice - master 1 extra 0 start_addr 0x10000 end_addr 0x11000
in snd_emu10k1_efx_playback_prepare - start_addr 0x1000 end_addr 0x11000
init voice - master 1 extra 0 start_addr 0x1000 end_addr 0x2000
init voice - master 1 extra 0 start_addr 0x2000 end_addr 0x3000

When I start jack, the above repeats endlessly.

Here is the prepare callback:

static int snd_emu10k1_efx_playback_prepare(snd_pcm_substream_t * substream)
{
        emu10k1_t *emu = snd_pcm_substream_chip(substream);
        snd_pcm_runtime_t *runtime = substream->runtime;
        emu10k1_pcm_t *epcm = runtime->private_data;
        unsigned int start_addr, end_addr;

        start_addr = epcm->start_addr;
        end_addr = epcm->start_addr + snd_pcm_lib_buffer_bytes(substream);
        printk("in snd_emu10k1_efx_playback_prepare - start_addr 0x%x end_addr 0x%x\n", start_addr,end_addr);

        /*
         * now we need to divide the buffer into 16 chunks and initialize
         * 16 voices to make the noninterleaved 16 channel stream
         */
        unsigned int channel_size;
        int i;
        channel_size = ( end_addr - start_addr ) / 16;
        for (i = 0; i < 16; i++) {
            snd_emu10k1_pcm_init_voice(emu, 1, 0, epcm->voices[i],
                                   start_addr, start_addr+channel_size);
            start_addr += channel_size;
        }
   
        return 0;
}

I am still missing parts of the driver, like the interrupt handler.  But
it seems like the prepare callback should not loop this way.  Am I doing
something wrong?

Lee



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

  reply	other threads:[~2004-09-26  2:51 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-17  7:19 [PATCH] emu10k1: add interval timer support Lee Revell
2004-09-17  8:59 ` Jaroslav Kysela
2004-09-21 19:36   ` Lee Revell
2004-09-22 10:16     ` Takashi Iwai
2004-09-22 10:17       ` Jaroslav Kysela
2004-09-22 15:01       ` Lee Revell
2004-09-24 13:43         ` Takashi Iwai
2004-09-24 13:56           ` Jaroslav Kysela
2004-09-24 14:53             ` Paul Davis
2004-09-24 15:13               ` Takashi Iwai
2004-09-24 15:26                 ` Paul Davis
2004-09-24 15:33                   ` Takashi Iwai
2004-09-24 21:02                 ` emu10k1 multichannel playback design (was Re: [PATCH] emu10k1: add interval timer support) Lee Revell
2004-09-24 22:32                   ` Paul Davis
2004-09-24 22:57                     ` Lee Revell
2004-09-25  4:05                     ` Lee Revell
2004-09-26  0:55                   ` Lee Revell
2004-09-26  2:51                     ` Lee Revell [this message]
2004-09-26  3:10                       ` Lee Revell
2004-09-26  3:15                       ` Paul Davis
2004-09-26  3:19                         ` Lee Revell
2004-09-26  3:50                         ` Lee Revell
2004-09-26  6:50                           ` Lee Revell
2004-09-26 11:38                   ` Jaroslav Kysela
2004-09-27  0:40                     ` Lee Revell
2004-09-27  6:48                       ` Jaroslav Kysela
2004-09-27 14:35                         ` Lee Revell
2004-11-03 19:43   ` [PATCH] emu10k1: add interval timer support Lee Revell
2004-11-03 21:24     ` Lee Revell
2004-11-03 23:08       ` Lee Revell
2004-11-09 14:24       ` Takashi Iwai
2004-11-10  4:32         ` Lee Revell
2004-11-10  9:50           ` Takashi Iwai
2004-11-04 17:05     ` Jaroslav Kysela
2004-11-04 19:13       ` Lee Revell

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=1096167105.1357.5.camel@krustophenia.net \
    --to=rlrevell@joe-job.com \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=paul@linuxaudiosystems.com \
    --cc=perex@suse.cz \
    --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 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.