Re: [Alsa-devel] writing user program for alsa under fedora core 1

2004-05-31 Thread Frank W. Miller
With regard to my soundcard problems.  I actually have two cards in my 
system.  The first is an AC97 thing on an Intel motherboard, judging by 
this dmesg output I'd say its an Intel 8xx chip...

Intel 810 + AC97 Audio, version 0.24, 15:50:18 Oct 29 2003
PCI: Found IRQ 9 for device 00:1f.5
PCI: Sharing IRQ 9 with 00:1f.3
PCI: Setting latency timer of device 00:1f.5 to 64
i810: Intel ICH2 found at IO 0xef00 and 0xe800, MEM 0x and 0x, IRQ 9
i810_audio: Audio Controller supports 6 channels.
i810_audio: Defaulting to base 2 channel mode.
i810_audio: Resetting connection 0
ac97_codec: AC97 Audio codec, id: ADS96 (Analog Devices AD1885)
i810_audio: AC'97 codec 0 Unable to map surround DAC's (or DAC's not 
present), total channels = 2
i810_audio: setting clocking to 41319
Creative EMU10K1 PCI Audio Driver, version 0.20, 15:51:24 Oct 29 2003
PCI: Found IRQ 11 for device 02:0a.0
emu10k1: EMU10K1 rev 8 model 0x8064 found, IO at 0xdf80-0xdf9f, IRQ 11
ac97_codec: AC97 Audio codec, id: 0x8384:0x7608 (SigmaTel STAC9708)
emu10k1: SBLive! 5.1 card detected
i810_audio: drain_dac, dma timeout?

The second is a SoundBlaster Live! card.  This is my default soundcard.  
When I have the CD Player running it uses the SBLive hardware and it 
sounds fine.  Now just for grins, heres the code snippet that I use for 
initializing the sound system in the softphone client program:

static int
soundcard_setup()
{
   int fmt, result;
   

   /* Set full-duplex operation */
   result = ioctl(fd, SNDCTL_DSP_SETDUPLEX, 0);
   if (result == 0) {
   log_msg(LOG_INFO, full-duplex soundcard operation);
   full_duplex = 1;
   current_direction = SOUNDCARD_SET_NULL;
   } else
   log_msg(LOG_INFO, half-duplex soundcard operation);
   

   /* Set buffer format */
   fmt = SOUNDCARD_BUFFER_FORMAT;
   result = ioctl(fd, SNDCTL_DSP_SETFRAGMENT, fmt);
   if (result  0) {
   log_msg(LOG_ERROR,
   set soundcard buffer format failed (%s),
   strerror(errno));
   return (-1);
   }
   /* Set for mono operation */
   fmt = 0;
   result = ioctl(fd, SNDCTL_DSP_STEREO, fmt);
   if (result  0) {
   log_msg(LOG_ERROR,
   set soundcard mono operation failed (%s),
   strerror(errno));
   return (-1);
   }
   /* Set signed 16-bit little-endian sample format */
   fmt = AFMT_S16_LE;
   result = ioctl(fd, SNDCTL_DSP_SETFMT, fmt);
   if (result  0) {
   log_msg(LOG_ERROR, set soundcard format failed (%s),
   strerror(errno));
   return (-1);
   }
   /* Set sampling rate */
   fmt = SOUNDCARD_SAMPLING_RATE;
   result = ioctl(fd, SNDCTL_DSP_SPEED, fmt);
   if (result  0 || fmt != SOUNDCARD_SAMPLING_RATE) {
   log_msg(LOG_ERROR,
   set %d Hz soundcard sampling failed (%s),
   SOUNDCARD_SAMPLING_RATE, strerror(errno));
   return (-1);
   }
}
Obviously the important thing here for you guys are the ioctls.  The 
ones that don't seem to be working are the duplex call at the beginning 
and the sampling rate call at the end.  As I mentioned previously, this 
code worked great using OSS under Red Hat 9 on the same machine.  I've 
only run into problems after I reinstalled the operating system with 
Fedora Core 1.  I'd luv to hear your thoughts on this stuff.

Thanks,
FM

Frank W. Miller wrote:
Greetings,
I'm writing a softphone for Linux under Fedora Core 1.  I've had this 
client working well using OSS under Red Hat 9 for awhile now.  I've 
run into some problems however when trying to use the OSS calls under 
Fedora.  I thought I would try to just write an ALSA driver and went 
to the Programming docs.  Trouble is, they reference a header file 
alsa/asoundlib.h and this file doesnt exist in my Fedora core 
distro.  Do I need another RPM install or something?

Thanks,
FM


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



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

RE: [Alsa-devel] writing user program for alsa under fedora core 1

2004-05-30 Thread Jaroslav Kysela
On Sat, 29 May 2004, Frank W. Miller wrote:

 using ALSA.  When I try to run my existing binary that makes OSS calls on
 top of Fedora that is using an ALSA driver for my soundcard, I get some
 strange behaviour, some of the calls don't work the same.  For example, the
 card supports full-duplex but the ALSA driver seems to think it will only
 support half-duplex.  When I try to set the sampling rate on the 16-bit

Please, specify your hardware. We have probably available two indepedent 
devices for your card, because ALSA supports full-duplex for capable 
devices.

 interface, I get an error (cant remember which one right now).  So my

Document this with a small test program. We'll try to fix your problem.
Please, create a report in our bug-tracking-system.

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


Re: [Alsa-devel] writing user program for alsa under fedora core 1

2004-05-29 Thread Jan Depner
Your best bet is to download the sources and build the packages.  That
way you'll know exactly what you've got.  Also, at some point you may
have to go into the libraries and do some debugging.

Jan

On Sat, 2004-05-29 at 19:02, Frank W. Miller wrote:
 Greetings,
 
 I'm writing a softphone for Linux under Fedora Core 1.  I've had this 
 client working well using OSS under Red Hat 9 for awhile now.  I've run 
 into some problems however when trying to use the OSS calls under 
 Fedora.  I thought I would try to just write an ALSA driver and went to 
 the Programming docs.  Trouble is, they reference a header file 
 alsa/asoundlib.h and this file doesnt exist in my Fedora core distro.  
 Do I need another RPM install or something?
 
 Thanks,
 FM
 
 
 
 
 
 ---
 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



---
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] writing user program for alsa under fedora core 1

2004-05-29 Thread Frank W. Miller


Thanks for the reply...

I probably need to be more specific here.  I have a driver that works well
with OSS under Red Hat 9.  When I reinstalled my system using Fedora Core 1,
I did not need OSS any more.  I have nice sound coming from my speakers
using ALSA.  When I try to run my existing binary that makes OSS calls on
top of Fedora that is using an ALSA driver for my soundcard, I get some
strange behaviour, some of the calls don't work the same.  For example, the
card supports full-duplex but the ALSA driver seems to think it will only
support half-duplex.  When I try to set the sampling rate on the 16-bit
interface, I get an error (cant remember which one right now).  So my
thought was, especially after reading the docs, i.e. the HOWTO-0.9 or
something like that, that I should just rewrite the driver to make ALSA type
calls.  That's when I discovered that I dont have this header file.

So, I obviously have a working ALSA subsystem, since my soundcard works with
the CD player for example.  All I really need to do is get to a place where
I can write a program making ALSA API calls.  Thats what I need help to do.
Now, is it really necessary for me download all the source and rebuild it
and all that to accomplish this task?

Thanks,
FM



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jan Depner
Sent: Saturday, May 29, 2004 8:26 PM
To: Frank W. Miller
Cc: alsa-devel
Subject: Re: [Alsa-devel] writing user program for alsa under fedora
core 1


Your best bet is to download the sources and build the packages.  That
way you'll know exactly what you've got.  Also, at some point you may
have to go into the libraries and do some debugging.

Jan

On Sat, 2004-05-29 at 19:02, Frank W. Miller wrote:
 Greetings,

 I'm writing a softphone for Linux under Fedora Core 1.  I've had this
 client working well using OSS under Red Hat 9 for awhile now.  I've run
 into some problems however when trying to use the OSS calls under
 Fedora.  I thought I would try to just write an ALSA driver and went to
 the Programming docs.  Trouble is, they reference a header file
 alsa/asoundlib.h and this file doesnt exist in my Fedora core distro.
 Do I need another RPM install or something?

 Thanks,
 FM





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



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



---
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] writing user program for alsa under fedora core 1

2004-05-29 Thread Jan Depner
I would be willing to bet that the problem is that you don't have the
development libraries.  You can play via ALSA without having them.  I
don't think Fedora is very big on loading all of the development
libraries.  I run Fedora Core 1 on three systems at my house.  When I
load them I load everything but I still use Planet CCRMA to get the
audio stuff.  Even then I'll download certain libraries and build from
scratch if I'm working on code.  Planet CCRMA will definitely fix you up
as far as development libraries are concerned and it's very simple to
do.

Jan

On Sat, 2004-05-29 at 19:53, Frank W. Miller wrote:
 Thanks for the reply...
 
 I probably need to be more specific here.  I have a driver that works well
 with OSS under Red Hat 9.  When I reinstalled my system using Fedora Core 1,
 I did not need OSS any more.  I have nice sound coming from my speakers
 using ALSA.  When I try to run my existing binary that makes OSS calls on
 top of Fedora that is using an ALSA driver for my soundcard, I get some
 strange behaviour, some of the calls don't work the same.  For example, the
 card supports full-duplex but the ALSA driver seems to think it will only
 support half-duplex.  When I try to set the sampling rate on the 16-bit
 interface, I get an error (cant remember which one right now).  So my
 thought was, especially after reading the docs, i.e. the HOWTO-0.9 or
 something like that, that I should just rewrite the driver to make ALSA type
 calls.  That's when I discovered that I dont have this header file.
 
 So, I obviously have a working ALSA subsystem, since my soundcard works with
 the CD player for example.  All I really need to do is get to a place where
 I can write a program making ALSA API calls.  Thats what I need help to do.
 Now, is it really necessary for me download all the source and rebuild it
 and all that to accomplish this task?
 
 Thanks,
 FM
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Behalf Of Jan Depner
 Sent: Saturday, May 29, 2004 8:26 PM
 To: Frank W. Miller
 Cc: alsa-devel
 Subject: Re: [Alsa-devel] writing user program for alsa under fedora
 core 1
 
 
 Your best bet is to download the sources and build the packages.  That
 way you'll know exactly what you've got.  Also, at some point you may
 have to go into the libraries and do some debugging.
 
 Jan
 
 On Sat, 2004-05-29 at 19:02, Frank W. Miller wrote:
  Greetings,
 
  I'm writing a softphone for Linux under Fedora Core 1.  I've had this
  client working well using OSS under Red Hat 9 for awhile now.  I've run
  into some problems however when trying to use the OSS calls under
  Fedora.  I thought I would try to just write an ALSA driver and went to
  the Programming docs.  Trouble is, they reference a header file
  alsa/asoundlib.h and this file doesnt exist in my Fedora core distro.
  Do I need another RPM install or something?
 
  Thanks,
  FM
 
 
 
 
 
  ---
  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
 
 
 
 ---
 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
 



---
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] writing user program for alsa under fedora core 1

2004-05-29 Thread Apostolos Dimitromanolakis
The Fedora Core should have some RPM with the ALSA header files.  Since 
it is not installed, try looking in the CDs with whatever tool Fedora 
provides for searching the RPMS.  From a quick look at the names of the 
RPMS I cannot find where the ALSA header files are but since I do not 
run Fedora I can't help you further.  If it is nowhere then it is a 
problem/bug w/the Fedora and not your fault.

Apostolos
Frank W. Miller wrote:
Thanks for the reply...
I probably need to be more specific here.  I have a driver that works well
with OSS under Red Hat 9.  When I reinstalled my system using Fedora Core 1,
I did not need OSS any more.  I have nice sound coming from my speakers
using ALSA.  When I try to run my existing binary that makes OSS calls on
top of Fedora that is using an ALSA driver for my soundcard, I get some
strange behaviour, some of the calls don't work the same.  For example, the
card supports full-duplex but the ALSA driver seems to think it will only
support half-duplex.  When I try to set the sampling rate on the 16-bit
interface, I get an error (cant remember which one right now).  So my
thought was, especially after reading the docs, i.e. the HOWTO-0.9 or
something like that, that I should just rewrite the driver to make ALSA type
calls.  That's when I discovered that I dont have this header file.
So, I obviously have a working ALSA subsystem, since my soundcard works with
the CD player for example.  All I really need to do is get to a place where
I can write a program making ALSA API calls.  Thats what I need help to do.
Now, is it really necessary for me download all the source and rebuild it
and all that to accomplish this task?
Thanks,
FM
 


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