[alsa-devel] Bug in sound-unstable-2.6 ice1724

Takashi Iwai tiwai at suse.de
Sat Nov 1 10:51:12 CET 2008


At Fri, 31 Oct 2008 20:30:00 +0100,
=?UTF-8?Q?Vedran_Mileti=C4=87?= wrote:
> 
> Yes, it works. I replaced mask with 0 in that line, and it works
> exactly the same. I didn't comment or uncomment anything.

Thanks for testing.

> Is there some more testing needed?

No, I'll commit a patch.

> BTW, can you explain in short what is the issue here? I would like to
> learn something along the way.

The problem is that this register wasn't initialized to any value
by the driver.  The original code sets two bits, but these are
anyway set/reset dynamically at each open of MIDI devices, so they
don't have to be set.  Thus, the reasonable value to be set at first
is zero.


Takashi

> 2008/10/26 Takashi Iwai <tiwai at suse.de>:
> > At Sun, 26 Oct 2008 17:31:02 +0100,
> > =?UTF-8?Q?Vedran_Mileti=C4=87?= wrote:
> >>
> >> Yeap, that one does it. No need to revert it fully, though. I just
> >> uncommented the unsigned char mask line and removed that #if 0 and
> >> #endif. Now it works perfectly. Thanks! Can you fix it in your tree?
> >
> > Well, before doing that, I'd like to understand the problem more.
> >
> > If the problem is about the initial IRQ mask value, setting 0 should
> > work as well.
> > Could you change the code just to do like below, and check whether it
> > works?
> >        outb(0, ICEREG1724(ice, IRQMASK));
> >
> >
> > thanks,
> >
> > Takashi
> >
> >> 2008/10/21 Takashi Iwai <tiwai at suse.de>:
> >> > At Tue, 21 Oct 2008 10:49:18 +0200,
> >> > =?UTF-8?Q?Vedran_Mileti=C4=87?= wrote:
> >> >>
> >> >> No, that didn't fix it. :-(
> >> >>
> >> >> vedran at kalopsia:~/Media$ mplayer -ao alsa:device=hw=1.0 -srate 22050
> >> >> -format s32le get_video
> >> >> MPlayer 1.0rc2-4.3.1-DFSG-free (C) 2000-2007 MPlayer Team
> >> >> CPU: AMD Athlon(tm) Dual Core Processor 4450e (Family: 15, Model: 107,
> >> >> Stepping: 2)
> >> >> CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
> >> >> Compiled with runtime CPU detection.
> >> >> mplayer: could not connect to socket
> >> >> mplayer: No such file or directory
> >> >> Failed to open LIRC support. You will not be able to use your remote control.
> >> >>
> >> >> Playing get_video.
> >> >> libavformat file format detected.
> >> >> [lavf] Video stream found, -vid 0
> >> >> [lavf] Audio stream found, -aid 1
> >> >> VIDEO:  [FLV1]  320x240  0bpp  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
> >> >> ==========================================================================
> >> >> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> >> >> Selected video codec: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
> >> >> ==========================================================================
> >> >> ==========================================================================
> >> >> Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
> >> >> AUDIO: 22050 Hz, 2 ch, s16le, 8.0 kbit/1.13% (ratio: 1000->88200)
> >> >> Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
> >> >> ==========================================================================
> >> >> AO: [alsa] 22050Hz 2ch s32le (4 bytes per sample)
> >> >> Starting playback...
> >> >> VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
> >> >> VDec: using Planar YV12 as output csp (no 0)
> >> >> Movie-Aspect is undefined - no prescaling applied.
> >> >> VO: [xv] 320x240 => 320x240 Planar YV12
> >> >> A: 240.8 V: 245.3 A-V: -4.502 ct: -4.382 3350/3350  0%  0%  0.4% 0 0
> >> >> [AO_ALSA] alsa-lib: pcm_hw.c:488:(snd_pcm_hw_drain)
> >> >> SNDRV_PCM_IOCTL_DRAIN failed: Input/output error
> >> >
> >> > Did you build with CONFIG_SND_DEBUG=y?  I guess you get a kernel error
> >> > message like "playback drain error (DMA or IRQ..."
> >> >
> >> > If so, a relevant patch is 1083206ff44af4baa03573b4a6bac430d9d70404,
> >> >    ALSA: ice1724 - Fix TX IRQ lockup
> >> >
> >> > Try to revert it.
> >> >
> >> >
> >> > thanks,
> >> >
> >> > Takashi
> >> >
> >> >>
> >> >> Exiting... (End of file)
> >> >>
> >> >> 2008/10/20 Takashi Iwai <tiwai at suse.de>:
> >> >> > At Sun, 19 Oct 2008 11:36:35 +0200,
> >> >> > =?UTF-8?Q?Vedran_Mileti=C4=87?= wrote:
> >> >> >>
> >> >> >> I have:
> >> >> >> 01:0a.0 Multimedia audio controller: VIA Technologies Inc. VT1720/24
> >> >> >> [Envy24PT/HT] PCI Multi-Channel Audio Controller (rev 01)
> >> >> >>       Subsystem: TERRATEC Electronic GmbH PHASE 22
> >> >> >>       Flags: bus master, medium devsel, latency 64, IRQ 16
> >> >> >>       I/O ports at c880 [size=32]
> >> >> >>       I/O ports at c800 [size=128]
> >> >> >>       Capabilities: [80] Power Management version 1
> >> >> >>       Kernel driver in use: ICE1724
> >> >> >>       Kernel modules: snd-ice1724
> >> >> >> I do this:
> >> >> >> mplayer -ao alsa:device=hw=1.0 -srate 44100 -format s32le get_video
> >> >> >> Before the song ends, last sample loops for about 20-30 times, and
> >> >> >> then mplayer quits with error:
> >> >> >> alsa-lib: pcm_hw.c:488:(snd_pcm_hw_drain) SNDRV_PCM_IOCTL_DRAIN
> >> >> >> failed: Input/output error
> >> >> >>
> >> >> >> This doesn't happen on sound-2.6 and doesn't happen on
> >> >> >> sound-unstable-2.6 with E-mu 1212m.
> >> >> >
> >> >> > A suspicious commit is the one in topic/test branch,
> >> >> >
> >> >> >  commit 442dac7e02a835944bd4d6e429d0b4a2446e0204
> >> >> >  Author: Takashi Iwai <tiwai at suse.de>
> >> >> >  Date:   Tue Aug 12 13:39:02 2008 +0200
> >> >> >
> >> >> >    ALSA: Allow drain ioctl for non-blocking mode
> >> >> >
> >> >> > Could you try to revert this commit?
> >> >> >
> >> >> >
> >> >> > thanks,
> >> >> >
> >> >> > Takashi
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Vedran Miletić
> >> >
> >>
> >>
> >>
> >> --
> >> Vedran Miletić
> >
> 
> 
> 
> -- 
> Vedran Miletić


More information about the Alsa-devel mailing list