[Alsa-devel] Developer docs missing from ALSA web server - was:Re: [Alsa-devel] An driver error when I using aplay!
Roc Wu wrote: Unable to find an usable access for 'default' aplay: set_params:832: Sample format non available Yes. Thanks for your replay. Maybe I should send the mail to arm-linux mailist. PS. Could you recommend some docs about the ALSA internals and Low level drivers? There are too many docs in the www.alsa-project.org, I am an embedded Linux driver developer, so which one is suit for me? Thanks a lot Best Regards The useful developer docs seem to have been lost off the alsa web server. From: http://www.alsa-project.org/documentation.php3#Driver, there are the following broken links: http://www.alsa-project.org/~iwai/writing-an-alsa-driver/index.html http://www.alsa-project.org/~iwai/alsa-driver-api/index.html When you build a new alsa driver, you generally have to also create a /usr/share/alsa/cards/XXX file, where XXX is the name of your driver. The XXX comes from either: - strcpy(card-driver, XXX); in your probe routine. I think you will find the most help if you post the unfinished source code for your driver, so that people can look at it, and maybe suggest corrections for you. The best way to test your new driver is with a test tool like speaker-test or pcm. With these you can send a tone to the speakers. You can also set the sample rate and number of channels, so that it can test the driver, without needing to use plug devices initially. E.g. If your sound card can only do 48khz stereo. Start testing it with: speaker-test -r48000 -Dhw:0,0 -c2 plug devices tend not to work well until you have a correctly functioning driver. Cheers James --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] An driver error when I using aplay!
Russell King wrote: But unfortunately I don't have the driver code myself to be able to comment, so its probably been fscked. If the code was posted publically, the author of the code would get a lot more useful help from more eyes. --- This SF.Net email is sponsored by the new InstallShield X. From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] [PATCH] Audigy LS driver ready for inclusion into alsa-driver.
Audigy LS driver is now ready for inclusion into alsa-driver. Get it from http://www.superbug.demon.co.uk/alsa The install.txt tells one how to patch the current alsa-driver 1.0.5a with it, and also explains where some other files should be put. The indentation might need correcting before inclusion into the alsa-driver cvs. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] [PATCH] Audigy LS driver ready for inclusion into alsa-driver.
William wrote: James Courtier-Dutton wrote: Audigy LS driver is now ready for inclusion into alsa-driver. Get it from http://www.superbug.demon.co.uk/alsa Are you going to work on any other Audigy-series drivers, e.g. Audigy 2 ZS? I'm finding the emu10k1 driver in alsa-driver-1.0.5a has serious problems with random intermittent distortion of the soundfont samples while they are being played on the soundcard's MIDI synthesiser, e.g. using aplaymidi -p 65:0. Random intermittent distortion means, e.g. the sound during MIDI playback becomes muffled for a minute or two and then returns to normal sound quality, or the sound wrongly becomes mono for a few seconds, and then returns to stereo. Also, it seems emu10k1 does not load soundfonts correctly, especially if you ever use any really large 25MB soundfonts. William I don't have an Audigy 2 ZS, so unless someone donates one, I can't help you there. Can you post to a web site your soundfonts file, and instructions on how to use them with the creative cards, I might be able to help. I have a cheepo Audigy 2 (old version) that I might be able to reproduce your problems on. I don't work with MIDI much, which is why I have not added MIDI support to the Audigy LS driver at the moment. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] [PATCH] Audigy LS driver ready for inclusion into alsa-driver.
William wrote: James Courtier-Dutton wrote: William wrote: James Courtier-Dutton wrote: Audigy LS driver is now ready for inclusion into alsa-driver. Get it from http://www.superbug.demon.co.uk/alsa Are you going to work on any other Audigy-series drivers, e.g. Audigy 2 ZS? I'm finding the emu10k1 driver in alsa-driver-1.0.5a has serious problems with random intermittent distortion of the soundfont samples while they are being played on the soundcard's MIDI synthesiser, e.g. using aplaymidi -p 65:0. Random intermittent distortion means, e.g. the sound during MIDI playback becomes muffled for a minute or two and then returns to normal sound quality, or the sound wrongly becomes mono for a few seconds, and then returns to stereo. Also, it seems emu10k1 does not load soundfonts correctly, especially if you ever use any really large 25MB soundfonts. I don't have an Audigy 2 ZS, so unless someone donates one, I can't help you there. At the moment I also have an Audigy LS (5.1) which seems to have similar problems to the Audigy 2 ZS. Can you post to a web site your soundfonts file, and instructions on how to use them with the creative cards, I might be able to help. The 25MB piano soundfont is here: http://www.wstco.com/pianosounds/freesoundfont.htm Please note the author Warren has told me his soundfont is not re-distributable. ALSA soundfont loading: asfxload WST25FStein_00Aug14.SF2 ALSA OSS-mode soundfont loading: sfxload WST25FStein_00Aug14.SF2 Sample MIDI files for piano: http://members.aol.com/sdrodrian/ $ aplaymidi -l PortClient name Port name 62:0Midi Through Midi Through Port-0 64:0Audigy MPU-401 (UART) - Rawmidi Audigy MPU-401 (UART) 64:32 Audigy MPU-401 (UART) - Rawmidi Audigy MPU-401 #2 65:0Emu10k1 WaveTableEmu10k1 Port 0 65:1Emu10k1 WaveTableEmu10k1 Port 1 65:2Emu10k1 WaveTableEmu10k1 Port 2 65:3Emu10k1 WaveTableEmu10k1 Port 3 72:0Virtual Raw MIDI 1-0 VirMIDI 1-0 73:0Virtual Raw MIDI 1-1 VirMIDI 1-1 74:0Virtual Raw MIDI 1-2 VirMIDI 1-2 75:0Virtual Raw MIDI 1-3 VirMIDI 1-3 $ aplaymidi -p 65:0 midi_music_file.mid An even better test would be to do some experiments on an Audigy using Rosegarden 4 0.9.8 for MIDI playback, JACK audio, etc http://www.rosegardenmusic.com/ I have a cheepo Audigy 2 (old version) that I might be able to reproduce your problems on. I don't work with MIDI much, which is why I have not added MIDI support to the Audigy LS driver at the moment. I hope you will add MIDI support; I think it would be a great improvement. William I have played some .mid files now, but I have not noticed any problems with my Audigy 2. When I downloaded the fonts file, mine had a different name to yours. Yours: WST25FStein_00Aug14.SF2 Mine: WST25FStein_00Sep22.SF2 Can you provide me with a .mid file that shows the problems and is easy to reproduce the problems? Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Audigy LS, help wanted.
Hi, I have an Audigy2 el cheepo edition, and an Audigy LS. The Audigy2 luckily has a separate digital output jack, so I can easily connect a mono or stereo jack into the Audigy2, have an RCA plug on the other end, and plug it into an external AC3 decoder, and AC3 passthru works. The Audigy LS has a combined 4 pole Center/LFE output and Digital output. I don't have a cable that plugs into this jack and works well. I can get center/lfe output, but the quality is awful. I cannot get any spdif digital signal from it, and I suspect that this is due to me not having the correct cable. I am based in the UK. Can anyone tell me where I can get a good 4-pole mini-jack cable that I can use to test digital AC3 output on the Audigy LS? Apart from the above problem, I have basically finished the Audigy LS driver now. It supports 5.1 analogue output and can record from the MIC input. Latest Audigy LS driver available from: - www.superbug.demon.co.uk/alsa Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] question about possible support acquisition
Zack Borschuk wrote: I was wondering if a petition asking Creative Labs to release the needed information to create efficient support for the Audigy LS would be plausible or not. Please let me know, so that if it is plausible, I could start working on getting the petition signed by enough people. Thanks, Zack Borschuk I have already written an ALSA driver for the Audigy LS. Available at: http://www.superbug.demon.co.uk/alsa It handles up to 5.1 analogue output, and can record from the MIC input. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Status of Audigy LS ALSA driver.
ALSA driver available from: http://www.superbug.demon.co.uk/alsa/ * FEATURES currently supported: *Front, Rear and Center/LFE. *Surround40 and Surround51. *Capture from MIC input. * * BUGS: *-- * * TODO: *Need to add a way to select capture source. *4 Capture channels, only one implemented so far. *SPDIF playback not implemented. *Need to find out what the AC97 chip actually does. *Other rates apart from 48khz not implemented. *MIDI --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] [Donations] Audigy LS
A linux user, Greg Turpin (from Colorado, USA), kindly donated an Audigy LS to me, so that I could try to provide an Audigy LS driver to the ALSA project. As you all know, I have already been relatively successful and now have sound coming from the Front Speakers, and hope to improve support soon. Is there anywhere on the alsa web site where Sponsors or Donations are recognised. I think it would be nice if this kind act by Greg Turpin was documented on the ALSA web site somewhere. For anyone interested, the latest highly experimental (might crash your system) driver is at http://www.superbug.demon.co.uk/alsa/ I just use that url as a backup for my in progress work, so it will likely have printk statements all over it, to help me try to find out how the Audigy LS works. I added a few more comments regarding all the registers, but that is about all that it has extra over the last post to alsa-devel list. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Question regarding substreams or voices
Hi, I am trying to do work on the Audigy LS driver. I have now discovered that I can send sound to the Front, Rear and Center/LFE. I have not found out how to set the amount of interleaved channels that the sound card can do, so it is fixed at 2 channels per stream. The sound card has 4 voices for 4 separate stereo streams. Each voice has it's own DMA and HW pointer. voice 0 sends sound to the Front speakers. voice 1 sends sound to the Center/LFE speakers. voice 2 sends sound to unknown, (no sound comes out yet) voice 3 sends sound to the Rear speakers. There does not appear to be any hardware mixing, so each voice can only be opened once. Should this be set up as: - 1) /proc/asound/card0/pcm0p info sub0 sub1 sub2 sub3 or instead ? 2) /proc/asound/card0/pcm0p /proc/asound/card0/pcm1p /proc/asound/card0/pcm2p /proc/asound/card0/pcm3p I think (2) is the correct way, so I will make a start using that method. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] [PATCH] Audigy LS support.
Takashi Iwai wrote: At Thu, 27 May 2004 20:17:17 +0100, James Courtier-Dutton wrote: Here is my first go at Audigy LS support. It can play sound to the front speakers. great! /* hardware definition */ static snd_pcm_hardware_t snd_audigyls_playback_hw = { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID), .formats = SNDRV_PCM_FMTBIT_S16_LE, .rates = SNDRV_PCM_RATE_48000, .rate_min = 48000, .rate_max = 48000, .channels_min = 2, .channels_max = 2, .buffer_bytes_max = (32*1024), .period_bytes_min = 64, .period_bytes_max = (16*1024), .periods_min = 2, .periods_max = 16, ^^ are you sure this is ok? in the case of emu10k1, it generates irq twice per buffer (HALF and BUFFER). then periods_max must be 2. With periods_max set to 2, sound plays, but has artifacts. With periods 2, the sound is smooth, without any clicks etc. anyway, the driver code is quite similar with emu10k1x.c. i checked the diff between them and the amount of difference is really small. how about merging them? then we can understand / maintain the codes better. Takashi I would like to keep the two drivers separate for a bit. That way I can keep changing stuff without caring if the emu10k1x.c stays working. Once I get all the features working, we could then look at merging the two. There is still a lot to go. 1) 24bit 192khz sound out. 2) 5.1 sound. 3) Digital SPDIF output. 4) Capture. 5) MIDI. It seems that the changing of the sample rate etc. from the default is done via some sort of UART. Also, I can change how often the interrupts happen, so I will need to implement that. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Programming the unknow P16v chip on the Audigy2
The Audigy2 has lots of registers for the emu10k2 chip. These are accessed by programming #define PTR 0x00 /* Indexed register set pointer register*/ /* NOTE: The CHANNELNUM and ADDRESS words can */ /* be modified independently of each other. */ #define DATA 0x04 /* Indexed register set data register */ Basically, one writes the register address to PTR, and then read or write to DATA. On the Audigy2 there is a similar setup for 0x20 and 0x24. I suspect that this is used to program the p16v chip. Had anyone looked into those registers, and tried to guess what they do ? I might give it a go, once I finish the Audigy LS driver. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] ALSA support for AudigyLS
Here is a status update. I have received an Audigy LS sound card which was kindly donated by Greg Turpin. So, far, I have managed to get some sound out of the Front speakers. My speaker-test program outputs a nice constant tone. When playing in xine, it is not perfect sound, it stops and starts, so I have some work to do there, but I just wanted to update people. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] [PATCH] Audigy LS support.
Here is my first go at Audigy LS support. It can play sound to the front speakers. Only one mixer volume control does anything, that is the Front Volume control in alsamixer. I attach 2 files. One is a new audigyls.c, and the other is a patch to get alsa-driver to build with it. audigyls.c should be added to directory ./alsa-driver/pci/emu10k1/ Support for more output channels will be added later, but this is just a proof of concept, so that other people wishing to write audigyls drivers for other operating systems can make a start. Cheers James Index: alsa-driver/pci/Kconfig === RCS file: /cvsroot/alsa/alsa-driver/pci/Kconfig,v retrieving revision 1.19 diff -u -r1.19 Kconfig --- alsa-driver/pci/Kconfig 24 May 2004 13:27:31 - 1.19 +++ alsa-driver/pci/Kconfig 27 May 2004 18:35:31 - @@ -26,6 +26,14 @@ Say 'Y' or 'M' to include support for Sound Blaster Live Dell OEM version. +config SND_AUDIGYLS + tristate SB Audigy LS + depends on SND + select SND_AC97_CODEC + help + Say 'Y' or 'M' to include support for Sound Blaster Live Dell + OEM version. + config SND_ATIIXP_MODEM tristate ATI IXP 150/200/250 Modem depends on SND Index: alsa-driver/pci/emu10k1/Makefile === RCS file: /cvsroot/alsa/alsa-driver/pci/emu10k1/Makefile,v retrieving revision 1.6 diff -u -r1.6 Makefile --- alsa-driver/pci/emu10k1/Makefile14 May 2004 13:42:49 - 1.6 +++ alsa-driver/pci/emu10k1/Makefile27 May 2004 18:35:31 - @@ -6,8 +6,10 @@ include $(SND_TOPDIR)/Makefile.conf snd-emu10k1x-objs := emu10k1x.o +snd-audigyls-objs := audigyls.o obj-$(CONFIG_SND_EMU10K1X) += snd-emu10k1x.o +obj-$(CONFIG_SND_AUDIGYLS) += snd-audigyls.o export-objs := emu10k1_main.o /* * Copyright (c) by James Courtier-Dutton [EMAIL PROTECTED] * Driver AUDIGYLS chips * * BUGS: *-- * * TODO: *Surround and Center/LFE playback. *Capture. *SPDIF playback. *Other rates apart from 48khz. *MIDI *-- * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include sound/driver.h #include linux/init.h #include linux/interrupt.h #include linux/pci.h #include linux/slab.h #include linux/moduleparam.h #include sound/core.h #include sound/initval.h #include sound/pcm.h #include sound/ac97_codec.h #include sound/info.h MODULE_AUTHOR(James Courtier-Dutton [EMAIL PROTECTED]); MODULE_DESCRIPTION(AUDIGYLS); MODULE_LICENSE(GPL); MODULE_CLASSES({sound}); MODULE_DEVICES({{Creative SB Audigy LS}); // module parameters (see Module Parameters) static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; static int boot_devs; module_param_array(index, int, boot_devs, 0444); MODULE_PARM_DESC(index, Index value for the AUDIGYLS soundcard.); MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC); module_param_array(id, charp, boot_devs, 0444); MODULE_PARM_DESC(id, ID string for the AUDIGYLS soundcard.); MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC); module_param_array(enable, bool, boot_devs, 0444); MODULE_PARM_DESC(enable, Enable the AUDIGYLS soundcard.); MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC); // /* PCI function 0 registers, address = val + PCIBASE0 */ // #define PTR 0x00 /* Indexed register set pointer register */ /* NOTE: The CHANNELNUM and ADDRESS words can */ /* be modified independently of each other. */ #define DATA 0x04 /* Indexed register set data register */ #define IPR 0x08 /* Global interrupt pending register */ /* Clear pending interrupts by writing a 1 to */ /* the relevant bits and zero to the other bits */ #define IPR_CH_0_LOOP 0x0800 /* Channel 0 loop */ #define IPR_CH_0_HALF_LOOP 0x0100 /* Channel 0 half loop */ #define INTE 0x0c /* Interrupt enable register */ #define INTE_CH_0_LOOP
Re: [Alsa-devel] pcm buffer size
Nicolas Hüppelshäuser wrote: Hi! I'm using alsa 1.0.4. How can I get a larger alsa buffer size? The maximum size returned by snd_pcm_hw_params_get_buffer_size_max is too small. I found no module option and nothing apropriate within the driver code. Mainly I'm using the snd-usb-audio module but others are also of interest. best regards Nicolas Hueppelshaeuser -- You cannot. the value returned by snd_pcm_hw_params_get_buffer_size_max() is based on the hardware limitations. If you need more buffer space, buffer up the data in your application. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] line in not supported Audigy and Audigy2 ?
i have found out that on the Audigy2. and someone else has found the same with the Audigy1, the line in jack does not work. I expect this is just a matter of finding the correct FX bus for it, but wanted to check here, to see if anyone else has got it working first, before I take a look. Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] alsa Soundcard support page on alsa-project.org
Would it be a good idea to keep this page more up to date. e.g. SB Audigy 2, but mention that it only works in 16bit 48Khz mode. Possible add the SB Audigy 2 ZS. Dell SB Live! Value. I keep getting people asking me if the Audigy 2 is supported, because it is not on the list. Also enter in the list a Red line for the SB Audigy LS. (Although that might change soon). Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: ALSA lib application compatibility [was] Re: [Alsa-devel] mixer device
Manuel Jander wrote: As the main author of the Aureal Vortex driver, its very stupid having to handle arbitrary period sizes, introducing a lot of overhead and complexity in the driver, while the hardware just is not designed to handle period sizes that are not powers of two, due to page boundary overlapping trouble. You don't have to handle arbitary period sizes in the alsa-driver. Here is an example from the emu10k1 driver, that restricts what period sizes the application can use for caputure. static unsigned int capture_period_sizes[31] = { 384,448,512,640, 384*2, 448*2, 512*2, 640*2, 384*4, 448*4, 512*4, 640*4, 384*8, 448*8, 512*8, 640*8, 384*16, 448*16, 512*16, 640*16, 384*32, 448*32, 512*32, 640*32, 384*64, 448*64, 512*64, 640*64, 384*128,448*128,512*128 }; static snd_pcm_hw_constraint_list_t hw_constraints_capture_period_sizes = { .count = 31, .list = capture_period_sizes, .mask = 0 }; static int snd_emu10k1_capture_open(snd_pcm_substream_t * substream) { snip snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_SIZE, hw_constraints_capture_period_sizes); snip Has a driver writer, you have full control over these sorts of things. Cheers James --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Audigy2 in SNDRV_PCM_FMTBIT_S32_LE mode.
What would I need to change in the emu10k1 driver, to get alsa-lib to send it 32bit audio samples. I tried just adding the SNDRV_PCM_FMTBIT_S32_LE to the playback options, but that did not work. When I did that, everything just played at half speed. Can anyone give me any pointers as to where else I should change things in order to get 32bit audio to the Audigy2 DSP. Cheers James --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] For Manuel Jander
You sent me an email off list, but when I reply to it, the reply fails with the messages below. So, I cannot email you direct with any responses to your off list emails. Due to standard etiquette, I cannot respond to off list emails on list. Can you please fix the problems your end. Cheers James Error messages: A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: [EMAIL PROTECTED] SMTP error from remote mailer after RCPT TO:[EMAIL PROTECTED]: host tatooine.dcsc.utfsm.cl [200.1.21.71]: 553 5.3.0 [EMAIL PROTECTED]... 550Su sitio fue eliminado por enviar VIRUS A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed: [EMAIL PROTECTED] (generated from [EMAIL PROTECTED]) SMTP error from remote mailer after RCPT TO:[EMAIL PROTECTED]: host tatooine.dcsc.utfsm.cl [200.1.21.71]: 553 5.3.0 [EMAIL PROTECTED]... 550Su sitio fue eliminado por enviar VIRUS --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Audigy 2 emu10k2 with 24bit audio samples.
I understand the the Audigy 2 DSP (emu10k2) handles 24bits in the DSP at a max rate of 48Khz. It uses an as yet undocumented extra chip for 96/192 Khz. Does anyone know how we could get the alsa emu10k1 live/audigy driver to accept 24bit audio from the application. At the moment, when I send alsa-lib a 24bit audio sample, it reaches the sound card as 16bit. Cheers James --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Ignore this - [Alsa-devel] 24bit .wav file fails to output to plug:front device with aplay on Audigy2
James Courtier-Dutton wrote: I have been doing some tests with 24bit audio. It seems that any 24bit stream is muted if one tries to send it to alsa-lib. I am going to do further tests, but I just wanted to see if anyone else has ever tried 24bit sound with the Audigy2? Cheers James Please ignore. --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] 24bit .wav file fails to output to plug:front device with aplay on Audigy2
I have been doing some tests with 24bit audio. It seems that any 24bit stream is muted if one tries to send it to alsa-lib. I am going to do further tests, but I just wanted to see if anyone else has ever tried 24bit sound with the Audigy2? Cheers James --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] [PATCH] speaker-test - update to add -s option for single shot single speaker test.
I attach a patch that updates the speaker-test program. It corrects a few minor bugs as well as add a new -s option. Diff is with the alsa-utils cvs. Cheers James Index: alsa-utils/speaker-test/readme.txt === RCS file: /cvsroot/alsa/alsa-utils/speaker-test/readme.txt,v retrieving revision 1.1 diff -u -r1.1 readme.txt --- alsa-utils/speaker-test/readme.txt 10 May 2004 14:28:03 - 1.1 +++ alsa-utils/speaker-test/readme.txt 16 May 2004 00:20:23 - @@ -4,9 +4,11 @@ To test: - 1) Just stereo sound from one stereo jack: - -./speaker-test -Dfront -c 2 +./speaker-test -Dfront -c2 2) A 4 speaker setup from two stereo jacks: - -./speaker-test -Dsurround40 -c 4 +./speaker-test -Dsurround40 -c4 3) A 5.1 speaker setup from three stereo jacks: - -./speaker-test -Dsurround51 -c 6 +./speaker-test -Dsurround51 -c6 +4) To send a nice low 75Hz tone to the Woofer and then exit without touching any other speakers: - +./speaker-test -Dplug:surround51 -c6 -s1 -f75 Index: alsa-utils/speaker-test/speaker-test.c === RCS file: /cvsroot/alsa/alsa-utils/speaker-test/speaker-test.c,v retrieving revision 1.1 diff -u -r1.1 speaker-test.c --- alsa-utils/speaker-test/speaker-test.c 10 May 2004 14:28:03 - 1.1 +++ alsa-utils/speaker-test/speaker-test.c 16 May 2004 00:20:23 - @@ -10,7 +10,7 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * - * xine is distributed in the hope that it will be useful, + * speaker-test is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -40,8 +40,9 @@ static char *device = plughw:0,0; /* playback device */ static snd_pcm_format_t format = SND_PCM_FORMAT_S16; /* sample format */ -static unsigned int rate= 44100; /* stream rate */ +static unsigned int rate= 48000; /* stream rate */ static unsigned int channels= 1; /* count of channels */ +static unsigned int speaker = 0; /* count of channels */ static unsigned int buffer_time = 50;/* ring buffer length in us */ static unsigned int period_time = 10;/* period time in us */ static double freq= 440;/* sinusoidal wave frequency in Hz */ @@ -307,10 +308,9 @@ } static void help(void) { - int k; printf( - Usage: latency [OPTION]... [FILE]...\n + Usage: speaker-test [OPTION]... \n -h,--help help\n -D,--device playback device\n -r,--rate stream rate in Hz\n @@ -318,8 +318,9 @@ -f,--frequency sine wave frequency in Hz\n -b,--buffer ring buffer size in us\n -p,--period period size in us\n + -s,--speakersingle speaker test. Values 1=Left or 2=right\n \n); - +#if 0 printf(Recognized sample formats are:); for (k = 0; k SND_PCM_FORMAT_LAST; ++k) { const char *s = snd_pcm_format_name(k); @@ -328,6 +329,8 @@ } printf(\n\n); +#endif + } int main(int argc, char *argv[]) { @@ -345,6 +348,7 @@ {frequency, 1, NULL, 'f'}, {buffer,1, NULL, 'b'}, {period,1, NULL, 'p'}, +{speaker,1, NULL, 's'}, {NULL,0, NULL, 0 }, }; @@ -357,7 +361,7 @@ while (1) { int c; -if ((c = getopt_long(argc, argv, hD:r:c:f:b:p:m:, long_option, NULL)) 0) +if ((c = getopt_long(argc, argv, hD:r:c:f:b:p:s:, long_option, NULL)) 0) break; switch (c) { @@ -392,6 +396,15 @@ period_time = period_time 1000 ? 1000 : period_time; period_time = period_time 100 ? 100 : period_time; break; +case 's': + speaker = atoi(optarg); + speaker = speaker 1 ? 0 : speaker; + speaker = speaker channels ? 0 : speaker; + if (speaker==0) { +printf(Invalid parameter for -s option.\n); +exit(EXIT_FAILURE); + } + break; default: printf(Unknown option '%c'\n, c); exit(EXIT_FAILURE); @@ -433,21 +446,30 @@ printf(No enough memory\n); exit(EXIT_FAILURE); } + if (speaker==0) { +while (1) { - while (1) { - -for(chn = 0; chn channels; chn++) { - printf( - %s\n, channel_name[chn]); + for(chn = 0; chn channels; chn++) { +printf( - %s\n, channel_name[chn]); - err = write_loop(handle, chn, ((rate*5)/period_size), samples); +err = write_loop(handle, chn, ((rate*5)/period_size), samples); - if (err 0) { -printf(Transfer failed: %s\n, snd_strerror(err)); - exit(EXIT_FAILURE); +if (err 0) { +
Re: [Alsa-devel] snd_pcm_delay() bug
Ronald S. Bultje wrote: Hi, for both my ALI 5451 and my Audigy 2 NX, snd_pcm_delay() sometimes returns (in the second argument pointer) ridiculously high values in the range of 2^32/bytes_per_sample (in my case, 16bitLE/stereo, that comes down to roughly 1,1E9). I'm guessing there's some kind of signed/unsigned or 32/64bit integer bug in this function? Is this a known bug? Is there a fix? Ronald after calling snd_pcm_delay(), call snd_pcm_state() and make sure it is in RUNNING state, otherwise, values returned from snd_pcm_delay() are meaningless. Cheers James --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Emu10k1x driver
Takashi Iwai wrote: At Wed, 12 May 2004 03:16:14 +0100, James Courtier-Dutton wrote: [EMAIL PROTECTED] wrote: Here's the first pass at the driver. I've tested it mainly with XMMS with the ALSA output plugin. alsaplayer didn't work, not sure why. I've also tested with the pcm test in alsa-lib which seems to be jumping, so that's another problem. I've removed the joystick support for now, but the only reason I added it was because the intel8x0.c driver has joystick support in it. Enjoy, Francisco I would like to add some information that might help people modifying this for the Audigy LS. The outputs for the card work in 2 modes. 1) Probably analogue on the output jacks. snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x70f); snd_emu10k1x_ptr_write(chip, 0x45, 0, 0); it's already in emu10k1x.c. 2) Probably digital spdif on the output jacks. snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x1000f); snd_emu10k1x_ptr_write(chip, 0x45, 0, 0x700); it's not. Those (1) and (2) should work on bother the LS and the Dell OEM. To enable this driver loading for the Audigy LS, have the following PCI IDs. static struct pci_device_id snd_emu10k1x_ids[] = { { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1X) */ { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS */ { 0, } }; so, just adding the pci id for audigy LS would suffice at least for analog output? I don't think so, because of all the extra code that will be needed in the interrupt routines. Other information: - value = snd_emu10k1x_ptr_read(chip, 0x74, 0); printk(Some special chip ID = %04x\n,value); what value on Dell OEM? I don't know. Might be worth trying it on the Audigy 2 as well. Further additions to the snd_emu10k1x_create() function, after the lines snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x70f); // ??? snd_emu10k1x_ptr_write(chip, 0x45, 0, 0); hmm... snd_emu10k1x_ptr_write(chip, 0x65, 0, 0x1000); snd_emu10k1x_ptr_write(chip, 0x72, 0, 0xf0f003f); routing? snd_emu10k1x_ptr_write(chip, 0x71, 0, 0xf000); snd_emu10k1x_ptr_write(chip, 0x61, 0, 0x0); snd_emu10k1x_ptr_write(chip, 0x62, 0, 0x0); The AudigyLS also seems to use the emu10k1x_ptr 0x75 a lot in interrupt routines, but the Dell OEM one does not. what value is supposed to be on 0x75? I have no idea. But some trial and error with some actual hardware should help. Takashi Takashi, I am waiting for someone to donate an Audigy LS to me. I will then be able to build a driver for it. It seems that the Audigy LS is quite a lot different from the Dell OEM, so I will probably create a new .c file for it. Maybe at a later stage, when everything works well, we might decide to join the two drivers. Also, if we get the Audigy LS working, it might shed some light on the P16 or P17 chip details in the Audigy 2. For features like high sample rates etc. I have had one offer so far for an Audigy LS, so, if it arrives, I will start work on it. Cheers James --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Emu10k1x driver
Takashi Iwai wrote: At Fri, 14 May 2004 18:14:47 +0100, James Courtier-Dutton wrote: I would like to add some information that might help people modifying this for the Audigy LS. The outputs for the card work in 2 modes. 1) Probably analogue on the output jacks. snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x70f); snd_emu10k1x_ptr_write(chip, 0x45, 0, 0); 2) Probably digital spdif on the output jacks. snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x1000f); snd_emu10k1x_ptr_write(chip, 0x45, 0, 0x700); Those (1) and (2) should work on bother the LS and the Dell OEM. then, are they exclusive? I think you could add a mixer toggle switch for either (1) or (2). I don't know what each bit in those registers does, so for now it could probably be exclusive. I have also heard that the way to program the Audigy LS might also apply in some way the Audigy 2 to get the high samples rates working on the Audigy 2. Hopefully I will get certain answers soon. Cheers James --- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562alloc_id=6184op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Audigy LS support
Hello, Does anyone have an Audigy LS lying around that they are not using, and would like to donate it to me, so I can add support for it in ALSA ? I just need a card to try out some Kung Fu on it. Cheers James --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] General Info. PCI Audio devices that are handled by the OpenSound OSS drivers, but not handled by ALSA.
Giuliano Pochini wrote: On Wed, 12 May 2004, James Courtier-Dutton wrote: Just for general info. pci10b5,1142 NOT-HANDLED lynxone Add the LynxTWO, Lynx L22 and Lynx AES16. LynxStudio provides programming info only under a NDA that doesn't allow the licencee to release anything in source form. -- Giuliano. Are you saying that Opensound OSS linux drivers support the LynxTWO, Lynx L22 and Lynx AES16 ? I don't think so. This list was just an ALSA to OSS comparison. It was not a world wide list of Sound cards. Cheers James --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Emu10k1x driver
[EMAIL PROTECTED] wrote: Here's the first pass at the driver. I've tested it mainly with XMMS with the ALSA output plugin. alsaplayer didn't work, not sure why. I've also tested with the pcm test in alsa-lib which seems to be jumping, so that's another problem. I've removed the joystick support for now, but the only reason I added it was because the intel8x0.c driver has joystick support in it. Enjoy, Francisco I would like to add some information that might help people modifying this for the Audigy LS. The outputs for the card work in 2 modes. 1) Probably analogue on the output jacks. snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x70f); snd_emu10k1x_ptr_write(chip, 0x45, 0, 0); 2) Probably digital spdif on the output jacks. snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x1000f); snd_emu10k1x_ptr_write(chip, 0x45, 0, 0x700); To enable this driver loading for the Audigy LS, have the following PCI IDs. static struct pci_device_id snd_emu10k1x_ids[] = { { 0x1102, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Dell OEM version (EMU10K1X) */ { 0x1102, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, /* Audigy LS */ { 0, } }; Other information: - value = snd_emu10k1x_ptr_read(chip, 0x74, 0); printk(Some special chip ID = %04x\n,value); Further additions to the snd_emu10k1x_create() function, after the lines snd_emu10k1x_ptr_write(chip, 0x41, 0, 0x70f); // ??? snd_emu10k1x_ptr_write(chip, 0x45, 0, 0); snd_emu10k1x_ptr_write(chip, 0x65, 0, 0x1000); snd_emu10k1x_ptr_write(chip, 0x72, 0, 0xf0f003f); snd_emu10k1x_ptr_write(chip, 0x71, 0, 0xf000); snd_emu10k1x_ptr_write(chip, 0x61, 0, 0x0); snd_emu10k1x_ptr_write(chip, 0x62, 0, 0x0); The AudigyLS also seems to use the emu10k1x_ptr 0x75 a lot in interrupt routines, but the Dell OEM one does not. Cheers James --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] General Info. PCI Audio devices that are handled by the OpenSound OSS drivers, but not handled by ALSA.
Just for general info. This list is a lot longer than I expected. This list only includes PCI devices. This list only includes devices that ALSA does NOT support currently. PCI AUDIO DEVICES handled by OSS but not ALSA. pci-id, comment, oss binary module name. pci4005,308 NOT-HANDLED als300 pci1023,2002 NOT-HANDLED wave4d pci1073,5 NOT-HANDLED ymf724 pci1078,103 NOT-HANDLED geode pci10b5,1142 NOT-HANDLED lynxone pci10c8,8016 NOT-HANDLED. neomagic pci1102,6 (New Dell SB Live, ALSA support just posted. ) pci1102,7 NOT-HANDLED, (SB Audigy LS) pci1106,7059 NOT-HANDLED via8233 pci1274,8001 NOT-HANDLED apci97 pci1274,8002 NOT-HANDLED apci97 pci1412,3630 NOT-HANDLED envy24ht pci1412,d630 NOT-HANDLED envy24 pci1412,d631 NOT-HANDLED envy24 pci1412,d632 NOT-HANDLED envy24 pci1412,d633 NOT-HANDLED envy24 pci1412,d634 NOT-HANDLED envy24 pci153b,1115 NOT-HANDLED envy24 pci153b,112b NOT-HANDLED envy24 pci153b,1130 NOT-HANDLED envy24 --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Suggestion regarding alsa driver writing documentation.
I have been helping some people with writing alsa drivers. One thing that they did not totally understand from the alsa documentation was the concept of frames. To help with this, could we add a html link between in the following document: - http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x490.htm In section: - /* pointer callback */ pointing to: - http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x537.htm In Section: - PCM Configurations Where it explains about what a frame is. I think it would be helpful to also explain that the document: - http://www.alsa-project.org/~iwai/writing-an-alsa-driver/x490.htm has a line: - current_ptr = mychip_get_hw_pointer(chip); I think that comments should be added close to that line to say: - The pointer value obtained from the hardware is likely to be a byte offset within the buffer. In order to convert this value to a type snd_pcm_uframes_t , that is required as the return value, use the following code: - return bytes_to_frames(substream-runtime, pointer); An explanation of what a frame is can be found at http://xyz Or just change the document example code: - /* pointer callback */ static snd_pcm_uframes_t snd_mychip_pcm_pointer(snd_pcm_substream_t *substream) { mychip_t *chip = snd_pcm_substream_chip(substream); - unsigned int current_ptr; + unsigned int current_byte_ptr; // get the current hardware pointer - current_ptr = mychip_get_hw_pointer(chip); - return current_ptr; + current_byte_ptr = mychip_get_hw_pointer(chip); + return bytes_to_frames(substream-runtime, current_byte_ptr); } Cheers James --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Re: Audio and Video sync. Getting Timestamps
Måns Rullgård wrote: James Courtier-Dutton [EMAIL PROTECTED] writes: snip The OP was recording. Oops. My explanation only covers playback, not capture. But if you use the snd_pcm_avail_update() just before you capture some samples from the buffer, then do a gettimeofday(), you will get an accurate measure of when the samples arrived in the buffer. If you also use a thread and get it to do poll(), you could also keep the latency down, with it calling the routine on each period elapsed. Summary: Use a method similar to the playback method, but just modify it a be for record. Cheers James --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Improving wine support for alsa.
Hi, I have been updating the wine alsa driver to work better with alsa. So far, all I have done is update it to use the new alsa api. Windows uses an api called Direct Sound. Direct Sound uses direct hardware buffer access. A Win32 program can quiry the sound driver and ask for the currently playing position, together with the first available possition that the application could write to. I will call these PlayPos and WritePos respectively. E.g. If the hardware is halfway through playing one period(the PlayPos is in the middle of a period), the beginning of the next period's position is returned as the WritePos. The problem arrives because the Win32 app expects to have full write access to the hardware buffer, and can write to any parts of it at any time. The sound card should just happily move through the buffer playing each sample as it goes, and when it reaches the end, just start at the beginning again. The alsa api is based more around the sound card asking for the next block of samples. Strangely enough, it Direct Sound works fine when using oss emulation in alsa. I was trying to just get alsa to copy samples from the Direct Sound buffer on a just in time basis. I was starting with writing one period to the sound card, calling snd_pcm_start(), then setting snd_async_add_pcm_handler(), expecting the handler to be called on each period, but the handler is never called. For some reason, the handler does not seem to get called on each period elasped as I was expecting. Another problem is that if I want to stop the stream, I call snd_pcm_drop(). With this I would expect snd_pcm_delay()==0 and snd_pcm_avail_update()==buffer_size. It seems that these values are only reset to 0 after first calling snd_pcm_prepare(). After stopping the stream in this way, I want to restart it again without having to close/open the pcm. Can anyone give me advice as to what I am doing wrong ? Cheers James --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Re: Audio and Video sync. Getting Timestamps
Juan Carlos Granda wrote: That's my app does: 1.- Open the device for capture 2.- Set the access mode SND_PCM_ACCESS_RW_INTERLEAVED 3.- Set format 16 bits (SND_PCM_FORMAT_S16_LE) 4.- Set channels 2 (stereo) 5.- Set buffer time near 1 second 6.- Set period time near 0.1 seconds 7.- Copy the hardware params to alsa 8.- Set start threshold (0x7f - Explicit start) 9.- Set transfer align 1 10.- Copy the software params to alsa read loop: - Read 'period size' frames (snd_pcm_readi) How can i get the timestamp of the first frame read? If i use snd_pcm_status_get_trigger_tstamp i obtain the same timestamp all the times. If i use snd_pcm_status_get_tstamp i obtain the now time. Is there any way to get the timestamp of every period. Thanks I help develope xinehq.de. We have needed to do audio, video sync, but we don't need any audio timestamps using the get_trigger_tstamp etc. We just use the snd_pcm_delay() call. Take an example. Sample rate 1 Samples a second (1 just to make things easy to explain.) We call snd_pcm_delay() and it returns 4000. 4000 samples at a sample rate of 1 = 400ms. If we now write some samples to the sound device, we know that they will arrive at the speakers in 400ms time. If we have some audio that needs to be played in 500ms time, we just insert 100 samples(100ms of samples) before sending our audio. We just know that those samples will reach the speakers in 500ms time. In xine, we do more compilcated things like resampling, so that samples are removed and added without the user noticing. So, for your application, if you just call snd_pcm_delay() just before you write your samples, or just after you write them, you will get a measure of when they will play. Cheers James --- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] STAC9758 datasheet now public.
I just received an email from sigmatel.com, so I thought I would pass on relevent information. The STAC9758 datasheet has been made public and can be attained at: http://www.sigmatel.com/products/technical_docs.htm#9758 Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Info needed for creative SB 0220 with STAC9758 codec, to get the REAR channels working.
Just for everyone's information. I now have all the info I need to get the Rear channel working. I thank Voluspa for giving me ssh root access so that I could find out the details via trial and error. But the summary is: - This tells the emu10k1 chip which slots to fill on the AC-LINK between the emu10k1 and the stac9758. snd_emu10k1_ptr_write(emu, AC97SLOT, 0, XXX); Where XXX is: /* bit 0 is AC97SLOT_REAR_LEFT * bit 1 is AC97SLOT_REAR_RIGHT * bit 2 is Unknown, Maybe spdif. Not tested. * bit 3 is Unknown, Maybe spdif. Not tested. * bit 4 is AC97SLOT_CNTR * bit 5 is AC97SLOT_LFE */ So, for the stac9758, we would set XXX to 0x33 DSP code: - OP(icode, ptr, iACC3, EXTOUT(13)... - Rear Left OP(icode, ptr, iACC3, EXTOUT(14)... - Rear Right Cheers James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Samples: Float to Int conversions.
Which section of code in alsa-lib is doing these conversions. I would like to see what code you use for the task of converting samples in float format to samples in int format. James --- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149alloc_id=8166op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] How to branch from WDM to ALSA fastest way??
Clemens Ladisch wrote: ns wrote: I have WDM driver for our lab's own propertiary sound card(ADAT+SPDIF+DB...) and wanna write ALSA drv. I have linux w/kernel 2.4.20 (original). I know that I must patch kernel for ALSA and write ALSA driver. HOw to do it fastest? look into alsa-kernel/Documentation/DocBook/writing-an-alsa-driver HTH Clemens It should be very easy to do. Just post your WDM source code to the web somewhere, and an alsa driver will probably just appear like magic! Cheers James --- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Bluetooth headset driver
Christian Ege wrote: Hi anyone working on something simalar to this? http://www.dcs.gla.ac.uk/~jp/snd-bt-sco/ The author of this driver won't continue his work because he switched to MAC OS ;-( I think the way he tried to integrate this driver into alsa isn't the best way. I am not that kind of Kernel guru but if there are some other people arround here interested in that stuff it shouldn't be too much work to integrate this driver in alsa. Or isn't there any interest in bluetooth communication ;-) cu chege I have been working on a bluetooth alsa driver, but it turns out to be a lot more complicated that one would at first think. 1) The bluetooth headset profile is a profile and therefore deemed to be a user space and not a kernel space program. 2) The current bluez bluetooth stack in the kernel does not provide any playback position feedback, so we would not be able to implement snd_pcm_delay() and therefore it would be extremely difficult to make a low latency app using it. The first use of a headset profile is for full duplex speach, which requires low latency, so that is a problem. 3) audio data path would therefore go from alsa-lib(userspace) - alsa-driver(kernel-space) - headset profile (userspace) - bluez stack (kernel space). Extremely messy in my view! (What http://www.dcs.gla.ac.uk/~jp/snd-bt-sco/ currently does in fact) Summary: - Until the bluez stack provides a mechanism for us to do snd_pcm_delay(), there is very little point advancing with the alsa side for bluetooth. Who will want to use a headset that has large uncontrollable latencies? Cheers James --- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] migrating from old to new alsa-api
[EMAIL PROTECTED] wrote: Hi, i need some clarifying about how the defines ALSA_PCM_OLD_HW_PARAMS_API etc. behaves. for alsa-1.x its clear that if the app uses the new api i have to define ALSA_PCM_NEW_HW_PARAMS_API, but what is for the case if i have an app with the new api and the user uses only alsa9? is alsa1.x then backwards compatible? regards Zsolt Barat ALSA_PCM_NEW_HW_PARAMS_API etc. is for use with alsa0.9.x That define is assumed to be the default for alsa1.x.x ALSA_PCM_OLD_HW_PARAMS_API is for use with alsa1.x.x to make it behave like alsa0.9.x without the ALSA_PCM_NEW_HW_PARAMS_API. Summary: - To make your code work with bother alsa 0.9.x and 1.x.x, use ALSA_PCM_NEW_HW_PARAMS_API etc. and then write your code to the 1.x.x api. --- This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] alsa driver data rates
Brian Furey wrote: Hi James, Im asking you becuae looking thru the archives you asked a similar question a long time ago. i'm using an open source VoIP application with the alsa driver. My card is the onboard intel8x0. My problem is figuring out the patterns I am getting with the alsa driver when transmitting packets. For instance when I use the GSM codec with a packets size of 80 msecs and 132 bytes, packets are transmitted at alternate intervals of 64/96 msecs. When i use G.711 packets of 240 bytes are transmitted every 32 msecs with an extra packet every 15 pkts. With G.711 it is obvious that 256 bytes are added to driver sending buffer every 32 msecs.However this does not match for GSM because it needs only 132 bytes every 64/96 msecs. Can the driver change the amount of data it gets from the soundcard to suit the codec? Help appreciated, Brian. Can you point me to a url for the source? I think I will understand you a bit better if I see the source code. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] SB Audigy 2. CAPTURE does not work any more. Latest CVS.
bash-2.05b#arecord RIFF$WAVEfmt @dataRecording WAVE 'stdout' : Unsigned 8 bit, Rate 8000 Hz, Mono bash-2.05b# Thats it. No error message, nothing recorded, just immeadiately exits. also: - bash-2.05b# arecord -Dhw:0 RIFF$WAVEfmt @dataRecording WAVE 'stdout' : Unsigned 8 bit, Rate 8000 Hz, Mono arecord: set_params:832: Sample format non available bash-2.05b# arecord -fdat -Dhw:0 RIFF$WAVEfmt ȔdataRecording WAVE 'stdout' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo bash-2.05b# bash-2.05b# cat info card: 0 device: 0 subdevice: 0 stream: CAPTURE id: emu10k1 name: EMU10K1 subname: subdevice #0 class: 0 subclass: 0 subdevices_count: 1 subdevices_avail: 1 bash-2.05b# So, the card is not being used by any other device. Anybody got any clues? latest CVS of alsa-driver, alsa-lib and alsa-utils as of 1 hour ago! Note: Audio playback works fine. I can play DVDs, use aplay to play .wav files, just not record! 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] problem while opening device
Pavana Sharma wrote: Hi, I am running a test application on my alsa driver for arm platform.Driver is statically built. The test application calls the snd_pcm_open. With device hw:0,0 At the target I have created sound driver files with snddevices.sh In /proc/asound i have the soundcard registered as card0 . Can anyone give ideas where can be the problem ..?? this is the error msg I am getting.. snip--- ALSA lib pcm.c:1947:(snd_pcm_open_noupdate) Unknown PCM hw:0,0 FYI ..when I use cat test.raw /dev/dsp is working. Thanks Pavana S cat /proc/asound/cards Sounds like your kernel is using low level oss drivers and not alsa for that card. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Detecting runtime ALSA library version
Glenn Maynard wrote: On Tue, Apr 06, 2004 at 05:04:34PM -0400, Paul Davis wrote: I can't find any way to detect the running ALSA version, for diagnostic cat /proc/asound/version That's the driver version, which I'm already logging. Like I said, I want the alsa-lib version that's being linked in, which very often has no relation to the alsa-driver version. cat /usr/include/alsa/version.h tells you the currently installed version. --- 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] testing alsa-lib.
alsa-lib contains a test program pcm.c that tests playback using all the different modes alsa-lib can do. Can we have a similar application for capture. When developing an alsa driver, it works fine with arecord, but fails with jackd, and the only difference is that arecord just uses snd_pcm_readi(), and jackd uses poll instead. It would be nice to have a test application that could test all different sound capture modes, readi, poll, async etc. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] [PATCH] fixes Re: problem compiling alsa-lib CVS.
Jaroslav Kysela wrote: On Wed, 31 Mar 2004, James Courtier-Dutton wrote: Is there any reason why this patch was not added to the alsa-lib cvs ? It's better to put this information to configure.in? No, because it selects which version of aclocal etc. that are used, which is before configure.in is even looked at. Jaroslav --- 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] buffer producer/consumer sync
Russell King wrote: On Wed, Mar 31, 2004 at 11:22:56AM +0200, Jaroslav Kysela wrote: On Wed, 31 Mar 2004, Russell King wrote: I suggest we add a load of preprocessor junk into the ALSA core and comment exactly _why_ its needed, thereby laying the reason completely at the door of these ill-defined APIs where questions have been asked and responses not been received. I'm thinking to prepare more or less complete patch for all architectures and send it to LKML for a discussion. The problem is that not all architecture maintainers are on lkml. Besides, I've tried talking to the architecture maintainers - their complete silence since two weeks ago indicates that they just don't want to know about this issue. As I said on the architecture alias - I've put enough non-rewarding time into this issue. I also have various commercial deadlines coming up, so I couldn't work on it even if I wanted to. If something is broken in the linux kernel (in this case for arm), and you submit a patch, and no-one else rejects it without suggesting a better way to do it, I can't see why your patch could justifiably being rejected. Of course if no-one else even cares about the problem and you don't have write access to the kernel tree, the problem will continue. I think this might be one of the cases of don't bother discussing it, create a patch to do the fix how you think best, and then post it. One can always use the approach of providing a patch for the linux kernel separately, so that any users wishing to use alsa have to first apply the patch. At least users can use alsa with arm! As arm is used on a majority of embedded systems, and as more and more embedded systems are using linux, the demand for your patches will certainly rise. As you obviously have support from Jaroslav Kysela, one could probably make it so that alsa-driver fails to compile on arm, unless your patch is applied to the kernel first. That would certainly provide a BIG incentive for your patch to get including into the kernel. I don't have an ARM platform running linux, but I definetly support your efforts to bring alsa to more different platforms. My 2 cents 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] [PATCH] fixes Re: problem compiling alsa-lib CVS.
Is there any reason why this patch was not added to the alsa-lib cvs ? James Courtier-Dutton wrote: James Courtier-Dutton wrote: I attach the output I see on the screen when running ./cvscompile. Cheers James I attach a patch to fix the problem for me. --- cvscompile 2002-10-24 13:09:30.0 +0100 +++ cvscompile.new 2004-03-22 16:58:07.072241360 + @@ -1,4 +1,9 @@ #!/bin/bash +# Minimum value required to build +WANT_AUTOMAKE_1_6=1 export WANT_AUTOMAKE_1_6 +AUTOMAKE_MIN=1.6.0 +AUTOCONF_MIN=2.53 +LIBTOOL_MIN=1.4.0 touch ltconfig libtoolize --force --copy --automake --- 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Need to know SBLive Chip difference
guan yim wrote: FYI too, the Audigy 2001 I have been talking about is using the following chips: SIGMATEL STAC9721T LC5A01E 0201 CREATIVE Audigy(tm) CA0100-IDF (C) CREATIVE TECH'01 2BA70KW I can have 6 channels output with this card. I think if creative uses the SIGMATEL chip on that SBLive 2003 (say, Audigy 2003) then it will create same problem later :) Do any output channels work. Just try stereo for front and rear and center/lfe Also, what is the output from lspci -n |grep 0401 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] intel8x0.c
Brian Furey wrote: Hi all, I have an intel810 onboard soundcard.I am using the alsa driver with a VoIP session. The intel8x0.c file has a minimum period byte size of 32 bytes with the minimum no. of periods being 1.The min and max rate is set to 48k. How can I find out what actual(runtime) size period the alsa driver is dealing with? Does it use the minimum size as the period size? Brian. Brian, I am working on a VoIP setup. I am updating the asterisk alsa console driver so that it actually works! The current driver is stuck round about alsa api 0.5.x The period size that the sound card is actually using does not really matter, if just effects latency. The bigger the period size, the higher the latency. Just set the period size to the smallest the sound card can do, and then just read and write to it. I found that PLAYBACK and CAPTURE directions can have different period sizes, so it is better to open separate handles for playback and capture. In the config setup, you set the buffer and period sizes, and before you set them, you can retrieve the current min/max period and buffer sizes. For playback, it is best to have a certain minimum buffer being full most of the time, due to network jitter, and this buffer can act as the jitter buffer. The actual size of this is probably best found out from trial and error (I have not finished testing this bit yet). For capture, just poll for input, and then read whatever is in the capture buffer and transmit it. You can experiment with different methods of early buffer reads, but again, I have not finished testing with that, so I can't give you any definite answers. Another thing to test with could be sampling and playback at 48k. Most sound cards work at 48k, and this would reduce the period_time. (period_size stays the same, but as one is using a higher rate, the period_time decreases, and thus latency.) The problems with that is that most VoIP is at 8k, so some resampling is required. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Full duplex questions.
I want a sound card to work in full duplex. I also want the in and out directions in sample sync. I.E. The playback period size is 160. I have my code polling, so that it is executed once every 160 samples. How do I ensure that each time my code executed, there will be at least 160 samples ready to be captured? Is there some way to link the starting of playback and capture so that they start at exactly the same time. So, each time i play 160 samples, I will have 160 samples ready to capture. If there are only 159 samples ready to be captured, my application will fail. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] emu10k1 capture period sizes?
Extract from ./sound/pci/emu10k1/emupcm.c static unsigned int capture_period_sizes[31] = { 384,448,512,640, 384*2, 448*2, 512*2, 640*2, 384*4, 448*4, 512*4, 640*4, 384*8, 448*8, 512*8, 640*8, 384*16, 448*16, 512*16, 640*16, 384*32, 448*32, 512*32, 640*32, 384*64, 448*64, 512*64, 640*64, 384*128,448*128,512*128 }; This makes the minimum period size that I can record from the MIC to be 384 frames. I would like period sized to be 20ms (Used by the GSM codec) in length for a VoIP application I am working on. VoIP generally works with 8000Hz sample rate to match that on Telco ISDN/Digital trunk lines. If the sample rate is 8000Hz, a period size of 384 frames makes for a 48ms which would add too much latency to the conversation. Ideally I would like to set the minimum period size to be 160 frames which is 20ms. Is there any technical reason why I cannot just add 160 to the table above? If it is ok, can someone please add it to the alsa-driver tree. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] problems using select() on alsa pcm.
Jaroslav Kysela wrote: On Wed, 24 Mar 2004, Paul Davis wrote: open pcm, and get a handle. snd_pcm_poll_descriptors(handle, pfd, err); Get a poll file scriptor in pfd. select(nfds, rfds, wfds, efds, tvp); Is it possible to use this call with alsa ? select is generally deprecated in linux (linus says so!). but you can use the same pfds in select as in poll (select is implemented in the kernel using the poll code). the problem is interpreting the results you get back (as noted recently for the dmix plugin). Nope, the application must give results back to pfd array and call snd_pcm_poll_descriptors_revents() function. In this way, everything will work as expected. Jaroslav So which of the following is needed: - snd_pcm_poll_descriptors(handle, pfd, err); select(nfds, rfds, wfds, efds, tvp); snd_pcm_poll_descriptors_revents() - decode the results of the select. or snd_pcm_poll_descriptors(handle, pfd, err); snd_pcm_poll_descriptors_revents() - rearrange the pfd so that select works as expected. select(nfds, rfds, wfds, efds, tvp); 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] [PATCH] Full duplex dmix,dsnoop
See attached patch for suggested new pcm device. It works for: - arecord -fdat -Dplug:duplex | aplay -Dplug:duplex bash-2.05b# arecord -fdat -Dplug:duplex | aplay -Dplug:duplex Recording WAVE 'stdout' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo but fails for: - arecord -fcd -Dplug:duplex | aplay -Dplug:duplex bash-2.05b# arecord -fcd -Dplug:duplex | aplay -Dplug:duplex Recording WAVE 'stdout' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo arecord: pcm.c:5920: snd_pcm_mmap_commit: Assertion `frames = snd_pcm_mmap_avail(pcm)' failed. Aborted by signal Aborted... This last example with -fcd, outputs one period, maybe two then exits with the above error. Can anybody help? Cheers James --- alsa.conf.org 2004-02-04 12:28:31.0 + +++ alsa.conf 2004-03-25 19:27:34.207640104 + @@ -228,6 +228,12 @@ } } +pcm.duplex { + type asym + playback.pcm dmix + capture.pcm dsnoop +} + pcm.shm { @args [ SOCKET PCM ] @args.SOCKET {
Re: [Alsa-devel] [PATCH] Full duplex dmix,dsnoop
Jaroslav Kysela wrote: On Thu, 25 Mar 2004, James Courtier-Dutton wrote: bash-2.05b# arecord -fcd -Dplug:duplex | aplay -Dplug:duplex Recording WAVE 'stdout' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo arecord: pcm.c:5920: snd_pcm_mmap_commit: Assertion `frames = snd_pcm_mmap_avail(pcm)' failed. Aborted by signal Aborted... This last example with -fcd, outputs one period, maybe two then exits with the above error. Do you use latest CVS code? I've fixed this problem with the rate (resampling) plugin. Jaroslav I think so, cat /usr/include/alsa/version.h /* * version.h */ #define SND_LIB_MAJOR 1 /** major number of library version */ #define SND_LIB_MINOR 0 /** minor number of library version */ #define SND_LIB_SUBMINOR3 /** subminor number of library version */ #define SND_LIB_EXTRAVER100 /** extra version number, used mainly for betas */ /** library version */ #define SND_LIB_VERSION ((SND_LIB_MAJOR16)|\ (SND_LIB_MINOR8)|\ SND_LIB_SUBMINOR) /** library version (string) */ #define SND_LIB_VERSION_STR 1.0.3b --- 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] problems using select() on alsa pcm.
open pcm, and get a handle. snd_pcm_poll_descriptors(handle, pfd, err); Get a poll file scriptor in pfd. select(nfds, rfds, wfds, efds, tvp); Is it possible to use this call with alsa ? It seems that the select functions as expected with the descriptor so that we can do a snd_pcm_writei(). It seems that the select does not function so that we can do a snd_pcm_readi(). Are there any documents describing how one can get the read (rfds) working? 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] List of control parameters needed
Pavana Sharma wrote: Hello, I am trying to export the controls to user space. I want to know the complete list of controls which ALSA expects the codec to support. For example, few are as below, Master Playback Volume Master Playback Switch Tone Control - Bass Tone Control - Treble Line Capture Volume Mic Capture Volume Mic Sensitivity Mic Auto Volume Mic Auto Switch Where can I get the complete list of controls which an audio codec has to support. Thanks Regards Pavana S The envy24/ice1712 cards do not have a Master or PCM control. --- 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] problem compiling alsa-lib CVS.
I attach the output I see on the screen when running ./cvscompile. Cheers James Script started on Mon Mar 22 16:50:52 2004 sh-2.05b# ./cvscompile automake-1.5: configure.in: installing `./install-sh' automake-1.5: configure.in: installing `./mkinstalldirs' automake-1.5: configure.in: installing `./missing' automake-1.5: configure.in: installing `./depcomp' /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL src/Makefile.am:21: invalid unused variable name: `AM_LDFLAGS' /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
Re: [Alsa-devel] snd_pcm_wait() More details required.
Jaroslav Kysela wrote: So, when is a PCM ready? If a PCM is already in SND_PCM_STATE_RUNNING, when is snd_pcm_wait() supposed to return ? When avail = avail_min. 1) Does this depend on period size in any way? For example, if period size is 6000 frames, and I set avail_min to 2000 frames, will snd_pcm_wait() return when avail=2000 or avail=6000 ? Another example, if persiod size is 1500, and I set avail_min to 2000, will snd_pcm_wait() return when avail=200 or avail=3000 (2*1500)? 2) Is snd_pcm_wait() a call that uses little or no CPU time, much like a poll? 3) It appears from the docs that I can set avail_min at any time, even in SND_PCM_STATE_RUNNING. commands to set it would be: - snd_pcm_sw_params_current(this-audio_fd, swparams); snd_pcm_sw_params_set_avail_min(this-audio_fd, swparams, new_avail_min_size); snd_pcm_sw_params(this-audio_fd, swparams); or is there a better way to do it while in SND_PCM_STATE_RUNNING ? 4) If snd_pcm_wait() is waiting, and with another thread we change the avail_min value, will the snd_pcm_wait() use the new value, or is the new value only used on the next call to snd_pcm_wait() I have discovered a problem with xine when using it. I have done a work around in xine so that dmix now works in xine. I think that my assumptions regarding snd_pcm_wait() might have been wrong, so I want to get accurate details from yourselves. It also might be a good idea to update the documentation for snd_pcm_wait() with more details. We had a bug in the resample plugin which causes that snd_pcm_wait() function was broken. Try alsa-lib from CVS. My current tests were not using the resampler. i.e. app using 48k, sound card using 48k. I will try some tests that would use the resampler. Jaroslav --- 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] [PATCH] fixes Re: problem compiling alsa-lib CVS.
James Courtier-Dutton wrote: I attach the output I see on the screen when running ./cvscompile. Cheers James I attach a patch to fix the problem for me. --- cvscompile 2002-10-24 13:09:30.0 +0100 +++ cvscompile.new 2004-03-22 16:58:07.072241360 + @@ -1,4 +1,9 @@ #!/bin/bash +# Minimum value required to build +WANT_AUTOMAKE_1_6=1 export WANT_AUTOMAKE_1_6 +AUTOMAKE_MIN=1.6.0 +AUTOCONF_MIN=2.53 +LIBTOOL_MIN=1.4.0 touch ltconfig libtoolize --force --copy --automake
[Alsa-devel] snd_pcm_wait() More details required.
I need more details on exactly what snd_pcm_wait() is supposed to do. The documentation on the www.alsa-project.org gives: - Wait for a PCM to become ready. Parameters: pcm PCM handle timeout maximum time in milliseconds to wait Returns: a positive value on success otherwise a negative error code (-EPIPE for the xrun and -ESTRPIPE for the suspended status, others for general errors) Return values: 0 timeout occurred 1 PCM stream is ready for I/O So, when is a PCM ready? If a PCM is already in SND_PCM_STATE_RUNNING, when is snd_pcm_wait() supposed to return ? I have discovered a problem with xine when using it. I have done a work around in xine so that dmix now works in xine. I think that my assumptions regarding snd_pcm_wait() might have been wrong, so I want to get accurate details from yourselves. It also might be a good idea to update the documentation for snd_pcm_wait() with more details. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] OSS API redirector
David Lloyd wrote: On Thu, 18 Mar 2004, James Courtier-Dutton wrote: What is the conclusion regarding fopen/fclose/fwrite/fread. Can it be done? I thought that one rather pie-in-the-sky idea might be to use a kernel module that made /dev/dsp, /dev/mixer, etc., and reflects back to a userspace ALSA sound server via another device. This way, it doesn't matter how the device is opened. Might be difficult to do though, especially when you get mmap and dma involved. Just a thought, anyway. - D I thought of that, but with that you just get different problems. E.g. dmix only works is all application wishing to play sound are run by the same user. You would probably need some daemon to run the /dev/dsp, and that user deamon would have to run under the same user as any native alsa app. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Fw: [Bug 76413] arts does not follow ALSA API
Florian Schmidt wrote: He sounds pissed.. :) If you get pissed by these forwards, please tell me.. I figured they might be of interest.. Begin forwarded message: Date: 19 Mar 2004 15:05:31 - From: Allan Sandfeld [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Bug 76413] arts does not follow ALSA API --- You are receiving this mail because: --- You are a voter for the bug, or are watching someone who is. http://bugs.kde.org/show_bug.cgi?id=76413 --- Additional Comments From kde carewolf com 2004-03-19 16:05 --- CVS commit by carewolf: After venting my fury I calmed down and looked at the dmix-code. It seems it is really more borken than broken, and nothing we can't work around. - Make aRts work with dmix. Two important changes: 1. Dmix uses read-events to signify write-events, so we need to autodetect what kind of crack ALSA is smoking today. 2. Dmix needs to be started like a recorder even if this is contrary to the ALSA API documentation. If everything works like expected I will backport and close bugs 76413 and 70802. CCMAIL: 76413 bugs kde org CCMAIL: 70802 bugs kde org M +110 -48 audioioalsa9.cc 1.6 If there is a bug in alsa, we will fix it. Can you post a small program to demonstrate the problem. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Fw: [Bug 76413] arts does not follow ALSA API
Joerg Mayer wrote: On Fri, Mar 19, 2004 at 08:30:13PM +, James Courtier-Dutton wrote: The guys there just don't understand what you told them. If they took the time to actually read what you said, they could easily fix their problem. Summary: - No bug in alsa. Summary 2: There seem to be quite a lot of projects that have problems to get native alsa support right: wine, winex, arts, xmms... wine is only just starting to support alsa properly, due mainly to lack of real need to alsa support for a long time. They are starting to support it well now. xmms don't support it well for obvious reasons. They charge people for OSS drivers, so the xmms alsa driver has to look worse! How about a alsa application developers meeting once per month on IRC? If that meeting would be announced on the developer mailing list of projects that are known to use alsa, this might actually help. Just reading the docs correctly should help. I hang out on #alsa on freenode quite a lot, and will help if I have the time. The invitation should contain something along the line: If you have written code to use alsa, you should participate. Either because you did it right and can help others to do so too or because you didn't and in that case you should want to improve. Ciao Jörg --- 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] OSS API redirector
Jaroslav Kysela wrote: Hi all, I would like to point all developers to the OSS API redirector which is in our alsa-oss package. It's universal piece of code which can redirect all OSS API calls (actually mixer PCM API only) to any shared library. Pros: - no more LD_PRELOAD hacks - any library can be used directly as endpoint - when used more applications will work (also some which does not work with LD_PRELOAD hack) Drawbacks: - still no fopen/fclose/fwrite/fread solution - applications must be a little bit modified - Jaroslav Kysela [EMAIL PROTECTED] Linux Kernel Sound Maintainer ALSA Project, SuSE Labs What is the conclusion regarding fopen/fclose/fwrite/fread. Can it be done? 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] ALSA Test suite
Takashi Iwai wrote: there are test codes in alsa-lib/tests directory. also James Courtier-Dutton wrote some neat test programs (i'd like to include them too). Takashi Although you have not asked me directly, feel free to include my test programs. I assume you are talking about the ones from: - http://www.superbug.demon.co.uk/speaker-test/ Just make sure that my name,copyright message appears at the top of each source code file you use. Please tell me as soon as they appear in the alsa cvs, because I need to remove them from my site due to bandwidth limits. 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=1470alloc_id=3638op=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=1470alloc_id=3638op=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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] PCM hw mixing with volume
Ove Kaaven wrote: Well, the requirements that raised this thread should be fairly clear. For example, ALTERNATIVE 1 snd_pcm_set_volume(snd_pcm_t* pcm, int volume) and snd_pcm_set_pan(snd_pcm_t* pcm, int pan) using whatever value range makes the most sense, and perhaps some query on whether these controls are available from the pcm info. It's acceptable to have to explicitly ask for these controls using hw_params. The plug plugin could insert the route/volume plugin if these controls are asked for. ALTERNATIVE 2 snd_pcm_set_volume(snd_pcm_t* pcm, int vol_left, int vol_right) but I don't expect this to be useful, since there are probably some oddball devices out there that aren't able to control left and right volume independently like this. ALTERNATIVE 3 Let each PCM channel have its own mixer control, like the EMU10K1 currently do. That is, use snd_pcm_info_get_subdevice() to get the index, then look up a volume control with a well-known name and the given index using the snd_ctl API to control the volume of that PCM stream. The name and semantics of that mixer control would have to be standardized and be the same on all devices that are capable of this feature. What about 7.1 surround sound channels. All your suggestions only assume 2 PCM channels. Although it might seem nice to add this to alsa, it is not exactly a difficult task for the application to do itself. I suggested exactly what you suggested some time ago (see alsa-devel archives), but recently I have realised that there is little or no point. The application will contain a user interface control for the volume, so one might as well adjust the volume in software as well. It is not even very CPU intensive. 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=1470alloc_id=3638op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] ALC650 GPIO bits
Takashi Iwai wrote: Hi, it seems that some mobo with ALC650 uses GPIO 0 as the mic bias +5V. in ac97_patch.c, the GPIO 0 is turned on/off in conjunction with the mic/center sharing switch, but this handling appears only for the old ALC650 revision (D or older). interestingly, there is a report that even a mobo with the newer revision of ALC650 has this GPIO bit. now, the question is why GPIO is not handled with the revision E and F. i can't remember the reason (google gives no good info) -- does anyone still know? is there any mobo with a side effect of this GPIO? Takashi The best source I found for ALC650 info is from the Realtek web site. http://www.realtek.com.tw/downloads/dlac97-1.aspx 1) They have a datasheet for the ALC650, although the datasheets have errors in them. http://www.realtek.com.tw/downloads/downloads1-3.aspx?lineid=5famid=12series=8Spec=Truerefdesign=True 2) They have their own version of the alsa-driver, which you can look at to see what they do about things like this. Just download their linux driver. It is alsa-driver source code. http://www.realtek.com.tw/downloads/dlac97-2.aspx?lineid=5famid=12series=8Software=True#8Unix%20(Linux) Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] CVS ALSA failed upgrade in Linux 2.6.3
William wrote: Jaroslav wrote on alsa-project.org: simply copy files from the ALSA's alsa-kernel CVS module to relevant locations in the 2.6 kernel tree. This is one method of upgrading to CVS ALSA. However, using this method with Linux 2.6.3 and current CVS alsa-kernel gives errors: Use directions at: - http://alsa.opensrc.org/index.php?page=AlsaBuild2.6 Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] CVS ALSA failed upgrade in Linux 2.6.3
William wrote: James Courtier-Dutton [EMAIL PROTECTED] wrote: Use directions at: - http://alsa.opensrc.org/index.php?page=AlsaBuild2.6 Thanks, James. Like I said in my previous reply to you, the section describing option 1 is confusing because it seems to contradict itself firstly by saying alsa-driver is needed (at the first paragraph) and secondly by saying alsa-driver might not be needed (at the end of the section) because Linux 2.6.3 includes alsa-driver-1.0.2, which misses the point of wanting to use CVS alsa-driver in the first place, i.e. to get the very latest drivers -- not those in alsa-driver-1.0.2. Basically it doesn't explain why you should install CVS alsa-drivers. Also it doesn't say what to do with alsa-kernel yet the cvs example shows alsa-kernel being checked out. As Takashi Iwai said earlier, alsa-kernel includes stable drivers only and excludes new/experimental drivers. My understanding is you should install either alsa-kernel or CVS alsa-drivers, but not both of them. William The point of option 1 is to explain how to upgrade alsa if you need to. Not everyone needs to upgrade. If you wish to use the cvs, you have to get alsa-driver and alsa-kernel, because alsa-driver uses files from ../alsa-kernel So, if you follow the cvs command exactly it will work. Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Soundcard matrix: removing some M-Audio USB devices
Frank Barknecht wrote: Hallo, James Courtier-Dutton hat gesagt: // James Courtier-Dutton wrote: You will be lucky to find any sound card complying with the USB Audio spec, as the spec is written so badly. This is the USB spec I'm referring, not the USB AUDIO spec. Those M-Audio devices aren't even recognized as being USB devices by the kernel. ciao So lsusb gives no output for the device? I have seen some usb devices that connect, and then for some reason the kernel does not like them, and disconnects them before you have a chance to see them in lsusb. Which part of the USB spec do they break ? Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Attempts on the ESS-1869 card
Looks like a Sound Blaster compatible. Try modprobe snd-sb16 enable=1 isapnp=0 port=0x0220 mpu_port=0x330 irq=5 dma8=1 dma16=5 Cheers James Tom Watson wrote: Ah, a new card to try... This time it is an Ensonic ESS-1869 that is built into an older Compaq laptop (Armada 3500). When I put in the setup disk, it reports that the sound card has the following I/O stuff: IRQ 5 DMA 1 DMA 5 ports at 0x0220 thru 0x022F (16 ports) ports at 0x0388 thru 0x038B (4 ports) ports at 0x0330 thru 0x0331 (2 ports) some other port range at 0x0250 thru 0x0257 (8 ports). In reading the driver I see that port reserves 16, fm_port reserves 4, and mpu_port reserves 2. Being a nice guy I attempt to load the module with insmod, and the file modules.conf has: ... alias snd-card-0 snd-es18xx options snd-es18xx id=first enable=1 dma1=1 dma2=5 irq=5 port=0x220 \ fm_port=0x338 mpu_port=0x330 ... But all is not well as I get an error upon doing an insmod: .../es18xx.c:2256: ESS AudioDrive ES18xx soundcard not found or device busy. Am I missing something simple to get this thing working?? From the look of things, I should have all the stuff working. I even attempted to try an ISAPNP, but that didn't appear to work either. Any better ideas from the group. ...Thanks = --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Re: The obsolence of OSS, Was: big smile
Adam Tla/lka wrote: nice but many people just haven't this hardware and want to use normal PCI sound cards or even matherboard build in codecs and mix many applications PCM sound together, use MIDI (software emulated or not) without need of special configuring of aplications. VirtualMixer, InputMultiplexer and SoftMidi in OSS does things transparently. Mixing is done in kernel space so there is no delays and clicks while some disk activity get processor as occurs in ALSA mixing in lib case. Test xmms with ALSA and dma plugin and try to open big tar.gz file. We got buffer underrun and app freezes. Sometimes I can only do kill -9 ;-). It depends on buffer and period sizes. Sometimes app freezes completly and sometimes you can rebufer by pressing pause/play buttons. Is it nice and accepted?? While useing java app under aoss it gopes to hell if buffer underrun occures. To be fair, xmms's alsa support is rather poor. If you get the same problems with an application like xine (xine.sf.net), then we would need to look into the problem. xine has better alsa support than xmms. Summary: - Make the test fair. :-) Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] [PATCH] add aplaymidi arecordmidi utils
Will wrote: Clemens Ladisch [EMAIL PROTECTED] wrote: Did you change asequencer.h in both the kernel and alsa-lib? No, I didn't see my script had actually failed to patch include/sound/asequencer.h BTW I know there are several correct ways of updating the ALSA in Linux 2.6.x according to the docs at Wiki alsa.opensrc.org and alsa-project/alsa-doc/ Is the following a correct way of updating the ALSA in Linux 2.6.3? I have just updated the alsa.opensrc.org wiki. Use option 1] on http://alsa.opensrc.org/index.php?page=AlsaBuild2.6 Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Re: The obsolence of OSS, Was: big smiley
Adam Tla/lka wrote: sigh. of course! because the kernel has no idea that your audio application needs to run with real-time priority, and is instead treating all apps as if they are normal interactive programs. if you tell the kernel that your app needs to run with RT priority (there are So why I think about some api to tell the kernel that some app nedds CPU in more deterministic manner. Generally if we could do this by /proc too like tunnig ALSA for particular programs it would be good for old proprietary programs which we couldn't improve. It's not RT but some sheduler modification to treat some programs specially. OSS cannot affect this in any way - its a function of the kernel scheduler and not the audio device API. OK but we could have some kernel RT thread which is doing mixing or MIDI emulation. Regards The ideal scheduler for realtime apps would be one that has an api that allows for a call like schedule me at exactly 10ms intervals+-1ms. This would cause the scheduler to automatically juggle the other processes around so that at the exact time of the 10ms interval, our process gets CPU time. We would have to also configure +-ms so that the scheduler has some leaway to allow for some optimisations. This api should be flexible enough to allow us to do the same, but using the sound card's hardware clock as the trigger. The same again for the video card's clock/frame interrupt. The current schedular gives every process X microseconds of CPU time or less (process calls nano_sleep() ) We should be able to get the schedular to give a process less CPU time if the next process to schedule is the realtime interval process. Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Re: The obsolence of OSS, Was: big smiley
Paul Davis wrote: The ideal scheduler for realtime apps would be one that has an api that allows for a call like schedule me at exactly 10ms intervals+-1ms. no, thats not true. the system clock does not run in sync with the sample clock. the drift in this would become noticeable in a few minutes. I know that. I was saying that we should be able to use the sample clock in scheduling descisions as well as the system clock, but as you say, for sound, we don't really care about the sample clock, only the interrupt that happens as a result. It would still be nice to have a system clock based interval process for applications that require activity at specific intervals, but are not to do with sound or video. the only time to run an audio app is ASAP after the interrupt from the device is recieved (assuming minimum latency; there is a more involved, but still interrupt-driven deadline with non-minimal latency). --p An audio hardware interrupt can interrupt any process at any time. Is there already a procedure in linux so that the interrupt_handler can cause the scheduler to select a particular process to run immeadiately after this interrupt_handler has finished? I can see problems with the following setup: - Audio interrupt occurs Audio interrupt_handler finishes. Audio user space process get control of CPU. Some other interrupt occurs Some other interrupt_handler informs the scheduler to run xyz process next. Question: - Which process should be run next? Continue with the audio user space process, or start the new xyz process? Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] New unsupported sound card: Aureal Semiconductor Vortex 1 (rev 02)
00:0e.0 Multimedia audio controller: Aureal Semiconductor Vortex 1 (rev 02) 00:0e.0 Class 0401: 12eb:0001 (rev 02) Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Forget: Re: New unsupported sound card: Aureal Semiconductor Vortex 1 (rev 02)
James Courtier-Dutton wrote: 00:0e.0 Multimedia audio controller: Aureal Semiconductor Vortex 1 (rev 02) 00:0e.0 Class 0401: 12eb:0001 (rev 02) Cheers James It is not in alsa-kernel, only in alsa-driver! Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] 1.0.3rc2 release ... alsa-utils fails compiling aplay.
Jaroslav Kysela wrote: Hello all, I released 1.0.3rc2 packages. The full changelog from 1.0.2 will came with the final release, but it would be nice to do some tests with this code with smaller number of testers to not follow the 1.0.2 situation when we have to quickly release several versions due to compilation problems. Please, test the packages. Thanks, Jaroslav - Jaroslav Kysela [EMAIL PROTECTED] Linux Kernel Sound Maintainer ALSA Project, SuSE Labs alsa-driver-1.0.3rc2 compiles and installs ok. alsa-lib-1.0.3rc2 compiles and installs ok. alsa-utils-1.0.3rc2 fails with: make[1]: Entering directory `/u/alsa/alsa-utils-1.0.3rc2/aplay' if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include-g -O2 -MT aplay.o -MD -MP -MF .deps/aplay.Tpo \ -c -o aplay.o `test -f 'aplay.c' || echo './'`aplay.c; \ then mv -f .deps/aplay.Tpo .deps/aplay.Po; \ else rm -f .deps/aplay.Tpo; exit 1; \ fi aplay.c: In function `set_params': aplay.c:841: warning: passing arg 3 of `snd_pcm_hw_params_set_rate_near' makes integer from pointer without a cast aplay.c:860: warning: passing arg 3 of `snd_pcm_hw_params_set_period_time_near' makes integer from pointer without a cast aplay.c:863: warning: passing arg 3 of `snd_pcm_hw_params_set_period_size_near' makes integer from pointer without a cast aplay.c:867: warning: passing arg 3 of `snd_pcm_hw_params_set_buffer_time_near' makes integer from pointer without a cast aplay.c:870: warning: passing arg 3 of `snd_pcm_hw_params_set_buffer_size_near' makes integer from pointer without a cast aplay.c:879: warning: passing arg 2 of `snd_pcm_hw_params_get_period_size' from incompatible pointer type aplay.c:879: error: too many arguments to function `snd_pcm_hw_params_get_period_size' aplay.c:880: error: too many arguments to function `snd_pcm_hw_params_get_buffer_size' aplay.c:886: error: too many arguments to function `snd_pcm_sw_params_get_xfer_align' make[1]: *** [aplay.o] Error 1 make[1]: Leaving directory `/u/alsa/alsa-utils-1.0.3rc2/aplay' make: *** [all-recursive] Error 1 Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Ignore: Re: [Alsa-devel] 1.0.3rc2 release ... alsa-utils fails compiling aplay.
Accidentally install alsa-lib 0.9.6 before alsa-utils, instead of alsa-lib-1.0.3rc2. Compiles and installs fine now. Sorry James James Courtier-Dutton wrote: Jaroslav Kysela wrote: Hello all, I released 1.0.3rc2 packages. The full changelog from 1.0.2 will came with the final release, but it would be nice to do some tests with this code with smaller number of testers to not follow the 1.0.2 situation when we have to quickly release several versions due to compilation problems. Please, test the packages. Thanks, Jaroslav - Jaroslav Kysela [EMAIL PROTECTED] Linux Kernel Sound Maintainer ALSA Project, SuSE Labs alsa-driver-1.0.3rc2 compiles and installs ok. alsa-lib-1.0.3rc2 compiles and installs ok. alsa-utils-1.0.3rc2 fails with: make[1]: Entering directory `/u/alsa/alsa-utils-1.0.3rc2/aplay' if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include-g -O2 -MT aplay.o -MD -MP -MF .deps/aplay.Tpo \ -c -o aplay.o `test -f 'aplay.c' || echo './'`aplay.c; \ then mv -f .deps/aplay.Tpo .deps/aplay.Po; \ else rm -f .deps/aplay.Tpo; exit 1; \ fi aplay.c: In function `set_params': aplay.c:841: warning: passing arg 3 of `snd_pcm_hw_params_set_rate_near' makes integer from pointer without a cast aplay.c:860: warning: passing arg 3 of `snd_pcm_hw_params_set_period_time_near' makes integer from pointer without a cast aplay.c:863: warning: passing arg 3 of `snd_pcm_hw_params_set_period_size_near' makes integer from pointer without a cast aplay.c:867: warning: passing arg 3 of `snd_pcm_hw_params_set_buffer_time_near' makes integer from pointer without a cast aplay.c:870: warning: passing arg 3 of `snd_pcm_hw_params_set_buffer_size_near' makes integer from pointer without a cast aplay.c:879: warning: passing arg 2 of `snd_pcm_hw_params_get_period_size' from incompatible pointer type aplay.c:879: error: too many arguments to function `snd_pcm_hw_params_get_period_size' aplay.c:880: error: too many arguments to function `snd_pcm_hw_params_get_buffer_size' aplay.c:886: error: too many arguments to function `snd_pcm_sw_params_get_xfer_align' make[1]: *** [aplay.o] Error 1 make[1]: Leaving directory `/u/alsa/alsa-utils-1.0.3rc2/aplay' make: *** [all-recursive] Error 1 Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] big smile
Jaroslav Kysela wrote: http://www.opensound.com/cuckoo.html :-) No comment, except that some comments are really wrong. Jaroslav Hehe! ;-) Is there a list anywhere listing the differences between OSS and ALSA with regard to sound card hardware. It would be nice to have a nice small list of all the sound hardware OSS supports, but ALSA does not. Then the intention would be to reduce that list to no entries by implementing them all in ALSA. I only know of 2 sound cards on that list: - 1) SB Live (Dell version) emu10k1x 2) SB Audigy LS (A emu10k1x lookalive with minor differences) Are there any others we need to add to the list? Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] big smile
Jaroslav Kysela wrote: On Tue, 24 Feb 2004, James Courtier-Dutton wrote: Jaroslav Kysela wrote: http://www.opensound.com/cuckoo.html :-) No comment, except that some comments are really wrong. Jaroslav Hehe! ;-) Is there a list anywhere listing the differences between OSS and ALSA with regard to sound card hardware. It would be nice to have a nice small list of all the sound hardware OSS supports, but ALSA does not. Then the intention would be to reduce that list to no entries by implementing them all in ALSA. I only know of 2 sound cards on that list: - 1) SB Live (Dell version) emu10k1x 2) SB Audigy LS (A emu10k1x lookalive with minor differences) Yes, I definitely want to support these cards in ALSA in near future. It seems that Creative is very popular here in Europe. Also there are some lynxone, lynxtwo modules in latest OSS drivers. Jaroslav Can we add them in RED to the http://www.alsa-project.org/alsa-doc/ page? SB Live (Dell version) emu10k1x: - (lspci would give Class 0401: 1102:0006) SB Audigy LS (A emu10k1x lookalike with minor differences.) (lspci would give Class 0401: 1102:0007) Maybe we should add an lspci info column to the table, so people could quickly see if their card was supported or not. Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] Black list?
http://www.alsa-project.org/black.html How can this list be NONE! We need to add Creative for their SB Live Dell edition (emu10k1x) and the SB Audigy LS. Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Black list?
Jaroslav Kysela wrote: On Tue, 24 Feb 2004, James Courtier-Dutton wrote: http://www.alsa-project.org/black.html How can this list be NONE! We need to add Creative for their SB Live Dell edition (emu10k1x) and the SB Audigy LS. Well, have we a response from Creative that they're not willing to give us programming information? Jaroslav Quoted response from Creative today: - Unfortunately, I can't give you this information. I'm lobbying to get it released. Some time ago, Creative were very supportive of linux and the open source community, but in the last year or 2 that has changed considerably. So I vote to black list Creative. I think it would also be good to add status to all sound card manufacturers with several levels: - 1) Very co-operative, supply datasheets and points of contact. (We should add url links to copies of the datasheets, and store copies of all datasheets on the alsa web site.) 2) Supply datasheets with enough infomation to write drivers. 3) Minimal help has been provided and limited functionallity has been implemented in the driver. 4) Do not help, but people have managed to reverse engineer enough and have built drivers. 5) Do not help, and no reverse engineering work has been done. Maybe on a per sound card level. I think we should also list PCI IDs together with the sound card names, for the sake of accuracy. Adding direct url links to datasheets stored on the alsa site would help potential developers a lot. For example, when I did some work on the AC97 chips, it took a long time for me to track the datasheets down. We can then sing the praises of all the helpful companies and aid in their marketing effort. So helpful companies get more sales. We can also then do the opposite with unhelpful companies. We could then have three lists: - 1) Black list for unhelpful companies. 2) Grey list for partially helpful companies 3) White list for very helpful companies. So, for example I see a sound card on a web site. e.g.Gainward [EMAIL PROTECTED] 7.1 soundcard/PCI 24bit VIA Envy24 chipset Is that a black, grey or white sound card? Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] [PATCH] emu10k1.h
Adds some info to /usr/src/linux/include/sound/emu10k1.h Cheers James --- emu10k1.h.org 2004-02-25 01:08:35.129501584 + +++ emu10k1.h 2004-02-25 01:26:34.617394480 + @@ -644,9 +644,13 @@ #define SOLEH 0x5d /* Stop on loop enable high register */ #define SPBYPASS 0x5e /* SPDIF BYPASS mode register */ -#define SPBYPASS_ENABLE 0x0001 /* Enable SPDIF bypass mode */ +#define SPBYPASS_SPDIF0_MASK 0x0003 /* SPDIF 0 bypass mode*/ +#define SPBYPASS_SPDIF1_MASK 0x000c /* SPDIF 1 bypass mode*/ +/* bypass mode: 0 - DSP; 1 - SPDIF A, 2 - SPDIF B, 3 - SPDIF C */ +#define SPBYPASS_FORMAT 0x0f00 /* If 1, SPDIF XX uses 24 bit, if 0 - 20 bit */ #define AC97SLOT 0x5f/* additional AC97 slots enable bits */ +#define AC97SLOT_10K2 0x03 #define AC97SLOT_CNTR 0x10/* Center enable */ #define AC97SLOT_LFE 0x20/* LFE enable */
Re: [Alsa-devel] Help with supporting Emu10k1x and question
Francisco Moraes wrote: From what I can see for the emu10k1x (aka. sb Live 5.1 from Dell) is almost exactly the same as the Audigy LS. It is a very simple device, and the driver should be based more like the snd-intel8x0 driver than the snd-emu10k1 driver. It has no dsp, and no hardware mixing, and is a single open device. Very similar to the intel8x0 feature wise. If someone will send me a sample sound card, I will get it working. I cannot send you my card but I will try a driver on it without a problem as I have already been experimenting. I can also try to send you my changed emu10k1 driver (with almost everything disabled but pcm and ac97). Let me know. Francisco I think you would do better basing your driver on the intel8x0.c code, and drop the emu10k1 code effort. The emu10k1x and sb audigy ls are nothing like the emu10k1 or emu10k2. Send me the code you already have, and I will help correct it. Just tell me if you have the Dell SB Live (aka. emu10k1x) or the SB Audigy LS. Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] Help with supporting Emu10k1x and question
Bastien Aracil wrote: At Mon, 16 Feb 2004 18:39:46 -0500, Francisco Moraes wrote: I am trying to get the Emu10k1x chip supported in alsa. Anyone willing to give me a hand, please email me. I've got a few register dumps and I am trying to get it working. I'm will be pleased to help you. I got recently a SB Live 5.1! from DELL and so have no sound with Linux. I'm not an expert of sound card driver put I'm motivated to make mine working under linux. Let me known what I can do Bastien From what I can see for the emu10k1x (aka. sb Live 5.1 from Dell) is almost exactly the same as the Audigy LS. It is a very simple device, and the driver should be based more like the snd-intel8x0 driver than the snd-emu10k1 driver. It has no dsp, and no hardware mixing, and is a single open device. Very similar to the intel8x0 feature wise. If someone will send me a sample sound card, I will get it working. Cheers James --- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356alloc_id=3438op=click ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] intel8x0 has stopped working.
Takashi Iwai wrote: At Thu, 05 Feb 2004 22:28:03 +, James Courtier-Dutton wrote: I checked out a new anonymouse cvs of alsa-driver/alsa-kernel, applied your patch, and attach the output from doing modprobe snd-intel8x0. I can only see printf's in the patch, so I don't see how it could have fixes the VRA. no, it doesn't fix yet. Feb 5 22:22:53 new kernel: determined VRA rates: 0xfe Feb 5 22:22:53 new kernel: determined VRA rates: 0xfe Feb 5 22:22:53 new kernel: determined SPDIF rates: 0xe0 Feb 5 22:22:53 new kernel: determined SDAC rates: 0x80 Feb 5 22:22:53 new kernel: determined LDAC rates: 0x80 here's the problem. surround and LFE DAC sample rates are not detected properly. i don't figure out yet why... does the attached patch have influence? check the messages above. (it doesn't contain the patch to ac97_pcm.c. it's not needed now.) Takashi I checked out a new cvs of alsa-driver, alsa-kernel Added your patch, and the rates are detected correctly now, and the rates change on the hardware correctly now. Thanks By looking at your code, it looks like you are making sure the rate for the Front, Surround and Center/LFE all change together, which seems to work, although, the alc650 datasheet spec does not seem to mention that this has to happen. Why have 3 ac97 registers, if they all have to change together? Anyway, thanks for the fix. Cheers James --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [PATCH] Fixes: Re: [Alsa-devel] intel8x0 has stopped working.
Jaroslav Kysela wrote: On Thu, 5 Feb 2004, Glenn Maynard wrote: On Thu, Feb 05, 2004 at 12:01:28PM +0100, Jaroslav Kysela wrote: My point is, I don't think setting start_threshold to buffer_size is even wrong at all. Some people might want the buffer to be full before it starts, and my patch allows for that. It's not wrong semantics. I see - it's logical, but I don't want to follow some rule as some API designers does - control magically some things. I want that developer which uses our API knows what the library / driver exactly does. We have clear conditions when the stream is started. That's it. If this isn't guaranteed to work, I'd suggest making it never work. It's guaranteed to work. Otherwise, programs will work on some hardware and not others, which is a case that should be minimized as much as possible; it's these kinds of subtle differences that make it very hard to write reliable (sound, video, etc) code. I've had to play games with setting hardware settings: always set the sample rate even if I don't care, use a 32k buffer size and not a 4k or 8k one--in order to make it work on as many systems as possible without failing mysteriously or triggering alsa-lib asserts. Send us bug-reports if you have problems. We have not a magic ball. (I don't quite understand why start_threashold == buffer_size doessn't mean start when the buffer is full, though.) Because we have the avail_min threshold which says that we don't want to write new data when buffer can accept less samples than this threshold. So if start_threshold is greather than '(buffer_size / avail_min) * avail_min' expression, then stream won't be automatically started, because we cannot fill data in read/write operations to satisfy the requirement that start_threshold == buffer_size. Isn't this clear and right? What you say is clear, but I don't think it is right. If I understand it, you don't want to write samples into the buffer if less that X samples are free in the buffer. We then have 2 possible situations: - 1) We wish to write more frames than X In this case, we know that we wish to write enough frames to fill the buffer, so theoretically, the buffer is full, and thus start_threshold has been reached even before the actual alsa-lib internal write operation has happened. So, we could call snd_pcm_start() at this point. 2) We wish to write less frames than X In this case, we know that if the write theoretically succeeded, we would not have a full buffer, so should not call snd_pcm_start(). But we are in catch22 here, because we cannot write any frames until we have X free frames in the buffer, but in SND_STATE_PREPARED (i.e. not RUNNING) the amount of free frames in the buffer will never change. Conclusion: - Due to the problem (2), we have to have start_threshold = (buffer_size - avail_min) if we wish snd_pcm_start() to be automatically called in both case (1) and case(2). If start_threshold buffer_size, snd_pcm_start will never be called, and that is correct because some applications might want to manually control snd_pcm_start(). So, we will need range checks in the snd_pcm_sw_params_set_start_threshold() call so that the application writer is informed at a early stage about wrong settings, rather than finding out that snd_pcm_writei() fails on some sound cards but not others! Summary: - By me trying to argue that you are wrong, I have proved you right! Of course, the endless loop is questionable in this case when the stream is not running and we should probably return from the write function. Jaroslav Cheers James --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] intel8x0 has stopped working.
Takashi Iwai wrote: At Wed, 04 Feb 2004 23:03:50 +, James Courtier-Dutton wrote: Takashi Iwai wrote: At Mon, 02 Feb 2004 19:42:37 +, James Courtier-Dutton wrote: Once thing I have noticed, is that with the alc650, we used to have VRA (alsa 0.9.8), but the 1.0.2 intel8x0 driver ignores the VRA and fixes itself at 48000. yes, the detection of sample rate range seems broken for some codecs. it was completely rewritten using the generic ac97_pcm.c. could you check the debug messages with the attached patch? Takashi Here is the output as requested. thanks, could you try the attached patch again and show the kernel messages? (this might fix the detection, too, BTW.) Takashi I checked out a new anonymouse cvs of alsa-driver/alsa-kernel, applied your patch, and attach the output from doing modprobe snd-intel8x0. I can only see printf's in the patch, so I don't see how it could have fixes the VRA. I can still only access device hw with rate of 48000. I hope this helps. Cheers James Feb 5 22:22:53 new kernel: PCI: Setting latency timer of device :00:1f.5 to 64 Feb 5 22:22:53 new kernel: determined VRA rates: 0xfe Feb 5 22:22:53 new kernel: determined VRA rates: 0xfe Feb 5 22:22:53 new kernel: determined SPDIF rates: 0xe0 Feb 5 22:22:53 new kernel: determined SDAC rates: 0x80 Feb 5 22:22:53 new kernel: determined LDAC rates: 0x80 Feb 5 22:22:53 new kernel: ALSA /usr/local/alsacvs/alsa-driver/alsa-kernel/pci/ac97/ac97_codec.c:2188: applying quirk type -430154656 failed (-22) Feb 5 22:22:53 new kernel: get_pslots: rev22 amap emu Feb 5 22:22:53 new kernel: get_pslots: AMAP: addr=0, scaps=0xd, ext_id=0x5c7 Feb 5 22:22:53 new kernel: checking codec 0, slots = 0x3d8 / 0x58 Feb 5 22:22:53 new kernel: - capture slots = 0x58 Feb 5 22:22:53 new kernel: probing pcm 0 Feb 5 22:22:53 new kernel: .. probing codec 0, slots = 0x3d8, tmp = 0x3d8 Feb 5 22:22:53 new kernel: .. exclusive tmp = 0x3d8 Feb 5 22:22:53 new kernel: . tmp = 0x3d8 Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=3, reg=0x2c, rates=0xfe Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=4, reg=0x2c, rates=0xfe Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=6, reg=0x30, rates=0x80 Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=7, reg=0x2e, rates=0x80 Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=8, reg=0x2e, rates=0x80 Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=9, reg=0x30, rates=0x80 Feb 5 22:22:53 new kernel: .. rslots = 0x3d8, rate_table = 0, rates = 0x80 Feb 5 22:22:53 new kernel: -- slots = 0x3d8, rates = 0x80 Feb 5 22:22:53 new kernel: probing pcm 1 Feb 5 22:22:53 new kernel: .. probing codec 0, slots = 0x18, tmp = 0x58 Feb 5 22:22:53 new kernel: .. exclusive tmp = 0x18 Feb 5 22:22:53 new kernel: . tmp = 0x18 Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=3, reg=0x32, rates=0xfe Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=4, reg=0x32, rates=0xfe Feb 5 22:22:53 new kernel: .. rslots = 0x18, rate_table = 0, rates = 0xfe Feb 5 22:22:53 new kernel: -- slots = 0x18, rates = 0xfe Feb 5 22:22:53 new kernel: probing pcm 2 Feb 5 22:22:53 new kernel: .. probing codec 0, slots = 0x40, tmp = 0x40 Feb 5 22:22:53 new kernel: .. exclusive tmp = 0x40 Feb 5 22:22:53 new kernel: . tmp = 0x40 Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=6, reg=0x34, rates=0x80 Feb 5 22:22:53 new kernel: .. rslots = 0x40, rate_table = 0, rates = 0x80 Feb 5 22:22:53 new kernel: -- slots = 0x40, rates = 0x80 Feb 5 22:22:53 new kernel: probing pcm 3 Feb 5 22:22:53 new kernel: .. probing codec 0, slots = 0xc00, tmp = 0xc00 Feb 5 22:22:53 new kernel: .. exclusive tmp = 0xc00 Feb 5 22:22:53 new kernel: . tmp = 0xc00 Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=10, reg=0x3a, rates=0xe0 Feb 5 22:22:53 new kernel: get_rates: cidx=0, slot=11, reg=0x3a, rates=0xe0 Feb 5 22:22:53 new kernel: .. rslots = 0xc00, rate_table = 0, rates = 0xe0 Feb 5 22:22:53 new kernel: -- slots = 0xc00, rates = 0xe0 Feb 5 22:22:53 new kernel: probing pcm 4 Feb 5 22:22:53 new kernel: .. probing codec 0, slots = 0x18, tmp = 0x0 Feb 5 22:22:53 new kernel: .. exclusive tmp = 0x0 Feb 5 22:22:53 new kernel: . tmp = 0x0 Feb 5 22:22:53 new kernel: -- slots = 0x0, rates = 0x Feb 5 22:22:53 new kernel: probing pcm 5 Feb 5 22:22:53 new kernel: .. probing codec 0, slots = 0x40, tmp = 0x0 Feb 5 22:22:53 new kernel: .. exclusive tmp = 0x0 Feb 5 22:22:53 new kernel: . tmp = 0x0 Feb 5 22:22:53 new kernel: -- slots = 0x0, rates = 0x Feb 5 22:22:53 new kernel: intel8x0: clocking to 48000
Re: [Alsa-devel] I have found a reason why dmix does not work well with xine.
Did you some tests with xine and 1.0.2 libraries? I tried to fix all problems related to xine there (including the last reported problem from you). The delay values might be affected by this issue: The dmix plugin can start in the middle of period of the master (hw:x device). In this case, the pointers of the master pcm are updated at different point - from the dmix look - than the exclusive device does. You can avoid this problem using the new slowptr option - in this case are pointers synced at each r/w/status operation, but it adds an extra overhead. Anyway, my tests shows that xine works well also without this option (and I used USB device for tests which does also additional buffering in the kernel driver so it more problematic than standard soundcards). Jaroslav I upgraded to latest alsa-lib cvs. Mixed results. :-( I have found a new problem. It seems to be fairly random as to which applications work, and which do not. After running xine in a working state for some time, I find that my delay-test program fails now, only outputting every other period to the speakers. (command used ./delay-test -c2 -Ddmix -r48000 t1) Even unloading all the snd-* modules does not help. I also see strange errors like: - bash-2.05b# ./delay-test -c2 -Dplug:dmix -r44100 t1 delay-test: pcm.c:2353: snd_pcm_areas_copy: Assertion `dst_areas' failed. Aborted It plays the first 8 periods, then stops with that error. I have 8 periods per buffer, as you can see below. Same happens with: - ./delay-test -c2 -Dplughw -r48000 t1 So, I think that bug is in the plug plugin, and not the dmix plugin. See below for my dmix entry I have put in /usr/share/alsa/alsa.conf pcm.dmix { @args [ SLAVE FORMAT RATE ] @args.SLAVE { type string default hw:0,0 } @args.FORMAT { type string default S16_LE } @args.RATE { type integer default 48000 } type dmix slowptr yes ipc_key 5678293 ipc_key_add_uid yes slave { pcm $SLAVE format $FORMAT rate $RATE period_time 0 period_size 315 buffer_size 2520 } } --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] intel8x0 has stopped working.
Takashi Iwai wrote: At Mon, 02 Feb 2004 19:42:37 +, James Courtier-Dutton wrote: Once thing I have noticed, is that with the alc650, we used to have VRA (alsa 0.9.8), but the 1.0.2 intel8x0 driver ignores the VRA and fixes itself at 48000. yes, the detection of sample rate range seems broken for some codecs. it was completely rewritten using the generic ac97_pcm.c. could you check the debug messages with the attached patch? Takashi Here is the output as requested. One thing that is good though, is this allowed me to do lots of testing for people that have codecs with fixed rates. If you do get my alc650 codec working again with variable rates, please make sure there is some sort of kernel option to fix it to a single rate, for test purposes. Feb 4 23:00:21 new kernel: PCI: Setting latency timer of device :00:1f.5 to 64 Feb 4 23:00:21 new kernel: get_pslots: rev22 amap emu Feb 4 23:00:21 new kernel: get_pslots: AMAP: addr=0, scaps=0xd, ext_id=0x5c7 Feb 4 23:00:21 new kernel: checking codec 0, slots = 0x3d8 / 0x58 Feb 4 23:00:21 new kernel: - capture slots = 0x58 Feb 4 23:00:21 new kernel: probing pcm 0 Feb 4 23:00:21 new kernel: .. probing codec 0, slots = 0x3d8, tmp = 0x3d8 Feb 4 23:00:21 new kernel: .. exclusive tmp = 0x3d8 Feb 4 23:00:21 new kernel: . tmp = 0x3d8 Feb 4 23:00:21 new kernel: .. rslots = 0x3d8, rate_table = 0, rates = 0x80 Feb 4 23:00:21 new kernel: -- slots = 0x3d8, rates = 0x80 Feb 4 23:00:21 new kernel: probing pcm 1 Feb 4 23:00:21 new kernel: .. probing codec 0, slots = 0x18, tmp = 0x58 Feb 4 23:00:21 new kernel: .. exclusive tmp = 0x18 Feb 4 23:00:21 new kernel: . tmp = 0x18 Feb 4 23:00:21 new kernel: .. rslots = 0x18, rate_table = 0, rates = 0xfe Feb 4 23:00:21 new kernel: -- slots = 0x18, rates = 0xfe Feb 4 23:00:21 new kernel: probing pcm 2 Feb 4 23:00:21 new kernel: .. probing codec 0, slots = 0x40, tmp = 0x40 Feb 4 23:00:21 new kernel: .. exclusive tmp = 0x40 Feb 4 23:00:21 new kernel: . tmp = 0x40 Feb 4 23:00:21 new kernel: .. rslots = 0x40, rate_table = 0, rates = 0x80 Feb 4 23:00:21 new kernel: -- slots = 0x40, rates = 0x80 Feb 4 23:00:21 new kernel: probing pcm 3 Feb 4 23:00:21 new kernel: .. probing codec 0, slots = 0xc00, tmp = 0xc00 Feb 4 23:00:21 new kernel: .. exclusive tmp = 0xc00 Feb 4 23:00:21 new kernel: . tmp = 0xc00 Feb 4 23:00:21 new kernel: .. rslots = 0xc00, rate_table = 0, rates = 0xe0 Feb 4 23:00:21 new kernel: -- slots = 0xc00, rates = 0xe0 Feb 4 23:00:21 new kernel: probing pcm 4 Feb 4 23:00:21 new kernel: .. probing codec 0, slots = 0x18, tmp = 0x0 Feb 4 23:00:21 new kernel: .. exclusive tmp = 0x0 Feb 4 23:00:21 new kernel: . tmp = 0x0 Feb 4 23:00:21 new kernel: -- slots = 0x0, rates = 0x Feb 4 23:00:21 new kernel: probing pcm 5 Feb 4 23:00:21 new kernel: .. probing codec 0, slots = 0x40, tmp = 0x0 Feb 4 23:00:21 new kernel: .. exclusive tmp = 0x0 Feb 4 23:00:21 new kernel: . tmp = 0x0 Feb 4 23:00:21 new kernel: -- slots = 0x0, rates = 0x Feb 4 23:00:21 new kernel: intel8x0: clocking to 48000 --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] I have found a reason why dmix does not work well with xine.
See attached file. It contains a test program, and a readme.txt with details on how to configure the dmix device in order to carry out the test. Basically, the value of snd_pcm_delay() returned when using the dmix device is wrong. See readme.txt in delay-test-0.0.1.tar.bz2 for details. Cheers James delay-test-0.0.1.tar.bz2 Description: Binary data
Re: [PATCH] Fixes: Re: [Alsa-devel] intel8x0 has stopped working.
Jaroslav Kysela wrote: On Mon, 2 Feb 2004, James Courtier-Dutton wrote: James Courtier-Dutton wrote: Once thing I have noticed, is that with the alc650, we used to have VRA (alsa 0.9.8), but the 1.0.2 intel8x0 driver ignores the VRA and fixes itself at 48000. So, before I never needed the sample rate converters, but as it now fixes the rate at 48000, I need the sample rate converters, and they don't actually work. I have found out what the problem is with the resamplers not working. I was using: - err = snd_pcm_sw_params_set_start_threshold(handle, swparams, buffer_size); - note buffer_size. So, the state will stay in SND_PCM_STATE_PREPARED state until the buffer is full. Inside snd_pcm_write_areas() [in alsa-lib] we have a snd_pcm_wait statement before we write frames into the buffer. if (((snd_pcm_uframes_t)avail pcm-avail_min size (snd_pcm_uframes_t)avail) || (size = pcm-xfer_align (snd_pcm_uframes_t)avail pcm-xfer_align)) { then it calls snd_pcm_wait() So, this will call snd_pcm_wait() until avail = pcm-avail_min. This will only become true if we are in SND_PCM_STATE_RUNNING state. below the snd_pcm_wait(), we do try to execute snd_pcm_start() to get us into SND_PCM_STATE_RUNNING, but this only gets executed if: - if (state == SND_PCM_STATE_PREPARED hw_avail = (snd_pcm_sframes_t) pcm-start_threshold) { So, we will only reach a running state if the buffer is FULL, but the buffer will NEVER become full, because of the previous snd_pcm_wait(); CATCH22!!! I think a fix to this would be to limit as follows: - start_threshold = (buffer_size - avail_min) I have fixed the issue for now, just by setting the start_threshold to something other than buffer_size. But I think some work needs to be done with alsa-lib to prevent this deadlock situation ever happening in alsa-lib. From the application writers point of view, if the buffer is X bytes long, and one used snd_pcm_writei() to write X+10 bytes, the buffer should become full. Currently, that is not always the case, and alsa-lib instead locks in snd_pcm_wait(). I attach a patch that fixes alsa-lib. All it does it call snd_pcm_start() just before snd_pcm_wait() and due to the if statement just above it, will only happen when the buffer is going to be filled, therefore ensuring that even if start_threshold is set too high, snd_pcm_start() will always be called if the buffer is full, or about to become full. I don't think that this is a right fix. The programmer must know what is doing and the manual start is still alternative. You must set start_threshold to (buffer_size / period_size) * period_size in your case. Jaroslav A don't think this is an application programmer bug. After all your program alsa-lib/test/pcm.c had it set to start_threshold==buffer_size, and you are one of the main alsa developers. So if you thought that was an OK thing to set, why won't other people? My point is, I don't think setting start_threshold to buffer_size is even wrong at all. Some people might want the buffer to be full before it starts, and my patch allows for that. I don't think my patch breaks anything. Maybe you should look deeper, and work out exactly which situation it will happen in. My patch only executes snd_pcm_start() if the previous snd_pcm_writei() would in fact fill the buffer. You have a snd_pcm_start() later on that executes if one passes the start_threshold. The only situation it would break is if the application wants to fill the buffer and for some reason not start playing. If you conceptually want to allow for that, then I will accept that my patch breaks that behaviour. Cheers James --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[Alsa-devel] intel8x0 has stopped working.
In alsa 0.9.8, the snd-intel8x0 worked find with my MB. An ICH5 with ALC650. With alsa 1.0.2, I get: - device: front - no-sound output device: surround40: - Only sound on rear left, and rear right. device: surround51: - Only sound on rear left, and rear right, center, lfe So, in all cases there is never sound on the front speakers. The same problem has happened to a person with an ICH2, which only has front speakers, so they get no sound at all. I am investigating, and I suspect that the mixer has just lost the mixer/mute for the front speakers. Is there a tool where I can adjust ac97 registers directly through a IOCTL or something, for test purposes? Cheers James --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
Re: [Alsa-devel] intel8x0 has stopped working.
Takashi Iwai wrote: At Mon, 02 Feb 2004 17:41:02 +, James Courtier-Dutton wrote: In alsa 0.9.8, the snd-intel8x0 worked find with my MB. An ICH5 with ALC650. With alsa 1.0.2, I get: - device: front - no-sound output device: surround40: - Only sound on rear left, and rear right. device: surround51: - Only sound on rear left, and rear right, center, lfe So, in all cases there is never sound on the front speakers. The same problem has happened to a person with an ICH2, which only has front speakers, so they get no sound at all. I am investigating, and I suspect that the mixer has just lost the mixer/mute for the front speakers. hmm, it looks like a generic problem of intel8x0 with ALC65x. in the recent version, the detection and implementation of PCM streams have been changed, and i guess it's broken for these codecs. Is there a tool where I can adjust ac97 registers directly through a IOCTL or something, for test purposes? % cat /proc/asound/card0/codec97#0/ac97#0-0+regs we'll need to trace the behavior in snd_ac97_pcm_*() functions... Takashi Ok, the front channel is now working, but I don't know why. One thing that is definitely broken is sample rate conversion. E.g. Open card at rate 44100, device=hw:0, fails saying rate 44100 not supported. Open card at rate 48000, device=hw:0 works. Now, open card at rate 44100, device plughw:0 succeeds, but then the snd_pcm_writei() calls just hangs at poll() #0 0x401a5ab8 in *__GI___poll (fds=0x402049a8, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:82 #1 0x4006abd4 in snd_pcm_wait (pcm=0x8054630, timeout=-4) at pcm.c:2044 #2 0x400706f8 in snd_pcm_write_areas (pcm=0x8054630, areas=0xbfffe9d4, offset=0, size=71, func=0x4007a480 snd_pcm_plugin_write_areas) at pcm.c:6041 #3 0x4007a88d in snd_pcm_plugin_writei (pcm=0x8054630, buffer=0xfffc, size=4294967292) at pcm_plugin.c:436 #4 0x40068dd7 in snd_pcm_writei (pcm=0x7fff, buffer=0x8054810, size=1) at pcm_local.h:368 #5 0x080495e0 in write_loop (handle=0x80544b8, channel=0, periods=3105, samples=0x8054810) at speaker-test.c:289 #6 0x08049b73 in main (argc=4, argv=0xbfffee54) at speaker-test.c:445 Once thing I have noticed, is that with the alc650, we used to have VRA (alsa 0.9.8), but the 1.0.2 intel8x0 driver ignores the VRA and fixes itself at 48000. So, before I never needed the sample rate converters, but as it now fixes the rate at 48000, I need the sample rate converters, and they don't actually work. --- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn ___ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel
[PATCH] Fixes: Re: [Alsa-devel] intel8x0 has stopped working.
James Courtier-Dutton wrote: Once thing I have noticed, is that with the alc650, we used to have VRA (alsa 0.9.8), but the 1.0.2 intel8x0 driver ignores the VRA and fixes itself at 48000. So, before I never needed the sample rate converters, but as it now fixes the rate at 48000, I need the sample rate converters, and they don't actually work. I have found out what the problem is with the resamplers not working. I was using: - err = snd_pcm_sw_params_set_start_threshold(handle, swparams, buffer_size); - note buffer_size. So, the state will stay in SND_PCM_STATE_PREPARED state until the buffer is full. Inside snd_pcm_write_areas() [in alsa-lib] we have a snd_pcm_wait statement before we write frames into the buffer. if (((snd_pcm_uframes_t)avail pcm-avail_min size (snd_pcm_uframes_t)avail) || (size = pcm-xfer_align (snd_pcm_uframes_t)avail pcm-xfer_align)) { then it calls snd_pcm_wait() So, this will call snd_pcm_wait() until avail = pcm-avail_min. This will only become true if we are in SND_PCM_STATE_RUNNING state. below the snd_pcm_wait(), we do try to execute snd_pcm_start() to get us into SND_PCM_STATE_RUNNING, but this only gets executed if: - if (state == SND_PCM_STATE_PREPARED hw_avail = (snd_pcm_sframes_t) pcm-start_threshold) { So, we will only reach a running state if the buffer is FULL, but the buffer will NEVER become full, because of the previous snd_pcm_wait(); CATCH22!!! I think a fix to this would be to limit as follows: - start_threshold = (buffer_size - avail_min) I have fixed the issue for now, just by setting the start_threshold to something other than buffer_size. But I think some work needs to be done with alsa-lib to prevent this deadlock situation ever happening in alsa-lib. From the application writers point of view, if the buffer is X bytes long, and one used snd_pcm_writei() to write X+10 bytes, the buffer should become full. Currently, that is not always the case, and alsa-lib instead locks in snd_pcm_wait(). I attach a patch that fixes alsa-lib. All it does it call snd_pcm_start() just before snd_pcm_wait() and due to the if statement just above it, will only happen when the buffer is going to be filled, therefore ensuring that even if start_threshold is set too high, snd_pcm_start() will always be called if the buffer is full, or about to become full. Cheers James --- src/pcm/pcm.c.old 2004-02-02 23:07:14.355587424 + +++ src/pcm/pcm.c 2004-02-02 23:07:19.871748840 + @@ -6033,6 +6033,11 @@ } else if (((snd_pcm_uframes_t)avail pcm-avail_min size (snd_pcm_uframes_t)avail) || (size = pcm-xfer_align (snd_pcm_uframes_t)avail pcm-xfer_align)) { + if (state == SND_PCM_STATE_PREPARED ) { +err = snd_pcm_start(pcm); +if (err 0) + goto _end; +} if (pcm-mode SND_PCM_NONBLOCK) { err = -EAGAIN; goto _end;