Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Hofman <pavel.hofman@insite.cz>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: MIDI on ice1724 -  real-time kernel problem
Date: Thu, 08 May 2008 21:35:51 +0200	[thread overview]
Message-ID: <48235617.2070906@insite.cz> (raw)
In-Reply-To: <s5hd4nyh0lz.wl%tiwai@suse.de>

Takashi Iwai wrote:
> At Sat, 03 May 2008 21:12:02 +0200,
> Pavel Hofman wrote:
>>
>>
>> Takashi Iwai wrote:
>>> At Wed, 30 Apr 2008 22:07:42 +0200,
>>> Pavel Hofman wrote:
>>>> Takashi Iwai wrote:
>>>>> At Fri, 25 Apr 2008 09:06:19 +0200,
>>>>> Pavel Hofman wrote:
>>>> The code works fine on standard kernel.
>>>>
>>>> But in the RT kernel of Ubuntu 7.10 (2.6.22-14-rt, 1000HZ compared to
>>>> 250HZ of the -generic kernel), MIDI interrupts get thrown continuously,
>>>> hogging CPU with the IRQXX "process".
>>>>
>>>> When playing 44.1kHz audio with buffer size of 32768,
>>>> snd_vt1724_interrupt is called every 185ms. With the buffer size of 
>>>> 4096, it is every 23ms. So far so good.
>>>>
>>>> But when I try to output some midi, the routine gets called every 24us
>>>> (i.e. 1000 times faster). Comparing the time difference between my
>>>> several debug printk's in snd_vt1724_interrupt (approx. 5us between each
>>>> printk record a few lines of code apart) and between each call of the
>>>> method (24us), I thought there would be a loop somewhere in the
>>>> interrupt handler calling code. But /proc/interrupts really shows over
>>>> 40k interrupts a second for ICE1724.
>>>>
>>>> Changing the watermarks up to 0x1f makes no difference.
>>> That looks bad.
>>>
>>>> Masking the MIDI interrupts works, snd_vt1724_interrupt is called only
>>>> during VT1724_IRQ_MTPCM interrupts, with the MIDI status bits
>>>> MPU_TX/MPU_RX set when reading/writing with amidi.
>>> Hm, is it TX or RX, or in both cases?
>>> Could you check which one (TX or RX) causes this?
>>>
>> Both reading (amidi -p hw:0 -d) and writing (amidi -p hw:0 -S 
>> F0411042110C000000000074FF0411042110C000000) starts the TX interrupt 
>> flood (irq status: 0x20) immediately. Upon opening input as well as 
>> output the method snd_mpu401_do_reset is called - is perhaps the culprit 
>> somewhere there?
> 
> Possibly.  It write 0x00 to data at the beginning in
> snd_mpu401_uart_cmd().  What happens if you remove it?
> 

Unfortunately nothing, no change.

Actually, when does the MPU_TX interrupt get thrown? Upon exhausting 
some output buffer? I understand interrupts for DMA, but mpu uart does 
not use DMA, right?

Thanks a lot for help, I am not giving up :)

Pavel.

  reply	other threads:[~2008-05-08 19:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-22 20:23 MIDI on ice1724 - preliminary findings and questions Pavel Hofman
2008-04-23 10:05 ` Takashi Iwai
2008-04-23 11:08   ` Pavel Hofman
2008-04-23 20:19     ` MIDI on ice1724 - long delays Pavel Hofman
2008-04-24 16:29       ` Takashi Iwai
2008-04-24 20:47         ` Pavel Hofman
2008-04-25  6:22           ` Takashi Iwai
2008-04-25  7:06             ` MIDI on ice1724 - fixing HG Pavel Hofman
2008-04-25  7:10               ` Takashi Iwai
2008-04-25  7:25                 ` Pavel Hofman
2008-04-30 20:07                 ` MIDI on ice1724 - real-time kernel problem Pavel Hofman
2008-05-02 12:43                   ` Takashi Iwai
2008-05-03 19:12                     ` Pavel Hofman
2008-05-07 10:25                       ` Takashi Iwai
2008-05-08 19:35                         ` Pavel Hofman [this message]
2008-05-15  7:21                           ` Clemens Ladisch
2008-05-15  9:00                             ` Takashi Iwai
2008-05-18 20:02                             ` PATCH - MIDI on ice1724 - real-time kernel problem SOLVED Pavel Hofman
2008-05-20  8:44                               ` Clemens Ladisch
2008-05-20 19:15                                 ` Pavel Hofman

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=48235617.2070906@insite.cz \
    --to=pavel.hofman@insite.cz \
    --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