All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: SALSA library and recording
@ 2009-04-15 18:40 reetesh chandran
  2009-04-16  7:22 ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: reetesh chandran @ 2009-04-15 18:40 UTC (permalink / raw)
  To: alsa-devel, Manisha Sankpal

Hi Manisha,
 
Sorry this is not a response which will help you.
 
I am facing similar issue. I am using SALSA and I am trying to record from a USB headset. The USB headset does have a mixer elem "Mic". But when I use snd_mixer_selem_get_capture_dB_range() or snd_mixer_selem_get_capture_volume_range() I just get zeroes. 
 
I did not do any set() functions like snd_mixer_selem_set_capture_switch_all(). Do I need to do that ? What is your source of info about how to set up the mixer for capture ? 
 
Thanks in advance
Reetesh

--- On Wed, 4/15/09, Manisha Sankpal <manisha.sankpal@gmail.com> wrote:


From: Manisha Sankpal <manisha.sankpal@gmail.com>
Subject: [alsa-devel] SALSA library and recording
To: alsa-devel@alsa-project.org
Date: Wednesday, April 15, 2009, 9:32 AM


Hi All,
I am using salsa library to capture the data from the sound card.  The
requirement is that the recording should be done from line-in port of the
sound card. The selection of "Line-in" port should be done  programatically.


With ALSA library, I am able to select the line-in by calling
snd_mixer_selem_set_capture_switch_all()  function. However, this function
is returning an error when SALSA library is used.  Is there any other
function/way to select the line-in mixer element in the SALSA API?

The help would be appreciated.
Thanks & regards,
manisha
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



      

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SALSA library and recording
  2009-04-15 18:40 SALSA library and recording reetesh chandran
@ 2009-04-16  7:22 ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2009-04-16  7:22 UTC (permalink / raw)
  To: reetesh chandran; +Cc: alsa-devel

At Wed, 15 Apr 2009 11:40:51 -0700 (PDT),
reetesh chandran wrote:
> 
> Hi Manisha,
>  
> Sorry this is not a response which will help you.
>  
> I am facing similar issue. I am using SALSA and I am trying to
> record from a USB headset. The USB headset does have a mixer elem
> "Mic". But when I use snd_mixer_selem_get_capture_dB_range() or
> snd_mixer_selem_get_capture_volume_range() I just get zeroes. 

Does alsa-lib return the right value?  If yes, it's a bug of salsa-lib.


Takashi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SALSA library and recording
  2009-04-15 16:32 Manisha Sankpal
  2009-04-16  7:12 ` Clemens Ladisch
@ 2009-04-16  7:21 ` Takashi Iwai
  1 sibling, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2009-04-16  7:21 UTC (permalink / raw)
  To: Manisha Sankpal; +Cc: alsa-devel

At Wed, 15 Apr 2009 22:02:38 +0530,
Manisha Sankpal wrote:
> 
> Hi All,
> I am using salsa library to capture the data from the sound card.  The
> requirement is that the recording should be done from line-in port of the
> sound card. The selection of "Line-in" port should be done  programatically.
> 
> 
> With ALSA library, I am able to select the line-in by calling
> snd_mixer_selem_set_capture_switch_all()  function. However, this function
> is returning an error when SALSA library is used.  Is there any other
> function/way to select the line-in mixer element in the SALSA API?

The API should be same, so it's likely an implementation issue of
salsa-lib.  Could you show the generated file via
"alsactl -f somefile store"?


Takashi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SALSA library and recording
  2009-04-16  7:12 ` Clemens Ladisch
@ 2009-04-16  7:20   ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2009-04-16  7:20 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel

At Thu, 16 Apr 2009 09:12:17 +0200,
Clemens Ladisch wrote:
> 
> Manisha Sankpal wrote:
> > I am using salsa library to capture the data from the sound card.  The
> > requirement is that the recording should be done from line-in port of the
> > sound card. The selection of "Line-in" port should be done  programatically.
> > 
> > With ALSA library, I am able to select the line-in by calling
> > snd_mixer_selem_set_capture_switch_all()  function. However, this function
> > is returning an error when SALSA library is used.
> 
> The high-level mixer functions are not implemented in the SALSA library.

They are.  But perhaps there are some bugs...


Takashi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: SALSA library and recording
  2009-04-15 16:32 Manisha Sankpal
@ 2009-04-16  7:12 ` Clemens Ladisch
  2009-04-16  7:20   ` Takashi Iwai
  2009-04-16  7:21 ` Takashi Iwai
  1 sibling, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2009-04-16  7:12 UTC (permalink / raw)
  To: Manisha Sankpal; +Cc: alsa-devel

Manisha Sankpal wrote:
> I am using salsa library to capture the data from the sound card.  The
> requirement is that the recording should be done from line-in port of the
> sound card. The selection of "Line-in" port should be done  programatically.
> 
> With ALSA library, I am able to select the line-in by calling
> snd_mixer_selem_set_capture_switch_all()  function. However, this function
> is returning an error when SALSA library is used.

The high-level mixer functions are not implemented in the SALSA library.

> Is there any other function/way to select the line-in mixer element in
> the SALSA API?

You'll have to use the snd_ctl* functions.
To change the value of a mixer control, do something like this:

	snd_ctl_t *ctl;
	snd_ctl_elem_value_t *value;
	int onoff = 1; /* or 0 for off */

	err = snd_ctl_open(&ctl, "default", 0);
	...
	snd_ctl_elem_value_alloca(&value);
	...
	snd_ctl_elem_value_set_interface(value, SND_CTL_ELEM_IFACE_MIXER);
	snd_ctl_elem_value_set_name(value, "xxxxx Capture Switch");
	snd_ctl_elem_value_set_boolean(value, 0, onoff);
	err = snd_ctl_elem_write(ctl, value);
	...
	snd_ctl_close(ctl);

You have to use the correct name; the names of mixer controls can be
seen in the output of "amixer controls".

If your hardware has a single "Capture Source" control instead, you
have to replace _set_boolean with _set_enumerated and use the correct
index.


HTH
Clemens

^ permalink raw reply	[flat|nested] 6+ messages in thread

* SALSA library and recording
@ 2009-04-15 16:32 Manisha Sankpal
  2009-04-16  7:12 ` Clemens Ladisch
  2009-04-16  7:21 ` Takashi Iwai
  0 siblings, 2 replies; 6+ messages in thread
From: Manisha Sankpal @ 2009-04-15 16:32 UTC (permalink / raw)
  To: alsa-devel

Hi All,
I am using salsa library to capture the data from the sound card.  The
requirement is that the recording should be done from line-in port of the
sound card. The selection of "Line-in" port should be done  programatically.


With ALSA library, I am able to select the line-in by calling
snd_mixer_selem_set_capture_switch_all()  function. However, this function
is returning an error when SALSA library is used.  Is there any other
function/way to select the line-in mixer element in the SALSA API?

The help would be appreciated.
Thanks & regards,
manisha

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-04-16  7:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-15 18:40 SALSA library and recording reetesh chandran
2009-04-16  7:22 ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2009-04-15 16:32 Manisha Sankpal
2009-04-16  7:12 ` Clemens Ladisch
2009-04-16  7:20   ` Takashi Iwai
2009-04-16  7:21 ` Takashi Iwai

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.