Re: [Alsa-devel] emu10k1x patch

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 01:00:58 GMT,
[EMAIL PROTECTED] wrote:
> 
> 188,189c188,189
> <   .period_bytes_min = 64,
> <   .period_bytes_max = (32*1024),
> ---
> >   .period_bytes_min = (16*1024),
> >   .period_bytes_max = (16*1024),

are you sure this change is correct?
in the current code, the period size is always bound to
(buffer_size / 2)  (because periods_min = periods_max = 2).
so you don't have to limit period_bytes or period_size.

> 732,733c732,733
> <   //  snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP<<1);
> <   //  snd_emu10k1x_intr_enable(chip, INTE_CH_0_LOOP<<2);
> ---
> >   snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)<<1);>
> >snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)<<2);

hmm, it looks redundant.
the second line will override the setting of the first line.
i guess you wanted like the following?

snd_emu10k1x_intr_enable(chip,
(INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)<<1 |
(INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)<<2);

Takashi


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


Re: [Alsa-devel] ATI IXP SPDIF

2004-05-25 Thread Takashi Iwai
At Mon, 24 May 2004 16:16:42 -0700,
Alex Song wrote:
> 
> hi,
> 
> i am trying to get SPDIF output working on ATI IXP/Realtek ALC655 and i am
> using atiixp.c from cvs (version 1.9) and linux kernel 2.6.5. i tried
> playing back wav files through aplay and ac3 files with ac3play and i
> couldn't get any output from either SPDIF over AC97 or SPDIF Direct. analog
> output is fine. from the cvs logs i gather that SPDIF on ATI IXP should work
> for some cases at least, has anyone got it to work? if so with what
> files/hardware/settings etc?

it works fine on my test machine.  it's an ASUS mobo (forgot the
model).

% ac3dec -C some-48k.ac3

or

% aplay -Dplug:spdif foo.wav

but the direct SPDIF mode doesn't work...

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


[Alsa-devel] pcm buffer size

2004-05-25 Thread Nicolas Hüppelshäuser

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
--
nicolas hueppelshaeuser, emlix gmbh, http://www.emlix.com,
mailto:[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=3149&alloc_id=8166&op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] pcm buffer size

2004-05-25 Thread James Courtier-Dutton
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=3149&alloc_id=8166&op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] PCM Params

2004-05-25 Thread Brian Furey
Hi ,
i'm trying to change the fragment size that the alsa
driver is capturing/playing out. It's currently set at
32 msecs(256 bytes).
They are set in the runtime structure...
   runtime->period_max ...etc
Could anybody tell me which file these parameters are
set in the alsa-driver directory?
Thanks,
Brian.






Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html


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


Re: [Alsa-devel] PCM Params

2004-05-25 Thread Paul Davis
>Hi ,
>i'm trying to change the fragment size that the alsa
>driver is capturing/playing out. It's currently set at
>32 msecs(256 bytes).
>They are set in the runtime structure...
>   runtime->period_max ...etc
>Could anybody tell me which file these parameters are
>set in the alsa-driver directory?

you should be using snd_pcm_hw_params_set_period_size()




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


Re: [Alsa-devel] pcm buffer size

2004-05-25 Thread Clemens Ladisch
Nicolas Hüppelshäuser wrote:
> I'm using alsa 1.0.4.  How can I get a larger alsa buffer size?

PCM devices have a default maximum buffer size and a maximum maxmimum
buffer size.  For example, in the snd-usb-audio driver, it's 64 KB and
128 KB.

The current value (in KB) can be seen in the file
/proc/asound/cardX/pcmXY/subX/prealloc.  You can change it with

  echo 128 > /proc/asound/card0/pcm0p/sub0/prealloc


In most cases, the maxmimum buffer size is constrained by hardware
limitations, but in the case of snd-usb-audio, it should be safe to
raise this value (look for the call to snd_pcm_lib_preallocate_pages()
in usbaudio.c).


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


Re: [Alsa-devel] emu10k1x patch

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 11:52:19 GMT,
[EMAIL PROTECTED] wrote:
> 
> 
> > 
> > 188,189c188,189
> > <   .period_bytes_min = 64,
> > <   .period_bytes_max = (32*1024),
> > ---
> > >   .period_bytes_min = (16*1024),
> > >   .period_bytes_max = (16*1024),
> 
> > are you sure this change is correct?
> > in the current code, the period size is always bound to
> > (buffer_size / 2)  (because periods_min = periods_max = 2).
> > so you don't have to limit period_bytes or period_size.
> 
> To me, the result was the same,

well, it should be same casually in your setting...

>  but I thought it would be cleaner
> this way, but I don't care. It seems to work both ways. 

ok.

> 
> > 732,733c732,733
> > <   //  snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP<<1);
> > <   //  snd_emu10k1x_intr_enable(chip, INTE_CH_0_LOOP<<2);
> > ---
> > >   snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)<<1);
> > >   snd_emu10k1x_intr_enable(chip, (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)<<2);
> 
> > hmm, it looks redundant.
> > the second line will override the setting of the first line.
> > i guess you wanted like the following?
> 
> > snd_emu10k1x_intr_enable(chip,
> > (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)<<1 |
> > (INTE_CH_0_LOOP|INTE_CH_0_HALF_LOOP)<<2);
> 
> Both will actually do the samething, because
> snd_emu10k1x_intr_enable will read the current register value and OR
> the requested interrupts to it (same thing is done in the emu10k1
> code, so I just tried to keep it consistent). 

yes, you're right.  i've overseen it.
still it would be better to call once with all or'ed bits.
i'll change the code on CVS, which will go into 1.0.5-rc2.


BTW, at the next time, please post the patch with unified diff style
(diff -u)?


thanks,

Takashi


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


Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Clemens Ladisch
> Please, report (especially compilation) problems.

depmod: *** Unresolved symbols in
/lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
depmod: errno

The open/close/read system calls are implemented as inline functions
which change errno which isn't exported from the kernel.

We could reintroduce the dummy definition of errno for older kernels,
or use filp_* calls (like sound_firmware.c).


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


Re: [Alsa-devel] PCM Params

2004-05-25 Thread Brian Furey
 --- Paul Davis <[EMAIL PROTECTED]> wrote: >
>Hi ,
> >i'm trying to change the fragment size that the
> alsa
> >driver is capturing/playing out. It's currently set
> at
> >32 msecs(256 bytes).
> >They are set in the runtime structure...
> >   runtime->period_max ...etc
> >Could anybody tell me which file these parameters
> are
> >set in the alsa-driver directory?
> 
> you should be using
> snd_pcm_hw_params_set_period_size()


Does this mean that i can change the period size
without recompiling the driver?
Im am not developing an ALSA application myself, just
trying to change the pcm parameters.
snd_pcm_hw_params_set_period_size()...looks like a
function call included in a user written ALSA
application??
Excuse me if this is a stupid questions but,How do I
use this function call in my case to change the driver
period??
Brian.


> 
>  






Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html


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


Re: [Alsa-devel] MPG123 and alsa

2004-05-25 Thread Clemens Ladisch
Tom Watson wrote:
> I just downloaded a version (most recent I assume) of MPG123.
> When I tried to do a 'make linux-alsa' I got a wholw bunch of
> errors.  While I suspect that this is because they are using an
> older oversion of alsa (0.5.x?).

Yes.

> and has anyone else done any mods to the mpg123 (or its library).

Try the patch below.


HTH
Clemens

-- 
diff -ur mpg123-pre0.59s-orig/audio.c mpg123-pre0.59s/audio.c
--- mpg123-pre0.59s-orig/audio.cThu Jan 18 15:00:33 2001
+++ mpg123-pre0.59s/audio.c Sat May 22 16:52:21 2004
@@ -17,9 +17,6 @@
   ai->output = -1;
 #ifdef ALSA
   ai->handle = NULL;
-  ai->alsa_format.format = -1;
-  ai->alsa_format.rate = -1;
-  ai->alsa_format.channels = -1;
 #endif
   ai->device = NULL;
   ai->channels = -1;
diff -ur mpg123-pre0.59s-orig/audio.h mpg123-pre0.59s/audio.h
--- mpg123-pre0.59s-orig/audio.hThu Jan 18 15:00:33 2001
+++ mpg123-pre0.59s/audio.h Sat May 22 16:55:10 2004
@@ -42,7 +42,9 @@


 #ifdef ALSA
-#include 
+#define ALSA_PCM_NEW_HW_PARAMS_API
+#define ALSA_PCM_NEW_SW_PARAMS_API
+#include 
 #endif

 struct audio_info_struct
@@ -59,7 +61,6 @@
   int output;
 #ifdef ALSA
   snd_pcm_t *handle;
-  snd_pcm_format_t alsa_format;
 #endif
 #ifdef AIX_UMS
   UMSAudioDevice dev;
diff -ur mpg123-pre0.59s-orig/audio_alsa.c mpg123-pre0.59s/audio_alsa.c
--- mpg123-pre0.59s-orig/audio_alsa.c   Mon Sep 20 16:55:02 1999
+++ mpg123-pre0.59s/audio_alsa.cSat May 22 21:20:31 2004
@@ -1,189 +1,168 @@
 /*
- *  Driver for Advanced Linux Sound Architecture, http://alsa.jcu.cz
+ *  Driver for Advanced Linux Sound Architecture, http://www.alsa-project.org
  *
  *  Code by Anders Semb Hermansen <[EMAIL PROTECTED]>
- *  Cleanups by Jaroslav Kysela <[EMAIL PROTECTED]>
+ *  Cleanups by Jaroslav Kysela <[EMAIL PROTECTED]>
  *  Ville Syrjala <[EMAIL PROTECTED]>
+ *  Modified for ALSA 1.0.x by Clemens Ladisch <[EMAIL PROTECTED]>
  *
- *  You can use -a :...
- *  For example: mpg123 -a 1:0 aaa.mpg
- *   mpg123 -a guspnp:1 aaa.mpg
+ *  You can use -a devicename ...
+ *  For example: mpg123 -a hw:1,0 aaa.mpg
+ *   mpg123 -a guspnp aaa.mpg
  *
  * This file comes under GPL license.
  */

 #include "mpg123.h"

-#include 
-#include 
-#include 
-
-#ifdef SND_LITTLE_ENDIAN
-#define SND_PCM_SFMT_S16_NE SND_PCM_SFMT_S16_LE
-#define SND_PCM_SFMT_U16_NE SND_PCM_SFMT_U16_LE
-#define SND_PCM_FMT_S16_NE SND_PCM_FMT_S16_LE
-#define SND_PCM_FMT_U16_NE SND_PCM_FMT_U16_LE
-#else
-#define SND_PCM_SFMT_S16_NE SND_PCM_SFMT_S16_BE
-#define SND_PCM_SFMT_U16_NE SND_PCM_SFMT_U16_BE
-#define SND_PCM_FMT_S16_NE SND_PCM_FMT_S16_BE
-#define SND_PCM_FMT_U16_NE SND_PCM_FMT_U16_BE
-#endif
-
 int audio_open(struct audio_info_struct *ai)
 {
int err;
-   int card=0,device=0;
-   char scard[128], sdevice[128];
+   const char *pcm_name;

if(!ai)
return -1;
-   if(ai->device) {/* parse ALSA device name */
-   if(strchr(ai->device,':')) {/* card with device */
-   strncpy(scard, ai->device, sizeof(scard)-1);
-   scard[sizeof(scard)-1] = '\0';
-   if (strchr(scard,':')) *strchr(scard,':') = '\0';
-   card = snd_card_name(scard);
-   if (card < 0) {
-   fprintf(stderr, "wrong soundcard number: %s\n", scard);
-   exit(1);
-   }
-   strncpy(sdevice, strchr(ai->device, ':') + 1, 
sizeof(sdevice)-1);
-   } else {
-   strncpy(sdevice, ai->device, sizeof(sdevice)-1);
-   }
-   sdevice[sizeof(sdevice)-1] = '\0';
-   device = atoi(sdevice);
-   if (!isdigit(sdevice[0]) || device < 0 || device > 31) {
-   fprintf(stderr, "wrong device number: %s\n", sdevice);
-   exit(1);
-   }
-   }
-
-   if((err=snd_pcm_open(&ai->handle, card, device, SND_PCM_OPEN_PLAYBACK)) < 0 )
-   {
-   fprintf(stderr, "open failed: %s\n", snd_strerror(err));
-   exit(1);
-   }

-   if(audio_reset_parameters(ai) < 0)
+   pcm_name = ai->device ? ai->device : "default";
+   if((err=snd_pcm_open(&ai->handle, pcm_name, SND_PCM_STREAM_PLAYBACK, 0)) < 0)
{
-   audio_close(ai);
+   fprintf(stderr, "cannot open %s: %s\n", pcm_name, snd_strerror(err));
return -1;
}

-   return 0;
+   if(ai->format != -1)
+   /* we're going to play: initialize sample format */
+   return audio_reset_parameters(ai);
+   else
+   /* query mode; sample format will be set for each query */
+   return 0;
 }

-static void audio_set_playback_params(struct audio_info_struct *ai)
+int audio_reset_parameters(struct audio_info_struct *ai)
 {
int err;
-   snd_pcm_playbac

Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 14:26:33 +0200 (METDST),
Clemens Ladisch wrote:
> 
> > Please, report (especially compilation) problems.
> 
> depmod: *** Unresolved symbols in
> /lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
> depmod: errno
> 
> The open/close/read system calls are implemented as inline functions
> which change errno which isn't exported from the kernel.
> 
> We could reintroduce the dummy definition of errno for older kernels,
> or use filp_* calls (like sound_firmware.c).

i guess sys_* functions are also not defined correctly on older
kernels.  they were open(), close(), read() with __KERNEL_SYSCALLS__.

how about to make a patch for old kernels to add the following?
(about line 1920 of wavefront_synth.c:)

#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
#define __KERNEL_SYSCALLS__
#include 
static int errno;
#define sys_open open
#define sys_close close
#define sys_read read
#else
#include 
#endif


Takashi


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


Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 14:41:31 +0200,
I wrote:
> 
> At Tue, 25 May 2004 14:26:33 +0200 (METDST),
> Clemens Ladisch wrote:
> > 
> > > Please, report (especially compilation) problems.
> > 
> > depmod: *** Unresolved symbols in
> > /lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
> > depmod: errno
> > 
> > The open/close/read system calls are implemented as inline functions
> > which change errno which isn't exported from the kernel.
> > 
> > We could reintroduce the dummy definition of errno for older kernels,
> > or use filp_* calls (like sound_firmware.c).
> 
> i guess sys_* functions are also not defined correctly on older
> kernels.  they were open(), close(), read() with __KERNEL_SYSCALLS__.

does the attached patch work?


Takashi
Index: alsa-driver/isa/wavefront/wavefront_synth.c
===
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/isa/wavefront/wavefront_synth.c,v
retrieving revision 1.3
diff -u -r1.3 wavefront_synth.c
--- alsa-driver/isa/wavefront/wavefront_synth.c 24 Apr 2004 19:54:17 -  1.3
+++ alsa-driver/isa/wavefront/wavefront_synth.c 25 May 2004 12:55:43 -
@@ -5,6 +5,11 @@
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
 #define __KERNEL_SYSCALLS__
+#include 
+#define sys_open open
+#define sys_close close
+#define sys_read read
+static int errno;
 #endif
 
 #include "../../alsa-kernel/isa/wavefront/wavefront_synth.c"


Re: [Alsa-devel] PCM Params

2004-05-25 Thread Paul Davis
> --- Paul Davis <[EMAIL PROTECTED]> wrote: >
>>Hi ,
>> >i'm trying to change the fragment size that the
>> alsa
>> >driver is capturing/playing out. It's currently set
>> at
>> >32 msecs(256 bytes).
>> >They are set in the runtime structure...
>> >   runtime->period_max ...etc
>> >Could anybody tell me which file these parameters
>> are
>> >set in the alsa-driver directory?
>> 
>> you should be using
>> snd_pcm_hw_params_set_period_size()
>
>
>Does this mean that i can change the period size
>without recompiling the driver?
>Im am not developing an ALSA application myself, just
>trying to change the pcm parameters.
>snd_pcm_hw_params_set_period_size()...looks like a
>function call included in a user written ALSA
>application??
>Excuse me if this is a stupid questions but,How do I
>use this function call in my case to change the driver
>period??

i don't understand your question. if you mean "how, as a user, do i
change the driver period", the answer is that it is controlled by the
application, and you should use the facilities provided by the
program. what software are you trying to use?

--p


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


Re: [Alsa-devel] PCM Params

2004-05-25 Thread Brian Furey
 --- Paul Davis <[EMAIL PROTECTED]> wrote: >
> --- Paul Davis <[EMAIL PROTECTED]> wrote:
> >
> >>Hi ,
> >> >i'm trying to change the fragment size that the
> >> alsa
> >> >driver is capturing/playing out. It's currently
> set
> >> at
> >> >32 msecs(256 bytes).
> >> >They are set in the runtime structure...
> >> >   runtime->period_max ...etc
> >> >Could anybody tell me which file these
> parameters
> >> are
> >> >set in the alsa-driver directory?
> >> 
> >> you should be using
> >> snd_pcm_hw_params_set_period_size()
> >
> >
> >Does this mean that i can change the period size
> >without recompiling the driver?
> >Im am not developing an ALSA application myself,
> just
> >trying to change the pcm parameters.
> >snd_pcm_hw_params_set_period_size()...looks like a
> >function call included in a user written ALSA
> >application??
> >Excuse me if this is a stupid questions but,How do
> I
> >use this function call in my case to change the
> driver
> >period??
> 
> i don't understand your question. if you mean "how,
> as a user, do i
> change the driver period", the answer is that it is
> controlled by the
> application, and you should use the facilities
> provided by the
> program. what software are you trying to use?
> 
> --p 

Im running OpenH323 a voice over ip application.What I
have found out from using it is that the alsa driver
always puts 32 msecs(256 bytes) of data into the
sender buffer, or takes the same amount from the
receiver buffer.
32 msecs is driver default if it's not set by the
application? I thought if i change the relevant
default params in alsa-driver/alsa-kernel/ and
recompile, it wud do the trick. 

...Instead i should include this function call to set
the driver period..snd_pcm_hw_params_set_period_size()
within my OpenH323 app with relevant header files???

Brian.






Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html


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


Re: [Alsa-devel] PCM Params

2004-05-25 Thread Jaroslav Kysela
On Tue, 25 May 2004, Brian Furey wrote:

> Im running OpenH323 a voice over ip application.What I
> have found out from using it is that the alsa driver
> always puts 32 msecs(256 bytes) of data into the
> sender buffer, or takes the same amount from the
> receiver buffer.
> 32 msecs is driver default if it's not set by the
> application? I thought if i change the relevant
> default params in alsa-driver/alsa-kernel/ and
> recompile, it wud do the trick. 

It depends on the used lowlevel driver. This information is there.

Jaroslav

-
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


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


Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Clemens Ladisch
Takashi Iwai wrote:

> I wrote:
> >
> > Clemens Ladisch wrote:
> > >
> > > depmod: *** Unresolved symbols in
> > > /lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
> > > depmod: errno
> > >
> > > The open/close/read system calls are implemented as inline functions
> > > which change errno which isn't exported from the kernel.
>
> does the attached patch work?

> +static int errno;

I don't have access to my Linux machine here, but I guess it does.

> > i guess sys_* functions are also not defined correctly on older
> > kernels.  they were open(), close(), read() with __KERNEL_SYSCALLS__.

> +#define sys_open open
> +#define sys_close close
> +#define sys_read read

These definitions are already in alsa-driver/include/syscalls_26.h.


I'm going to test and apply this until tomorrow, but feel free to
apply it now if you want to release rc2 earlier. :)


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


Re: [Alsa-devel] 1.0.5rc1 release

2004-05-25 Thread Takashi Iwai
At Tue, 25 May 2004 15:31:43 +0200 (METDST),
Clemens Ladisch wrote:
> 
> Takashi Iwai wrote:
> 
> > I wrote:
> > >
> > > Clemens Ladisch wrote:
> > > >
> > > > depmod: *** Unresolved symbols in
> > > > /lib/modules/2.4.26/kernel/sound/isa/wavefront/snd-wavefront.o
> > > > depmod: errno
> > > >
> > > > The open/close/read system calls are implemented as inline functions
> > > > which change errno which isn't exported from the kernel.
> >
> > does the attached patch work?
> 
> > +static int errno;
> 
> I don't have access to my Linux machine here, but I guess it does.
> 
> > > i guess sys_* functions are also not defined correctly on older
> > > kernels.  they were open(), close(), read() with __KERNEL_SYSCALLS__.
> 
> > +#define sys_open open
> > +#define sys_close close
> > +#define sys_read read
> 
> These definitions are already in alsa-driver/include/syscalls_26.h.

ok, thanks.

> I'm going to test and apply this until tomorrow, but feel free to
> apply it now if you want to release rc2 earlier. :)

the patch was already committed to cvs.


Takashi


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


[Alsa-devel] RME 9632 Mixer...

2004-05-25 Thread Ed Wildgoose
...is driving me nuts.  Everytime I turn on the PC I need to find a PC 
with SSH to adjust the mixer controls so that I can hear some sound (no 
mouse and a tiny TV resolution on the box itelf)

Can anyone suggest how to script the controls to default to some known 
values?  I'm using alsa from around kernel 2.6.5 ish (which I believe 
Thomas said has had the alsactl options removed, certainly I can't 
figure out how to make them work).  Pointers to relevant parts of the 
driver appreciated even so that I can write something to set the mixers 
to a nice default.

As an aside, the mixer app appears to have save and load options, but 
these don't work for me.  Or perhaps I am just using them wrongly?  
Could this be a way out?

Thanks
Ed W
P.S. Sound quality is excellent once I get the mixers in the right 
position!  Thanks Thomas

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


Re: [Alsa-devel] weird xrun problem

2004-05-25 Thread Giuliano Pochini
On Sun, 23 May 2004 11:21:41 +0200 (CEST)
Jaroslav Kysela <[EMAIL PROTECTED]> wrote:

> On Sat, 22 May 2004, Giuliano Pochini wrote:
>
> > Period 0 is 6624 frames and Period 1 is 6592 frames long (32 frames
> > shorter). I put some debug code and this is the output for a the playback
> > test above:
>
> ALSA does not know about this. All period sizes must be equal.

I thought about this again. Are you sure all periods must be aqual ?  When I
record or play something using unequal periods, sound is perfect. It means
ALSA reads and writes the last (sometimes a lot) smaller period as well.



--
Giuliano.


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


[Alsa-devel] snd-intel8x0 produces no sound starting in 2.6.5

2004-05-25 Thread Andrew Pimlott
[I sent a more complete version of this mail several days ago before I
was subscribed, but it seems to have disappeared and I neglected to keep
a copy.  If anyone can dig out that message and post it, I'd be
grateful.]

I have an "Intel Corp. 82801DB (ICH4) AC'97 Audio Controller (rev 01)"
in my Dell Inspiron 5150 that worked fine with the snd-intel8x0 driver
in 2.6.4, but produces no sound in 2.6.[56].  The device is detected and
sound apps (eg alsaplayer) don't notice any problem, there is just no
sound.  The mixer levels (checked with alsamixer) seem correct in both
cases.  The kernels are configured the same and I've tried both modular
and built-in drivers, with no change (both ways work on 2.6.4 and fail
on 2.6.6).

Looking at the boot messages, the first different that popped out was
that 2.6.4 used irq 11 but 2.6.6 used irq 7.  However, when I booted
2.6.6 with pci=noacpi, I got irq 7 again, and still no sound.  I did
some additional experiments, such as booting 2.6.4 with pci=noapici
(worked), that convinced me that the irq was a red herring.

Here are the differences between the kernel messages of 2.6.4 and 2.6.6
(without pci=noacpi) that look remotely relevant:

 ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
 ACPI: PCI Interrupt Link [LNKA] (IRQs 9 10 *11)
-ACPI: PCI Interrupt Link [LNKB] (IRQs 5 7)
+ACPI: PCI Interrupt Link [LNKB] (IRQs 5 7) *11
 ACPI: PCI Interrupt Link [LNKC] (IRQs 9 10 *11)
 ACPI: PCI Interrupt Link [LNKD] (IRQs 5 7 9 10 *11)
 ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)

 ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 11
 ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
 ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
 ACPI: PCI Interrupt Link [LNKH] enabled at IRQ 11
-ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
+ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 7
 ACPI: PCI Interrupt Link [LNKE] enabled at IRQ 11
 PCI: Using ACPI for IRQ routing

-  #0: Intel 82801DB-ICH4 at 0xf4fff800, irq 11
+  #0: Intel 82801DB-ICH4 at 0xf4fff800, irq 7

I have tried every permutation I could think of, so I don't believe I am
doing something stupid here.  Any suggestions are appreciated.  I tried
looking at the differences in the code, but they are substantial and
obviously depend on larger infrastructure changes.  Also, I looked at
the driver in alsa 1.0.4, but it seems to be the same as in 2.6.6.

Andrew


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