All of lore.kernel.org
 help / color / mirror / Atom feed
From: stan <ghjeold_i_mwee@cox.net>
To: "Mitul Sen (misen)" <misen@cisco.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Setting format to SND_PCM_FORMAT_MU_LAW does not let	me apply hardware parameters
Date: Wed, 16 Jul 2008 20:30:06 -0700	[thread overview]
Message-ID: <487EBCBE.70504@cox.net> (raw)
In-Reply-To: <3B6F5C9068D5864096EB291236C3386F02CE1659@xmb-sjc-21d.amer.cisco.com>

Mitul Sen (misen) wrote:

> 
> I am making some changes to the alsa-lib code and I have built alsa-lib. But I don't think its really picking up my changes. How can I make sure that my application uses the 
modified library? I don't have to load any modules, do 
I? I am sorry if this is too basic a question but I 
couldn't find the info on a quick google search. 
Basically what I want to know is what are the steps to 
develop alsa-lib. This is what I did
> 1) Downloaded the source code
> 2) Configured the system using ./configure
> 3) Did a build using make
> 4) Did a "make install"
> 
> Am I missing something here? 

It looks correct.  Do an   ls -l /usr/lib/libasound*. 
The file there should have the same timestamp as the 
file in your build directory.  If it doesn't, it didn't 
install.  You could just copy it over.

Make sure there is no other copy in /lib.

> 
> Also regarding the original problem, when I run my program, the output of /proc/asound/card0/pcm0p/sub0/hw_params is
> 
> access: MMAP_INTERLEAVED
> format: S16_LE
> subformat: STD
> channels: 2
> rate: 48000 (48000/1)
> period_size: 32
> buffer_size: 1024
> 
> This is clearly not what it should be since the data access should be RW_NONINTERLEAVED, format should be MU_LAW, there is only one channel and rate is 8000. Which would mean that alsa assumes a different set of parameters (for mu law)from what the data actually is. Am I right in thinking this?
> 
> Just got back after a long break and trying to pick up the threads again:-)
> 
> Again, any help will be much appreciated.
> 
> 
> 

Unless your changes changed the mu-law code to use your 
card's mu-law decoder, they will still be the decoded 
values.

The best way to do this is to compile your program with 
debugging enabled (  -ggdb  -O0) and the alsa library 
with debugging enabled.  ./configure  --help should 
give you the option.  Then move only the library to 
/usr/lib and run your program as
gdb --args yourprogram yourargs   .  You can see the 
info on how to run gdb in  info gdb  .  With the 
debugger you can step through the program and the 
library to see where it is not working the way you 
expected.  But you don't want to leave it like that as 
it is very inefficient.

If your code works for the mu-law, you could submit a 
patch.  Of course, you would have to check for the 
functionality and branch to the old code if the card 
doesn't support mu-law decoding.

  reply	other threads:[~2008-07-17  3:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-30 22:09 Setting format to SND_PCM_FORMAT_MU_LAW does not let me apply hardware parameters Mitul Sen (misen)
2008-07-01  7:39 ` Clemens Ladisch
2008-07-01 17:01   ` Mitul Sen (misen)
2008-07-01 13:59 ` stan
2008-07-01 18:42   ` Mitul Sen (misen)
2008-07-01 22:12     ` stan
2008-07-01 23:50       ` Mitul Sen (misen)
2008-07-02  2:20         ` stan
2008-07-03 18:55           ` Mitul Sen (misen)
2008-07-16 23:36           ` Mitul Sen (misen)
2008-07-17  3:30             ` stan [this message]
2008-07-23  0:11               ` Mitul Sen (misen)
2008-07-23 18:25                 ` stan
2008-07-23 21:31                   ` Mitul Sen (misen)
2008-07-24  0:46                     ` stan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=487EBCBE.70504@cox.net \
    --to=ghjeold_i_mwee@cox.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=misen@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.