RE: [Alsa-devel] OSS mapping for ALSA controls

2004-04-12 Thread Pavana Sharma
Shell supported by the target are ash , dash 
Is this causing problem ..??

Regards
Pavan S

-Original Message-
From: Jaroslav Kysela [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 08, 2004 10:43 PM
To: Takashi Iwai
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [Alsa-devel] OSS mapping for ALSA controls


On Thu, 8 Apr 2004, Takashi Iwai wrote:

 At Thu, 8 Apr 2004 10:59:50 +0530,
 Pavana Sharma wrote:
  
  yes, I did this as root ..
 
 hmm, it works for me.
 
   # echo 'VOLUME Line Playback 0'  /proc/asound/card0/oss_mixer
   # cat /proc/asound/card0/oss_mixer  | grep VOLUME
   VOLUME Line Playback 0

Shell problem? The embedded devices has stripped things.

Jaroslav

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



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] OSS mapping for ALSA controls

2004-04-07 Thread Pavana Sharma
Hi,

I am trying to map my ALSA driver (for ARM) controls with OSS default
controls.

I am using this method, to change/update assignment in /proc file.
but I am not seeing any changes in my /proc/asound/card0/oss_mixer file.
% echo 'VOLUME Master Playback 0'  /proc/asound/card0/oss_mixer
Is this the write way to do it ? or do need to follow someother procedure
to map the alsa mixer ioctls with oss.
Thanks
Pavana S



---
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 mapping for ALSA controls

2004-04-07 Thread Pavana Sharma
yes, I did this as root ..

-Original Message-
From: Takashi Iwai [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 07, 2004 11:40 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [Alsa-devel] OSS mapping for ALSA controls


At Wed, 7 Apr 2004 19:38:18 +0530,
Pavana Sharma wrote:
 
 Hi,
 
   I am trying to map my ALSA driver (for ARM) controls with OSS default
 controls.
 
   I am using this method, to change/update assignment in /proc file.
   but I am not seeing any changes in my /proc/asound/card0/oss_mixer file.
   % echo 'VOLUME Master Playback 0'  /proc/asound/card0/oss_mixer

it should be ok.  did you do it as root?


Takashi



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] problem while opening device

2004-04-06 Thread Pavana Sharma
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



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

2004-04-06 Thread Pavana Sharma
Hi,

chekout these versions ..I am using,

 which version of alsa-drivers do you use [cat /proc/asound/version]?
Advanced Linux Sound Architecture Driver Version 1.0.2c (Thu Feb 05 15:41:49
2004 UTC).

which verison of alsa-utils do  you use [aplay --version]
aplay: version 1.0.3 by Jaroslav Kysela [EMAIL PROTECTED]

which version of alsa-lib do you use? [$EDITOR
/usr/include/alsa/version.h]?
 SND_LIB_VERSION_STR 1.0.3

Thanks
Pavana S

-Original Message-
From: Florian Schmidt [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 06, 2004 5:11 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [Alsa-devel] problem while opening device


On Tue, 6 Apr 2004 16:44:56 +0530
Pavana Sharma [EMAIL PROTECTED] 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.

I would think that this sounds like a version mismatch. How do i come to
this result? Well, alsamodules seem to be laoded fine [as you have
checked /proc/asound/cards]. Oss emu is working too [as you /dev/dsp
test shows]. The OSS emu [modules] don't interact with alsa-lib. But the
pcm-test program uses alsa-lib..

which version of alsa-drivers do you use [cat /proc/asound/version]?
which verison of alsa-utils do  you use [aplay --version]
which version of alsa-lib do you use? [$EDITOR
/usr/include/alsa/version.h]?

Flo

P.S.: oh i just see you use ARM. I have no idea, if that platform has
specific issues, so this post could be void afterall..

--
kT




---
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] RE: Alsa-devel digest, Vol 1 #1786 - 3 msgs

2004-04-01 Thread Pavana Sharma
Hi,
I am new to ALSA driver impementation. I am registering the  driver
interface functions like (probe,remove) using driver_register call. I expect
that the probe function will be called in which I am allocating sound card
and registering the card using snd_card_register. When I compile the sound
driver as a static module and boot my kernel I see that the init function in
which I am registering the device is getting called but the probe function
is not getting called.
We see a message from sound/last.c file asla_sound_last_init fucntion where
it searches snd_Cards array to find whether any sound cards are registered.
As our sound card card is not registered(because probe is not getting
called), we see a messaged No Soundcards found.

Can someone give us some clues like why probe function is not getting
called??


Regards,
Pavana



---
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] Question on ALSA driver init

2004-04-01 Thread Pavana Sharma



Hi,
I am new to ALSA driver impementation. I am registering the  driver
interface functions like (probe,remove) using driver_register call. I expect
that the probe function will be called in which I am allocating sound card
and registering the card using snd_card_register. When I compile the sound
driver as a static module and boot my kernel I see that the init function in
which I am registering the device is getting called but the probe function
is not getting called.
We see a message from sound/last.c file asla_sound_last_init fucntion where
it searches snd_Cards array to find whether any sound cards are registered.
As our sound card card is not registered(because probe is not getting
called), we see a messaged No Soundcards found.

Can someone give us some clues like why probe function is not getting
called??


Regards,
Pavana



---
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] help needed-- providing control interface

2004-03-26 Thread Pavana Sharma
hello,

I am providing control interface for my driver to access from user space
with functions get  put .
 ( driver is for arm platform ) .

I want to know

 * while creating new controls should I be allowed to create my hardware
specific controls like gain, power, rate  other codec specific parameters.
or  should I take care of mapping OSS mixer controls to ALSA mixer.
 * How user comes to know what controls are available  the valid range of
values for sliders  switches.
As I'm new to ALSA, can anyone explain me in detail, in this ragard.
Thanks  Regards
Pavana S



---
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] providing control interface

2004-03-25 Thread Pavana Sharma

hello,

I am providing control interface for my driver to access from user space
with functions get  put .
 ( driver is for arm platform ) .

I want to know

 * while creating new controls should I be allowed to create my hardware
specific controls like gain, power, rate  other codec specific parameters.
or  should I take care of mapping OSS mixer controls to ALSA mixer.
 * How user comes to know what controls are available  the valid range of
values for sliders  switches.
As I'm new to ALSA, can anyone explain me in detail, in this ragard.
Thanks  Regards
Pavana S



---
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] List of control parameters needed

2004-03-22 Thread Pavana Sharma
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



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

2004-03-18 Thread Pavana Sharma
Hi,

I am writing Alsa driver on 2.6 kernel for arm platform.
I want to test my driver with application.

I took one sample application  tried to map the functions.

*** sample application *
This program opens an audio interface for playback, configures it for
stereo, 16 bit, 44.1kHz, interleaved conventional read/write access. Then
its delivers a chunk of random data to it, and exits. It represents about
the simplest possible use of the ALSA Audio API, and isn't meant to be a
real program.
#include stdio.h
#include stdlib.h
#include alsa/asoundlib.h

main (int argc, char *argv[])
{
int i;
int err;
short buf[128];
snd_pcm_t *playback_handle;
snd_pcm_hw_params_t *hw_params;

if ((err = snd_pcm_open (playback_handle, argv[1],
SND_PCM_STREAM_PLAYBACK, 0))  0) {
fprintf (stderr, cannot open audio device %s (%s)\n,
 argv[1],
 snd_strerror (err));
exit (1);
}

if ((err = snd_pcm_hw_params_malloc (hw_params))  0) {
fprintf (stderr, cannot allocate hardware parameter structure 
(%s)\n,
 snd_strerror (err));
exit (1);
}

if ((err = snd_pcm_hw_params_any (playback_handle, hw_params))  0) {
fprintf (stderr, cannot initialize hardware parameter 
structure (%s)\n,
 snd_strerror (err));
exit (1);
}

if ((err = snd_pcm_hw_params_set_access (playback_handle, hw_params,
SND_PCM_ACCESS_RW_INTERLEAVED))  0) {
fprintf (stderr, cannot set access type (%s)\n,
 snd_strerror (err));
exit (1);
}

if ((err = snd_pcm_hw_params_set_format (playback_handle, hw_params,
SND_PCM_FORMAT_S16_LE))  0) {
fprintf (stderr, cannot set sample format (%s)\n,
 snd_strerror (err));
exit (1);
}

if ((err = snd_pcm_hw_params_set_rate_near (playback_handle, hw_params,
44100, 0))  0) {
fprintf (stderr, cannot set sample rate (%s)\n,
 snd_strerror (err));
exit (1);
}

if ((err = snd_pcm_hw_params_set_channels (playback_handle, hw_params, 
2))
 0) {
fprintf (stderr, cannot set channel count (%s)\n,
 snd_strerror (err));
exit (1);
}

if ((err = snd_pcm_hw_params (playback_handle, hw_params))  0) {
fprintf (stderr, cannot set parameters (%s)\n,
 snd_strerror (err));
exit (1);
}

snd_pcm_hw_params_free (hw_params);

if ((err = snd_pcm_prepare (playback_handle))  0) {
fprintf (stderr, cannot prepare audio interface for use 
(%s)\n,
 snd_strerror (err));
exit (1);
}

for (i = 0; i  10; ++i) {
if ((err = snd_pcm_writei (playback_handle, buf, 128)) != 128) 
{
fprintf (stderr, write to audio interface failed 
(%s)\n,
 snd_strerror (err));
exit (1);
}
}

snd_pcm_close (playback_handle);
exit (0);
}

**END***
**

I tried to trace back the application how i can map my driver routines with
the calls in application.
While tracing I couln't find the definition of of few functions like
snd_pcm_sw_params_set_start_threshold()
snd_pcm_hw_params_set_rate_near()
snd_pcm_hw_params()
snd_pcm_hw_params_free()

For few I could only find the prototypes.

My doubts are,
 where can I find the definitions for these functions or Alsa APIs ?
 Do i need to have any lib (alsa_lib) ?
 If not how my driver can be accessed from application layer, I mean how
calls are mapped ?

Can anybody please help me in this regard.

Thanks
Pavana S



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

RE: [Alsa-devel] Testing Audio driver

2004-03-18 Thread Pavana Sharma
Thank you,


-Original Message-
From: Jaroslav Kysela [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 2:35 PM
To: Pavana Sharma
Cc: [EMAIL PROTECTED]
Subject: Re: [Alsa-devel] Testing Audio driver


On Thu, 18 Mar 2004, Pavana Sharma wrote:

 My doubts are,
  where can I find the definitions for these functions or Alsa APIs ?
  Do i need to have any lib (alsa_lib) ?
  If not how my driver can be accessed from application layer, I mean how
 calls are mapped ?

You must use alsa-lib. We don't allow to use the syscalls directly.
Also, you might look to alsa-lib/test/pcm.c code which shows you
(and you can test with it) all access methods (playback only) - compile 
alsa-lib and type 'make pcm' in the test directory.

Jaroslav

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



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] ALSA kernel-module,driver rpm --help needed

2004-03-14 Thread Pavana Sharma

Hi,

I looking for ALSA kernel-module,driver rpm for the kernel version 2.4.21-9
on i686 redhat9 .Can anyone please help me by pointing where i can find
them.

I have searched in
http://rpm.pbone.net/
http://www.alsa-project.org/
http://alsa.opensrc.org/
http://rpmfind.net/linux/


Regs
Pavana S



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