Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
I've the same symptom. Even with kernel 2.6.4 and the patch provided by Clemens. I own a Midisport 4x4. So it seems not to be model specific. Initialzing is fine. But unplugin/replugin will request a reboot with sysrq intervention. First I've had enabled the USB 2.0 features on my motherboard with the same effect. But with the disadvantage not _receiving_ any MIDI messages. Sending was quite fine. So I switched to USB 1.1 in the BIOS and receiving was been although possible. Regards, Hartmut --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] snd_pcm_wait strangeness when resampling
I've noticed some strange things with snd_pcm_wait. My application opens the sound device in non-blocking mode and uses snd_pcm_wait whenever snd_pcm_writei return EAGAIN. This works fine as long as ALSA isn't doing any resampling. However, when resampling (e.g. from 44.1 kHz to 48 kHz) snd_pcm_wait returns immediately, insisting that there is room in the buffer, after which snd_pcm_writei obviously returns EAGAIN once more. The same thing happens if I use OSS emulation and select() or poll(). Replacing the snd_pcm_wait call with usleep(1) makes the CPU load look normal again, while the application still works. I am using Linux 2.6.4, ALSA driver 1.0.3 and library 1.0.3a with a SIS7012 chip. It behaves the same way with kernel 2.6.3 and driver 1.0.2c. I'm not quite sure when it started. This application used to work properly. Has something changed so I need to modify my application? -- Måns Rullgård [EMAIL PROTECTED] --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] usx2y firmware update
Hi, Tascam has released v3.24 of their windows drivers and the firmware for the us224 and us428 changed (only EZ-USB), but I found no changes for the us122. You can find both changed and converted firmware files here: http://www.langerland.de/us122/usx2y-firmware_v3.24.tar.bz2 Please test! I have no information about the changes, but hopefully it will fix something. Perhaps other usx2y users know more... bye, martin --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
sorry about my fuzzy observations, my bad, even with the last CVS I got those errors line when rmmoding snd-usb-audio, while the device is on. (I didn't redo the same actions than before) Is there any way to maybe unplug the device safely (usbfs point of view) ? I was guessing smtgh like a fxUNload programm. There is obviously something from the midisport1x1 who bugs snd-usb-audio. Indepandently they works both fine :) Maybe I've a easy view 'bout how the things are working, but I would expect from snd-usb-audio a timeout, after which he gives up, trying to communicate with the device if nothnig happens. Cheers, Mathieu --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] problems with mono audio.
Jaroslav Kysela wrote: On Thu, 11 Mar 2004, James Courtier-Dutton wrote: Which devices can a mono stream be played on? It seems that the only device a mono stream can be played on is the "default" pcm device. Devices like "front" and "rear" are stereo only devices. It would be nice if alsa-lib would open one of these devices, and if the application tries to set 1 channel instead of 2, then somehow make alsa-lib do the duplication of the channels. A similar thing should happen for "surround40" device. If 1 channel is asked for, alsa-lib should duplicate it for all channels. If 2 channels are asked for, then alsa-lib should create 4 channels automatically. alsa-lib seems to manage to do this sort of thing for sample rates, and sample formats, why not number of channels ? Have you tried 'plug:front' combination ;-) Jaroslav Yes, I tried all sorts of combinations. When I play a mono stream to the "front" or "rear" device I get no sound at all, but the hw_params for 1 channel is accepted, so my application thinks it should work. This has been tested with aplay. The sample file used was recorded with the command: - arecord -fS16_LE -c1 -r48000 test1.wav and played back with: - aplay -Dfront test1.wav Playing WAVE 'test1.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono Cheers James --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
Thanks for your reply, ok, what I did, is first to apply your patch to my source tree (1.0.3rc2), clean, compile, install, and even reboot. That doesn't output anymore the two lines "urb status -104", and "usb_submit_urb: -32" but still hang after printing: "drivers/usb/core/usb.c: deregistering driver snd-usb-audio" So I have dl the CVS and reinstalled alsa-driver. That just have the same effect :/ Mathieu --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] problems with mono audio.
On Thu, 11 Mar 2004, James Courtier-Dutton wrote: > Which devices can a mono stream be played on? > It seems that the only device a mono stream can be played on is the > "default" pcm device. > > Devices like "front" and "rear" are stereo only devices. > It would be nice if alsa-lib would open one of these devices, and if the > application tries to set 1 channel instead of 2, then somehow make > alsa-lib do the duplication of the channels. > > A similar thing should happen for "surround40" device. If 1 channel is > asked for, alsa-lib should duplicate it for all channels. If 2 channels > are asked for, then alsa-lib should create 4 channels automatically. > > alsa-lib seems to manage to do this sort of thing for sample rates, and > sample formats, why not number of channels ? Have you tried 'plug:front' combination ;-) Jaroslav - Jaroslav Kysela <[EMAIL PROTECTED]> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] problems with mono audio.
Which devices can a mono stream be played on? It seems that the only device a mono stream can be played on is the "default" pcm device. Devices like "front" and "rear" are stereo only devices. It would be nice if alsa-lib would open one of these devices, and if the application tries to set 1 channel instead of 2, then somehow make alsa-lib do the duplication of the channels. A similar thing should happen for "surround40" device. If 1 channel is asked for, alsa-lib should duplicate it for all channels. If 2 channels are asked for, then alsa-lib should create 4 channels automatically. alsa-lib seems to manage to do this sort of thing for sample rates, and sample formats, why not number of channels ? Cheers James --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Re: Badness in remove_proc_entry called from snd_via82xx_remove (2.6.4-mm)
At Thu, 11 Mar 2004 18:38:16 +0100, Alexander Nyberg wrote: > > This happens at shutdown when alsa is to be closed with kernel 2.6.4-mm. > I'm running debian sid, snd_via82xx compiled as module. > Happens also on 2.6.4-rc2-mm1, I can try on more kernels as well if it > is not a clear case. > > > I slapped a printk on these just before the badness: > de->subdir->name = "id", de->name = "card0" does the attached patch work? -- Takashi Iwai <[EMAIL PROTECTED]>ALSA Developer - www.alsa-project.org --- linux/sound/core/init.c 4 Mar 2004 17:54:06 - 1.37 +++ linux/sound/core/init.c 11 Mar 2004 19:01:42 - @@ -281,7 +281,7 @@ } if (card->private_free) card->private_free(card); - snd_info_free_entry(card->proc_id); + snd_info_unregister(card->proc_id); if (snd_info_card_free(card) < 0) { snd_printk(KERN_WARNING "unable to free card info\n"); /* Not fatal error */ --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] drivers in alsa-driver tree with 2.6 kernels
At Thu, 11 Mar 2004 17:53:46 +0200, Sasha Khapyorsky wrote: > > On Thu, 11 Mar 2004 14:27:59 +0100 > Takashi Iwai <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > does anyone use the following drivers with a 2.6 kernel successfully? > > if it's confirmed, i'd like to move them to alsa-kernel tree, so that > > they can be submitted to 2.6 linux tree soon. > > > > - snd-usb-usx2y > > - snd-hdspm > > - snd-intel8x0m > > I am using 'snd-intel8x0m'. :) ok, it's moved to alsa-kernel now. Takashi --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] drivers in alsa-driver tree with 2.6 kernels
At Thu, 11 Mar 2004 19:08:47 +0100, Martin Langer wrote: > > On Thu, Mar 11, 2004 at 02:27:59PM +0100, Takashi Iwai wrote: > > Hi, > > > > does anyone use the following drivers with a 2.6 kernel successfully? > > if it's confirmed, i'd like to move them to alsa-kernel tree, so that > > they can be submitted to 2.6 linux tree soon. > > > > - snd-usb-usx2y > > - snd-hdspm > > - snd-intel8x0m > > > > > > note that now au88x0 and atiixp drivers are already in alsa-kernel > > tree. > > > > Don't forget snd-msnd in the isa directory. I guess it's quite a long time > in the alsa-driver tree. ( btw: I don't have such a card. ) well, obviously it needs more rewrite for 2.6 kernels... if anyone wants to have for 2.6 and have enough time for debugging, please let me know. there are other drivers not listed above, but it's intentional. pdplus is broken, serialmidi is not for 2.6, and Clemens is workon more on mpu401-acpi to merge with mpu401-uart. Takashi --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: FW: [Alsa-devel] DMA producer/consumer
At Thu, 11 Mar 2004 18:43:39 +0100 (CET), Jaroslav wrote: > > On Thu, 11 Mar 2004, Takashi Iwai wrote: > > > unfortunately, the current implementation of ALSA PCM middle layer > > isn't well suited for this kind of hardwares. it'll be a bit more > > complicated than you think. > > I don't think that's this case. I'm not sure, if the basic midlevel > mechanism is understood: The midle level code expects that driver > start/stop the stream in the trigger callback, so if you can queue > more 'periods' into the DMA engine, do it and abort/pause the transfer > only the trigger callback request. You don't need to check appl/hw_ptr > in the lowlevel code. hmm, if i understand correctly, this DMA engine needs the update of DMA queue. i.e. the driver needs to feed chunks manually in prior to the DMA start, and continues feeding the available chunks after that as long as the stream is running. this is somewhat analogous with the case with the external hardware buffer. correct me if i'm wrong. Takashi --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: FW: [Alsa-devel] DMA producer/consumer
On Thu, 11 Mar 2004, Takashi Iwai wrote: > At Thu, 11 Mar 2004 18:43:39 +0100 (CET), > Jaroslav wrote: > > > > On Thu, 11 Mar 2004, Takashi Iwai wrote: > > > > > unfortunately, the current implementation of ALSA PCM middle layer > > > isn't well suited for this kind of hardwares. it'll be a bit more > > > complicated than you think. > > > > I don't think that's this case. I'm not sure, if the basic midlevel > > mechanism is understood: The midle level code expects that driver > > start/stop the stream in the trigger callback, so if you can queue > > more 'periods' into the DMA engine, do it and abort/pause the transfer > > only the trigger callback request. You don't need to check appl/hw_ptr > > in the lowlevel code. > > hmm, if i understand correctly, this DMA engine needs the update of > DMA queue. i.e. the driver needs to feed chunks manually in prior > to the DMA start, and continues feeding the available chunks after > that as long as the stream is running. this is somewhat analogous > with the case with the external hardware buffer. It was case for sb8 driver, I think that all newer hardware which can do DMA transfers is designed to enqueue more blocks to avoid fifo underruns at the block boundary. At least the SA11xx ARM platform has the DMA engine for two blocks (one can be prepared during transfer of the opposite). Jaroslav - Jaroslav Kysela <[EMAIL PROTECTED]> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] drivers in alsa-driver tree with 2.6 kernels
On Thu, Mar 11, 2004 at 02:27:59PM +0100, Takashi Iwai wrote: > Hi, > > does anyone use the following drivers with a 2.6 kernel successfully? > if it's confirmed, i'd like to move them to alsa-kernel tree, so that > they can be submitted to 2.6 linux tree soon. > > - snd-usb-usx2y > - snd-hdspm > - snd-intel8x0m > > > note that now au88x0 and atiixp drivers are already in alsa-kernel > tree. > Don't forget snd-msnd in the isa directory. I guess it's quite a long time in the alsa-driver tree. ( btw: I don't have such a card. ) bye, martin --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: FW: [Alsa-devel] DMA producer/consumer
On Thu, 11 Mar 2004, Takashi Iwai wrote: > unfortunately, the current implementation of ALSA PCM middle layer > isn't well suited for this kind of hardwares. it'll be a bit more > complicated than you think. I don't think that's this case. I'm not sure, if the basic midlevel mechanism is understood: The midle level code expects that driver start/stop the stream in the trigger callback, so if you can queue more 'periods' into the DMA engine, do it and abort/pause the transfer only the trigger callback request. You don't need to check appl/hw_ptr in the lowlevel code. Jaroslav - Jaroslav Kysela <[EMAIL PROTECTED]> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Re: [2.6.3] snd_intel8x0: playing to fast
Luca <[EMAIL PROTECTED]> writes: > Il Wed, Mar 10, 2004 at 11:08:22PM +0100, M?ns Rullg?rd ha scritto: >> *This message was transferred with a trial version of CommuniGate(tm) Pro* >> Luca <[EMAIL PROTECTED]> writes: >> >> > Hi, >> > I'm using linux 2.6.3 with alsalib 1.0.2c. When using alsa output plugin >> > of XMMS or mplayer the song is played too fast. Using OSS emulation >> > works fine. >> > >> > This is from bootlog: >> > >> > intel8x0_measure_ac97_clock: measured 49482 usecs >> > intel8x0: clocking to 48000 >> >> Make sure the programs are using device "default" or "plughw:0,0" (or >> whatever device numbers you like). If the programs can't be persuaded >> to do that they are buggy. > > mplayer is using hw:0,0. Bug. > alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian) > alsa-init: compiled for ALSA-1.0.3 > alsa-init: soundcard set to hw:0 > alsa-init: pcm opend in block-mode > alsa-init: chunksize set to 1024 > alsa-init: current val=16, fragcount=16 > alsa-init: got buffersize=65536 > alsa9: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian > > It doens't like plugwh:0,0: > > alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian) > alsa-init: compiled for ALSA-1.0.3 > alsa-init: soundcard set to plughw > alsa-init: pcm opend in block-mode > alsa-init: unable to set periodsize: Invalid argument Bug. > Btw, mplayer from CVS (checked out today) works nicely with -ao alsa1x: > > alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian) > alsa-init: compiled for ALSA-1.0.3 > alsa-init: got device=0, subdevice=0 > alsa-init: 1 soundcard found, using: hw:0,0 > alsa-init: pcm opened in block-mode > alsa-init: chunksize set to 1024 > alsa-init: fragcount=16 > alsa-init: got buffersize=65536 > alsa1x: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian > ... > [resample] Changing sample rate to 48000Hz > [resample] Changing sample rate to 48000Hz > [resample] Using linear interpolation. > > So my sound card accept sound only at 48000Hz but old mplayer didn't > notice that alsa-lib doesn't accept its request for 44100Hz. Correct? So it seems. -- Måns Rullgård [EMAIL PROTECTED] --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Hoping someone can help me (Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed.)
On Thu, 2004-03-11 at 12:19, Jaroslav Kysela wrote: > On Thu, 11 Mar 2004, Ove Kaaven wrote: > > > ons, 10.03.2004 kl. 18.32 skrev Niels Christian ?rgaard: > > > > > > The reason for me being so confused is that this occures at the call > > > "snd_pcm_readi(snd_pcm_t *, void *, snd_pcm_uframes_t )", which for > > > starters ain't mmap :) I use "snd_pcm_delay(snd_pcm_t *, > > > snd_pcm_sframes_t *)" to verify that there is sufficient data in the > > > queue, before calling readi(), > > > > Did you remember to call snd_pcm_avail_update() right before calling > > readi()? The docs imply that snd_pcm_delay does not update the value > > returned by the "snd_pcm_mmap_avail" in the assertion, but > > snd_pcm_avail_update() does (by using the latest value from stuff like > > snd_pcm_delay or IRQ handlers, so call it after snd_pcm_delay). > > This call is required only for mmap access not for r/w access. > I had tried using avail_update(), not finding anything telling me that it was mmap-only. I stopped, as it would always return 0, and subsequent readi()'s produced 0 samples. /Nc -- "An object is an object, not a pointer. However, objects are accessed through a reference, which in implementation, is typically a pointer." signature.asc Description: This is a digitally signed message part
Re: [Alsa-devel] drivers in alsa-driver tree with 2.6 kernels
On Thu, 11 Mar 2004 14:27:59 +0100 Takashi Iwai <[EMAIL PROTECTED]> wrote: > Hi, > > does anyone use the following drivers with a 2.6 kernel successfully? > if it's confirmed, i'd like to move them to alsa-kernel tree, so that > they can be submitted to 2.6 linux tree soon. > > - snd-usb-usx2y > - snd-hdspm > - snd-intel8x0m I am using 'snd-intel8x0m'. :) Sasha. > > > note that now au88x0 and atiixp drivers are already in alsa-kernel > tree. > > > Takashi > > > --- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President and CEO of > GenToo technologies. Learn everything from fundamentals to system > administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click > ___ > Alsa-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/alsa-devel --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
Mathieu Geli wrote: > I'm trying to plug/unplug the midisport1x1 from M-Audio. The plug > works like a charm, hotplug does its job, load the firmware > (fxload) and snd-usb-audio, if not inserted, is auto-loaded. But > just hang, trying to rmmoding snd-usb-audio or anything else usb > related will just hang. There was a bug which has been fixed three days ago (after 1.0.3 came out). Either get the latest version from the CVS, or apply the patch below. HTH Clemens -- --- alsa-kernel/usb/usbmidi.c 3 Mar 2004 11:35:15 - 1.24 +++ alsa-kernel/usb/usbmidi.c 8 Mar 2004 09:34:05 - 1.25 @@ -453,8 +453,16 @@ usbmidi_out_port_t* port = (usbmidi_out_port_t*)substream->runtime->private_data; port->active = up; - if (up) + if (up) { + if (port->ep->umidi->chip->shutdown) { + /* gobble up remaining bytes to prevent wait in +* snd_rawmidi_drain_output */ + while (!snd_rawmidi_transmit_empty(substream)) + snd_rawmidi_transmit_ack(substream, 1); + return; + } tasklet_hi_schedule(&port->ep->tasklet); + } } static int snd_usbmidi_input_open(snd_rawmidi_substream_t* substream) --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Re: [2.6.3] snd_intel8x0: playing to fast
Il Wed, Mar 10, 2004 at 11:08:22PM +0100, M?ns Rullg?rd ha scritto: > *This message was transferred with a trial version of CommuniGate(tm) Pro* > Luca <[EMAIL PROTECTED]> writes: > > > Hi, > > I'm using linux 2.6.3 with alsalib 1.0.2c. When using alsa output plugin > > of XMMS or mplayer the song is played too fast. Using OSS emulation > > works fine. > > > > This is from bootlog: > > > > intel8x0_measure_ac97_clock: measured 49482 usecs > > intel8x0: clocking to 48000 > > Make sure the programs are using device "default" or "plughw:0,0" (or > whatever device numbers you like). If the programs can't be persuaded > to do that they are buggy. mplayer is using hw:0,0. alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian) alsa-init: compiled for ALSA-1.0.3 alsa-init: soundcard set to hw:0 alsa-init: pcm opend in block-mode alsa-init: chunksize set to 1024 alsa-init: current val=16, fragcount=16 alsa-init: got buffersize=65536 alsa9: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian It doens't like plugwh:0,0: alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian) alsa-init: compiled for ALSA-1.0.3 alsa-init: soundcard set to plughw alsa-init: pcm opend in block-mode alsa-init: unable to set periodsize: Invalid argument Also my .asoundrc was very minimal: pcm.!default { type hw card 0 } ctl.!default { type hw card 0 } Now I added: pcm_slave.sl2 { pcm "hw:0,0" rate 48000 } pcm.foobar { type rate slave sl2 } But, again, MPlayer refuse to work: alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian) alsa-init: compiled for ALSA-1.0.3 alsa-init: soundcard set to foobar alsa-init: pcm opend in block-mode alsa-init: unable to set periodsize: Invalid argument aplay does recognise -Dfoobar (and work even without it). > Well, those two are buggy anyway. Yep, it seems so :) Btw, mplayer from CVS (checked out today) works nicely with -ao alsa1x: alsa-init: requested format: 44100 Hz, 2 channels, Signed 16-bit (Little-Endian) alsa-init: compiled for ALSA-1.0.3 alsa-init: got device=0, subdevice=0 alsa-init: 1 soundcard found, using: hw:0,0 alsa-init: pcm opened in block-mode alsa-init: chunksize set to 1024 alsa-init: fragcount=16 alsa-init: got buffersize=65536 alsa1x: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian ... [resample] Changing sample rate to 48000Hz [resample] Changing sample rate to 48000Hz [resample] Using linear interpolation. So my sound card accept sound only at 48000Hz but old mplayer didn't notice that alsa-lib doesn't accept its request for 44100Hz. Correct? thanks, Luca -- Home: http://kronoz.cjb.net La differenza fra l'intelligenza e la stupidita`? All'intelligenza c'e` un limite. --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] NForce hardware mixing (snd_intel8x0)
I don't know if this is the best place to ask this, but is there any statements on when hardware sound mixing with nforce-like soundcards (snd_intel8x0) will be ready? TIA. Cláudio Sampaio --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: FW: [Alsa-devel] DMA producer/consumer
At Thu, 11 Mar 2004 09:30:31 +0530, Gupta, Kshitij wrote: > > Any comments on this would be really helpful... > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Gupta, > Kshitij > Sent: Wednesday, March 10, 2004 5:06 PM > To: [EMAIL PROTECTED] > Subject: [Alsa-devel] DMA producer/consumer > > > hi, > > > A typical core pcm playback flow (simplified for representation) > > > static void arch_pcm_start_dma(struct arch_pcm_runtime *s) > { > ... > > ret = __arch_start_dma(s->dma_ch, pos, s->dma_size); > ... > ssr->dma_pos = pos; > } > > > static void arch_pcm_dma_callback(void *data) > { > ... > > if (s->stream) > snd_pcm_period_elapsed(s->stream); > > spin_lock(&s->lock); > if (s->state & ST_RUNNING) > arch_pcm_start_dma(s); > spin_unlock(&s->lock); > > ... > } > > static int chip_pcm_trigger(snd_pcm_substream_t *substream, int cmd) > { > ... > > switch (cmd) { > case SNDRV_PCM_TRIGGER_START: > arch_clear_dma(s->dma_ch); > arch_pcm_start_dma(s->dma_ch); > ... > break; > > ... > } > > > Now in this flow chip_pcm_trigger calls the arch_pcm_start_dma, which then > starts a dma transfer. Callback is called when the dma transfer ends, which > then notifies the ALSA middle layer about the end of one period and then > starts another dma transfer. > > The question I want to ask is about the continuity of data transferred to > the actual codec. In the above flow, next dma transfer is started only when > the previous one ends. So this mechanism will give us small jitters in the > audio playback. unfortunately, the current implementation of ALSA PCM middle layer isn't well suited for this kind of hardwares. it'll be a bit more complicated than you think. basically, the dma queueing can be done in the ack callback. this is used for the hardwares with indirect buffer transfer, such as emu10k1's fx pcm or cs46xx's pcms. check pci/emu10k1/emufx.c or pci/cs46xx/cs46xx_lib.c. with this mechanism, you'll need to book-keep appl_ptr by yourself, and check the difference between the actual runtime->control->appl_ptr and the local last_ptr values. if the enough data is available, feed to dma queue. this callback should be called appropriately in trigger and pointer callbacks, so that the appl_ptr is updated as best. maybe we should clean up the implementation later for these hardwares... Takashi --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] snd-usb-audio hang when rmmoding after unplugging midisport1x1
Hello, I've got this 'big' problem for the hotplug feature: I'm trying to plug/unplug the midisport1x1 from M-Audio. The plug works like a charm, hotplug does its job, load the firmware (fxload) and snd-usb-audio, if not inserted, is auto-loaded. But sudo umount /proc/bus/usb $> lsusb $> sudo mount /proc/bus/usb $> lsusb Bus 002 Device 004: ID 0763:1011 Midiman Bus 002 Device 001: ID : Bus 001 Device 002: ID 046d:c012 Logitech, Inc. Optical Mouse Bus 001 Device 001: ID : $> ok the usbfs is probably totally dead and shows the last working state... hey but my mouse is still working fine (in condition I don't unplug and replug it ^^ ) --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] drivers in alsa-driver tree with 2.6 kernels
Hi, does anyone use the following drivers with a 2.6 kernel successfully? if it's confirmed, i'd like to move them to alsa-kernel tree, so that they can be submitted to 2.6 linux tree soon. - snd-usb-usx2y - snd-hdspm - snd-intel8x0m note that now au88x0 and atiixp drivers are already in alsa-kernel tree. Takashi --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] unsubscrive
--- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Hoping someone can help me (Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed.)
On Wed, 10 Mar 2004, Niels Christian ?rgaard wrote: > Hey > > This is the nth day I'm stuck reading the ALSA-documentation over and > over again, and I'm at a loss figuring out whats wrong. > > Basically, I have a running thread capturing data from an ALSA-device, > and within useconds I get: "samptest: pcm.c:5889: snd_pcm_mmap_commit: > Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed." (samptest is the > name of my executable) Can you run gdb with your code and send me backtrace? > The reason for me being so confused is that this occures at the call > "snd_pcm_readi(snd_pcm_t *, void *, snd_pcm_uframes_t )", which for > starters ain't mmap :) I use "snd_pcm_delay(snd_pcm_t *, We use almost always mmap even for r/w access (which is emulated in alsa-lib). Jaroslav - Jaroslav Kysela <[EMAIL PROTECTED]> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Hoping someone can help me (Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed.)
On Thu, 11 Mar 2004, Ove Kaaven wrote: > ons, 10.03.2004 kl. 18.32 skrev Niels Christian ?rgaard: > > Hey > > > > This is the nth day I'm stuck reading the ALSA-documentation over and > > over again, and I'm at a loss figuring out whats wrong. > > > > Basically, I have a running thread capturing data from an ALSA-device, > > and within useconds I get: "samptest: pcm.c:5889: snd_pcm_mmap_commit: > > Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed." (samptest is > > the name of my executable) > > > > The reason for me being so confused is that this occures at the call > > "snd_pcm_readi(snd_pcm_t *, void *, snd_pcm_uframes_t )", which for > > starters ain't mmap :) I use "snd_pcm_delay(snd_pcm_t *, > > snd_pcm_sframes_t *)" to verify that there is sufficient data in the > > queue, before calling readi(), > > Did you remember to call snd_pcm_avail_update() right before calling > readi()? The docs imply that snd_pcm_delay does not update the value > returned by the "snd_pcm_mmap_avail" in the assertion, but > snd_pcm_avail_update() does (by using the latest value from stuff like > snd_pcm_delay or IRQ handlers, so call it after snd_pcm_delay). This call is required only for mmap access not for r/w access. Jaroslav - Jaroslav Kysela <[EMAIL PROTECTED]> Linux Kernel Sound Maintainer ALSA Project, SuSE Labs --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Hoping someone can help me (Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed.)
ons, 10.03.2004 kl. 18.32 skrev Niels Christian Ørgaard: > Hey > > This is the nth day I'm stuck reading the ALSA-documentation over and > over again, and I'm at a loss figuring out whats wrong. > > Basically, I have a running thread capturing data from an ALSA-device, > and within useconds I get: "samptest: pcm.c:5889: snd_pcm_mmap_commit: > Assertion `frames <= snd_pcm_mmap_avail(pcm)' failed." (samptest is > the name of my executable) > > The reason for me being so confused is that this occures at the call > "snd_pcm_readi(snd_pcm_t *, void *, snd_pcm_uframes_t )", which for > starters ain't mmap :) I use "snd_pcm_delay(snd_pcm_t *, > snd_pcm_sframes_t *)" to verify that there is sufficient data in the > queue, before calling readi(), Did you remember to call snd_pcm_avail_update() right before calling readi()? The docs imply that snd_pcm_delay does not update the value returned by the "snd_pcm_mmap_avail" in the assertion, but snd_pcm_avail_update() does (by using the latest value from stuff like snd_pcm_delay or IRQ handlers, so call it after snd_pcm_delay). --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] PCM hw mixing with volume
On 10-Mar-2004 Ove Kaaven wrote: >> Uhm... I think first of all we need a way to know how many >> virtual channels are available (hw and sw) > > For the EMU10K1, snd_pcm_info_get_subdevices_count() and > snd_pcm_info_get_subdevices_avail() works for me. But I suppose you're > right that this isn't a good abstraction. It isn't good because the app wants a virtually unlimited number of channels. I was thinking of something like this: sndhandler=PrepareToPlay(sound); SetVolume(sndhandler, -10); SetPan(sndhandler, 0); or SetPosition(sndhandler, x, y, z); SetEffect(sndhandler, foo, bar); Start(sndhandler); The application shouldn't have to take care of the actual number of virtual channels the card provides other than at initialization, eg.: AllocSfx("hw:0,0,2", 8); /* alloc 8 vchannels starting from subdev 2 */ Then Start() will play the sound using the allocated channels in a LRU way of something similar. >> set_volume() should be something more generic. Think about 5.1 . > > I think 3D position controls or pan controls would be more appropriate > than a more flexible volume control. Or perhaps the stream might just be > 6-channel in the first place... It should be possible to mix them, SFX and background music. >> Also, the API should lay above the PCM API because, if the >> card hasn't the required capabilities, that layer will emulate >> it using the PCM API. Also, in some cases (eg. the Echoaudio >> Mia and probably hdsp), that mixing feature is already >> supported by the driver through the normal PCM and control APIs. > > Good point, but I wonder how 3D effects could be applied to sounds > loaded into the card's onboard memory (via the suggested wavetable API). > Perhaps that won't be a very important feature though. PrepareToPlay() loads the sample and Start() plays it. It's pretty indipendent on how the sound will be actually played (through the PCM API of the sequencer API or whatever). As you just reminded me some cards have onboard memory that holds MIDI instruments. It can be used for generic sound effects as well. >> We can define a small set of standard effects, or we can do something >> like the control API. > > As far as I'm concerned, as long as the API can do what I need, it > doesn't matter much what it looks like. DirectSound does allow > individual drivers to implement custom device-specific effects, but I > don't expect to really want that. Standard effects are good enough. Stardard effects are simple, but a more generic interface is expandable. It's like OSS control interface vs ALSA control interface. -- Giuliano. --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] USB audio devices
Clemens Ladisch wrote: > Jaroslav Kysela wrote: > > > I don't know much about USB 2.0, > > Not too much differences for the driver. Well, I should have read the specification before saying such things. The format of synchronization information has changed, too; it's not 10.14 bits but 12.13 packed into 16.16 (4 bytes). Regards, Clemens --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] USB audio devices
Karsten Wiese wrote: > We can also vary the exact USB frame time. > With UHCI 1.1 USB Hosts there is the SOF Register. > ... > It really works here already with the us428: The trick is: > We first make the USB-Frame longer until we capture 1 Sample Frame more 45 > (for 44100). then the USB-Frame is shortened until we capture only 43 Sample > Frames for one USB Frame. and so on. Cool idea! However, standard-compliant devices are supposed to base their timing for feedback/feedforward information on the arrival of SOF packets. Introducing jitter into the SOF timer may not be a good idea in every case. And this won't work if there is more than one audio device connected to the same bus, or if the HC is OHCI or EHCI. Regards, Clemens --- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel