[Alsa-devel] Re: [alsa-dev]Question regarding period/buffer and error handling

2004-05-28 Thread Måns Rullgård
Cournapeau David [EMAIL PROTECTED] writes:

 Hi there,

 For my research, I need to use audio with matlab under linux, and
 sound support of matlab is kind of... well, crappy (basically, it
 is opening the /dev/audio file and write to it; on my computer, it
 doesn't seem to work). That's why I am thinking about using a
 wrapper to alsa.

If you are playing fairly short pieces of sound you might be able to
use this function I wrote some time ago:

function playsnd(y,fs,bits)

wf = tempname;
ws = warning;
warning off
wavwrite(y, fs, bits, wf);
warning ws
wf = [wf '.wav'];
[s,o] = unix(sprintf('aplay %s', wf));
delete(wf);


-- 
Måns Rullgård
[EMAIL PROTECTED]



---
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 regarding period/buffer and error handling

2004-05-28 Thread Cournapeau David
Måns Rullgård wrote:
If you are playing fairly short pieces of sound you might be able to
use this function I wrote some time ago:
function playsnd(y,fs,bits)
wf = tempname;
ws = warning;
warning off
wavwrite(y, fs, bits, wf);
warning ws
wf = [wf '.wav'];
[s,o] = unix(sprintf('aplay %s', wf));
delete(wf);
 

Well, I precisely want to avoid writing to a temporary file :)
But right now, my function seems to work, I just used UNIX signals to 
close cleanly the audio device, it was much simpler than what I thought 
at first.

Cheers,
David
---
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_id149alloc_id66op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] Re: Question regarding period/buffer and error handling

2004-05-28 Thread Måns Rullgård
Cournapeau David [EMAIL PROTECTED] writes:

 Måns Rullgård wrote:


If you are playing fairly short pieces of sound you might be able to
use this function I wrote some time ago:

function playsnd(y,fs,bits)

wf = tempname;
ws = warning;
warning off
wavwrite(y, fs, bits, wf);
warning ws
wf = [wf '.wav'];
[s,o] = unix(sprintf('aplay %s', wf));
delete(wf);

 Well, I precisely want to avoid writing to a temporary file :)

If the files are small they will probably never hit the physical
disk.  Of course, your sounds might be longer than that.

-- 
Måns Rullgård
[EMAIL PROTECTED]



---
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-lib spamming terminal

2004-05-28 Thread Måns Rullgård
Is there a way to make alsa-lib stop spamming the terminal with error
messages, for instance when a non-blocking open fails?

-- 
Måns Rullgård
[EMAIL PROTECTED]


---
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_id149alloc_id66op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] RME 9632 Mixer...

2004-05-28 Thread Takashi Iwai
At Thu, 27 May 2004 16:54:38 +0200 (CEST),
Thomas Charbonnel wrote:
 
  Thanks Thomas, I really appreciate the work you have done making this
  all work.  I will try and add some notes on the alsa site for the RME
  9632 on the mixer settings
 
  Ed W
 
 
 You're welcome. It would be indeed nice to add some 9632 specific notes on
 the alsa site, thanks.

More nice would be to have a document the ALSA source treed :)
Any volunteer?


--
Takashi Iwai [EMAIL PROTECTED]ALSA Developer - www.alsa-project.org


---
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] Re: 2.6.7-rc1 breaks ATI IXP sound...

2004-05-28 Thread Takashi Iwai
Hi,

At Thu, 27 May 2004 22:43:06 -0400,
Trond Myklebust wrote:
 
 It appears to boil down to changeset
 [EMAIL PROTECTED]|ChangeSet|20040517133203|52763.
 
 More specifically to the line which adds the AC97_SCAP_SKIP_MODEM flag
 to the mixer probe. That flag causes the mixer probe to exit with an
 EACCES, when it hits the modem:
 
 ATI IXP Debug mixer probe 6, i = 0 codec_not_ready_bits =
 0x3000, err = 0
 ATI IXP Debug mixer probe 5, i = 1 codec_not_ready_bits =
 0x3000, err = -13
 ATI IXP AC97 controller: probe of :00:14.5 failed with error
 -13
 
 If I remove that line, the ATI IXP is detected correctly, and everything
 appears to work properly.

No it's a wrong fix, since this will conflict with the ATIIXP modem
driver (it's experimental and not included in the patchset though).

This problem was already fixed on the ALSA tree.  The error is just
ignored to continue probing.

Jaroslav, could you sync the sound bk tree?


--
Takashi Iwai [EMAIL PROTECTED]ALSA Developer - www.alsa-project.org

 
 Cheers,
   Trond
 [2 Vidaresendt melding - 2.6.7-rc1 breaks ATI IXP sound... message/rfc822 (7bit)]
 To: [EMAIL PROTECTED]
 Cc: Andrew Morton [EMAIL PROTECTED]
 Subject: 2.6.7-rc1 breaks ATI IXP sound...
 From: Trond Myklebust [EMAIL PROTECTED]
 Message-Id: [EMAIL PROTECTED]
 Mime-Version: 1.0
 Date: Wed, 26 May 2004 16:32:20 -0400
 Content-Transfer-Encoding: 7bit
 
 From: dmesg -s
 
 ATI IXP AC97 controller: probe of :00:14.5 failed with error -13
 
 The same device works fine when reverting to 2.6.6..
 
 Cheers,
   Trond
 [3 gnarg.dif text/plain; ISO-8859-1 (base64)]
 --- linux-2.6.7-rc1/sound/pci/atiixp.c.orig   2004-05-27 13:53:31.0 -0400
 +++ linux-2.6.7-rc1/sound/pci/atiixp.c2004-05-27 22:33:23.0 -0400
 @@ -1385,7 +1385,6 @@ static int __devinit snd_atiixp_mixer_ne
   ac97.private_data = chip;
   ac97.pci = chip-pci;
   ac97.num = i;
 - ac97.scaps = AC97_SCAP_SKIP_MODEM;
   if ((err = snd_ac97_mixer(pbus, ac97, chip-ac97[i]))  0) {
   if (chip-codec_not_ready_bits)
   /* codec(s) was detected but not available.


---
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.

2004-05-28 Thread James Courtier-Dutton
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


Re: [Alsa-devel] [PATCH] Audigy LS support.

2004-05-28 Thread Takashi Iwai
At Fri, 28 May 2004 12:16:09 +0100,
James Courtier-Dutton wrote:
 
 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.

well, then the question is how the period size is controlled.
you have never set the period size/bytes on the hardware.


  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.

ok.  but it's also true that changing one of them can help to reveal
features of these chips.  anyway, keep tracking of cvs changes...


Takashi


 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] alsa 1.0.5rc1: envy24control not compileable

2004-05-28 Thread Mario Loritz
Hello list,

It seems that in the package alsa-tools-1.0.5rc1 a file is missing.
envy24control can't be compiled. Output:
...
In file included from envy24control.c:23:
envy24control.h:27:22: profiles.h: Datei oder Verzeichnis nicht gefunden
envy24control.c: In function `index_active_profile':
envy24control.c:1686: error: `NOTFOUND' undeclared (first use in this 
function)
envy24control.c:1686: error: (Each undeclared identifier is reported only once
envy24control.c:1686: error: for each function it appears in.)
envy24control.c: In function `delete_card_number':
envy24control.c:1713: Warnung: passing arg 2 of `gtk_entry_set_text' makes 
pointer from integer without a cast
envy24control.c: In function `restore_active_profile':
envy24control.c:1726: error: `ALSACTL_OP_RESTORE' undeclared (first use in 
this function)
envy24control.c: In function `save_active_profile':
envy24control.c:1739: error: `ALSACTL_OP_STORE' undeclared (first use in this 
function)
envy24control.c: In function `entry_toggle_editable':
envy24control.c:1768: error: `NOTFOUND' undeclared (first use in this 
function)
envy24control.c: In function `create_profiles':
envy24control.c:1853: Warnung: assignment makes pointer from integer without a 
cast
make: *** [envy24control.o] Fehler 1

(first line envy24control.h:27:22: profiles.h: Datei oder Verzeichnis nicht 
gefunden 
means: file not found)

other than that, compilation for ice1712 and intel8x0 went fine.

keep up the good work!

Mario Loritz



---
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] alsa-lib spamming terminal

2004-05-28 Thread Clemens Ladisch
Måns Rullgård wrote:
 Is there a way to make alsa-lib stop spamming the terminal with error
 messages, for instance when a non-blocking open fails?

snd_lib_error_set_handler()


HTH
Clemens





---
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_id149alloc_id66op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] MAYA44 USB audio device doesn't work with 1.0.4.

2004-05-28 Thread Clemens Ladisch
Luke Yelavich wrote:
 usbcore: registered new driver snd-usb-audio

No other message?  There should be at least an error message when the
driver fails to initialize.  Please try to compile the kernel with
ALSA's Debug detection enabled, or --with-debug=detect when
configuring the package.


Regards,
Clemens




---
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 regarding period/buffer and error handling

2004-05-28 Thread Clemens Ladisch
Cournapeau David wrote:
 My second problem is related to snd_card_next: If the card value
 returned by snd_card_next is different from -1, does that always mean
 than a alsa audio device is present on the system ?

It means that same kind of device with an ALSA driver is present.
This does not mean that you'll be able to play PCM data to it.  And
there may be software devices available.

 Is it the best method to probe a soundcard with alsa support?

snd_card_next() and snd_ctl_pcm_next_device() will give you a list of
hardware devices only.

Usually, you should use the device named default and let the user
allow to specify another device name.


HTH
Clemens




---
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] Re: alsa-lib spamming terminal

2004-05-28 Thread Måns Rullgård
Clemens Ladisch [EMAIL PROTECTED] writes:

 Måns Rullgård wrote:
 Is there a way to make alsa-lib stop spamming the terminal with error
 messages, for instance when a non-blocking open fails?

 snd_lib_error_set_handler()

Thanks.  I wonder why I didn't find that when reading the docs.

-- 
Måns Rullgård
[EMAIL PROTECTED]



---
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

2004-05-28 Thread James Courtier-Dutton
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


Re: [Alsa-devel] MAYA44 USB audio device doesn't work with 1.0.4.

2004-05-28 Thread Luke Yelavich
At 01:43 AM 29/05/2004, Clemens Ladisch wrote:
No other message?  There should be at least an error message when the
driver fails to initialize.  Please try to compile the kernel with
ALSA's Debug detection enabled, or --with-debug=detect when
configuring the package.
Ok, here dmesg, with debug=detect.
usbcore: registered new driver usbfs
usbcore: registered new driver hub
USB Universal Host Controller Interface driver v2.2
uhci_hcd :00:1d.0: Intel Corp. 82801DB USB (Hub #1)
PCI: Setting latency timer of device :00:1d.0 to 64
uhci_hcd :00:1d.0: irq 16, io base d800
uhci_hcd :00:1d.0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
uhci_hcd :00:1d.1: Intel Corp. 82801DB USB (Hub #2)
PCI: Setting latency timer of device :00:1d.1 to 64
uhci_hcd :00:1d.1: irq 19, io base d400
uhci_hcd :00:1d.1: new USB bus registered, assigned bus number 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
uhci_hcd :00:1d.2: Intel Corp. 82801DB USB (Hub #3)
PCI: Setting latency timer of device :00:1d.2 to 64
uhci_hcd :00:1d.2: irq 18, io base d000
uhci_hcd :00:1d.2: new USB bus registered, assigned bus number 3
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
usb 1-2: new full speed USB device using address 2
ALSA /mnt/software/linux/alsa/alsa-driver-1.0.5rc1/usb/usbaudio.c:2569: 
2:1:1: add audio endpoint 0x1
ALSA /mnt/software/linux/alsa/alsa-driver-1.0.5rc1/usb/usbaudio.c:2569: 
2:2:1: add audio endpoint 0x82
ALSA 
/mnt/software/linux/alsa/alsa-driver-1.0.5rc1/alsa-kernel/usb/usbmixer.c:866: 
[4] FU [Speaker Playback Switch] ch = 1, val = 0/1/1
ALSA 
/mnt/software/linux/alsa/alsa-driver-1.0.5rc1/alsa-kernel/usb/usbmixer.c:866: 
[4] FU [Speaker Playback Volume] ch = 2, val = 0/255/1
ALSA 
/mnt/software/linux/alsa/alsa-driver-1.0.5rc1/alsa-kernel/usb/usbmixer.c:866: 
[2] FU [Speaker Playback Switch] ch = 1, val = 0/1/1
ALSA 
/mnt/software/linux/alsa/alsa-driver-1.0.5rc1/alsa-kernel/usb/usbmixer.c:866: 
[2] FU [Speaker Playback Volume] ch = 2, val = 0/255/1
ALSA 
/mnt/software/linux/alsa/alsa-driver-1.0.5rc1/alsa-kernel/usb/usbmixer.c:866: 
[7] FU [Speaker Playback Switch] ch = 1, val = 0/1/1
ALSA 
/mnt/software/linux/alsa/alsa-driver-1.0.5rc1/alsa-kernel/usb/usbmixer.c:866: 
[7] FU [Speaker Playback Volume] ch = 2, val = 0/255/1
snd-usb-audio: probe of 1-2:1.0 failed with error -5
usbcore: registered new driver snd-usb-audio
--
Luke Yelavich
http://www.audioslack.com
[EMAIL PROTECTED]


---
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