All of lore.kernel.org
 help / color / mirror / Atom feed
* Configuring an audio path within ALSA
@ 2012-06-25 12:26 rashmi narayan
  2012-06-26  2:56 ` Patrick Lai
  0 siblings, 1 reply; 7+ messages in thread
From: rashmi narayan @ 2012-06-25 12:26 UTC (permalink / raw)
  To: alsa-devel

Dear ALSA Folks,

I am a newbie to ALSA .I am trying to configure a path within the driver to
open up /power up the path within the codec from MIC-IN to LineOUT. How can
I do this within ALSA. Please send me some pointers.

Thank you,
Rashmi

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

* Re: Configuring an audio path within ALSA
  2012-06-25 12:26 Configuring an audio path within ALSA rashmi narayan
@ 2012-06-26  2:56 ` Patrick Lai
  2012-06-26  7:52   ` rashmi narayan
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick Lai @ 2012-06-26  2:56 UTC (permalink / raw)
  To: rashmi narayan; +Cc: alsa-devel

On 6/25/2012 5:26 AM, rashmi narayan wrote:
> Dear ALSA Folks,
>
> I am a newbie to ALSA .I am trying to configure a path within the driver to
> open up /power up the path within the codec from MIC-IN to LineOUT. How can
> I do this within ALSA. Please send me some pointers.
>
If your CODEC driver is written to plug into ASoC framework, ASoC
dynamic audio power management(DAPM) will be able to link MIC-IN to
Lineout. After a set of ALSA mixer commands is issued to create a path
from one end point to another end point, DAPM will kick in and enable
the path according to widgets and audio routing map defined in the
CODEC driver.

> Thank you,
> Rashmi
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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

* Re: Configuring an audio path within ALSA
  2012-06-26  2:56 ` Patrick Lai
@ 2012-06-26  7:52   ` rashmi narayan
  2012-06-26  9:43     ` Vinod Koul
  2012-06-27  5:27     ` Patrick Lai
  0 siblings, 2 replies; 7+ messages in thread
From: rashmi narayan @ 2012-06-26  7:52 UTC (permalink / raw)
  To: Patrick Lai; +Cc: alsa-devel

Thank you Patrick .

Currently my codec driver SGTL5000.c has the following audio map
static const struct snd_soc_dapm_route audio_map[] = {
 {"ADC Mux", "LINE_IN", "LINE_IN"},
{"ADC Mux", "MIC_IN", "MIC_IN"},
 {"ADC", NULL, "ADC Mux"},
{"DAC Mux", "DAC", "DAC"},
 {"DAC Mux", "LINE_IN", "LINE_IN"},
{"LO", NULL, "DAC"},
 {"HP", NULL, "DAC Mux"},
{"LINE_OUT", NULL, "LO"},
 {"HP_OUT", NULL, "HP"},
};

This map does not have a link from ADC to DAC.
You mention "After a set of ALSA mixer commands is issued to create a
path from one end point to another end point" , how do we issue those
commands? to create a link , currently my alsa mixer shows no option for a
ADC to DAC select.

-Rashmi


On Tue, Jun 26, 2012 at 8:26 AM, Patrick Lai <plai@codeaurora.org> wrote:

> On 6/25/2012 5:26 AM, rashmi narayan wrote:
>
>> Dear ALSA Folks,
>>
>> I am a newbie to ALSA .I am trying to configure a path within the driver
>> to
>> open up /power up the path within the codec from MIC-IN to LineOUT. How
>> can
>> I do this within ALSA. Please send me some pointers.
>>
>>  If your CODEC driver is written to plug into ASoC framework, ASoC
> dynamic audio power management(DAPM) will be able to link MIC-IN to
> Lineout. After a set of ALSA mixer commands is issued to create a path
> from one end point to another end point, DAPM will kick in and enable
> the path according to widgets and audio routing map defined in the
> CODEC driver.
>
>  Thank you,
>> Rashmi
>> ______________________________**_________________
>> Alsa-devel mailing list
>> Alsa-devel@alsa-project.org
>> http://mailman.alsa-project.**org/mailman/listinfo/alsa-**devel<http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>
>>
>
>
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>

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

* Re: Configuring an audio path within ALSA
  2012-06-26  7:52   ` rashmi narayan
@ 2012-06-26  9:43     ` Vinod Koul
  2012-06-27  5:27     ` Patrick Lai
  1 sibling, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2012-06-26  9:43 UTC (permalink / raw)
  To: rashmi narayan; +Cc: Patrick Lai, alsa-devel

On Tue, 2012-06-26 at 13:22 +0530, rashmi narayan wrote:
Dont TOP Post!!

> Thank you Patrick .
> 
> Currently my codec driver SGTL5000.c has the following audio map
> static const struct snd_soc_dapm_route audio_map[] = {
>  {"ADC Mux", "LINE_IN", "LINE_IN"},
> {"ADC Mux", "MIC_IN", "MIC_IN"},
>  {"ADC", NULL, "ADC Mux"},
> {"DAC Mux", "DAC", "DAC"},
>  {"DAC Mux", "LINE_IN", "LINE_IN"},
> {"LO", NULL, "DAC"},
>  {"HP", NULL, "DAC Mux"},
> {"LINE_OUT", NULL, "LO"},
>  {"HP_OUT", NULL, "HP"},
> };
> 
> This map does not have a link from ADC to DAC.
> You mention "After a set of ALSA mixer commands is issued to create a
> path from one end point to another end point" , how do we issue those
> commands? to create a link , currently my alsa mixer shows no option for a
> ADC to DAC select.
Does the codec data sheet support it, if so please create the DAPM
widgets for this and add them in above map.

> 
> -Rashmi
> 
> 
> On Tue, Jun 26, 2012 at 8:26 AM, Patrick Lai <plai@codeaurora.org> wrote:
> 
> > On 6/25/2012 5:26 AM, rashmi narayan wrote:
> >
> >> Dear ALSA Folks,
> >>
> >> I am a newbie to ALSA .I am trying to configure a path within the driver
> >> to
> >> open up /power up the path within the codec from MIC-IN to LineOUT. How
> >> can
> >> I do this within ALSA. Please send me some pointers.
> >>
> >>  If your CODEC driver is written to plug into ASoC framework, ASoC
> > dynamic audio power management(DAPM) will be able to link MIC-IN to
> > Lineout. After a set of ALSA mixer commands is issued to create a path
> > from one end point to another end point, DAPM will kick in and enable
> > the path according to widgets and audio routing map defined in the
> > CODEC driver.
> >
> >  Thank you,
> >> Rashmi
> >> ______________________________**_________________
> >> Alsa-devel mailing list
> >> Alsa-devel@alsa-project.org
> >> http://mailman.alsa-project.**org/mailman/listinfo/alsa-**devel<http://mailman.alsa-project.org/mailman/listinfo/alsa-devel>
> >>
> >
> >
> > --
> > Sent by an employee of the Qualcomm Innovation Center, Inc.
> > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
> >
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


-- 
~Vinod

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

* Re: Configuring an audio path within ALSA
  2012-06-26  7:52   ` rashmi narayan
  2012-06-26  9:43     ` Vinod Koul
@ 2012-06-27  5:27     ` Patrick Lai
  2012-06-27 12:04       ` rashmi narayan
  2012-06-27 12:04       ` rashmi narayan
  1 sibling, 2 replies; 7+ messages in thread
From: Patrick Lai @ 2012-06-27  5:27 UTC (permalink / raw)
  To: rashmi narayan; +Cc: alsa-devel

On 6/26/2012 12:52 AM, rashmi narayan wrote:
> Thank you Patrick .
>
> Currently my codec driver SGTL5000.c has the following audio map
> static const struct snd_soc_dapm_route audio_map[] = {
> {"ADC Mux", "LINE_IN", "LINE_IN"},
> {"ADC Mux", "MIC_IN", "MIC_IN"},
> {"ADC", NULL, "ADC Mux"},
> {"DAC Mux", "DAC", "DAC"},
> {"DAC Mux", "LINE_IN", "LINE_IN"},
> {"LO", NULL, "DAC"},
> {"HP", NULL, "DAC Mux"},
> {"LINE_OUT", NULL, "LO"},
> {"HP_OUT", NULL, "HP"},
> };
>
> This map does not have a link from ADC to DAC.
> You mention "After a set of ALSA mixer commands is issued to create a
> path from one end point to another end point" , how do we issue those
> commands? to create a link , currently my alsa mixer shows no option for
> a ADC to DAC select.

If you have widgets defined matching what you specify in audio_map, you
should see mixer command i.e "ADC Mux' base on audio map you have
given. Then you give amixer 'ADC Mux' 'LINE_IN', this would translate
to writing codec register to have ADC Mux take LINE_IN as input. Audio
map is defined base on your CODEC topology. I would not be able to
comment on how to enable CODEC loopback for your CODEC. However,
the audio map you provided above is kind of fishy. For example,
shouldn't DAC be sink instead of source
{"DAC", "DAC", "DAC MUX"} as opposed to {"DAC Mux", "DAC", "DAC"}

>
> -Rashmi
>
>


-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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

* Re: Configuring an audio path within ALSA
  2012-06-27  5:27     ` Patrick Lai
@ 2012-06-27 12:04       ` rashmi narayan
  2012-06-27 12:04       ` rashmi narayan
  1 sibling, 0 replies; 7+ messages in thread
From: rashmi narayan @ 2012-06-27 12:04 UTC (permalink / raw)
  To: Patrick Lai; +Cc: alsa-devel

On Wed, Jun 27, 2012 at 10:57 AM, Patrick Lai <plai@codeaurora.org> wrote:

> On 6/26/2012 12:52 AM, rashmi narayan wrote:
>
>> Thank you Patrick .
>>
>> Currently my codec driver SGTL5000.c has the following audio map
>> static const struct snd_soc_dapm_route audio_map[] = {
>> {"ADC Mux", "LINE_IN", "LINE_IN"},
>> {"ADC Mux", "MIC_IN", "MIC_IN"},
>> {"ADC", NULL, "ADC Mux"},
>> {"DAC Mux", "DAC", "DAC"},
>> {"DAC Mux", "LINE_IN", "LINE_IN"},
>> {"LO", NULL, "DAC"},
>> {"HP", NULL, "DAC Mux"},
>> {"LINE_OUT", NULL, "LO"},
>> {"HP_OUT", NULL, "HP"},
>> };
>>
>> This map does not have a link from ADC to DAC.
>> You mention "After a set of ALSA mixer commands is issued to create a
>> path from one end point to another end point" , how do we issue those
>> commands? to create a link , currently my alsa mixer shows no option for
>> a ADC to DAC select.
>>
>
> If you have widgets defined matching what you specify in audio_map, you
> should see mixer command i.e "ADC Mux' base on audio map you have
> given. Then you give amixer 'ADC Mux' 'LINE_IN', this would translate
> to writing codec register to have ADC Mux take LINE_IN as input. Audio
> map is defined base on your CODEC topology. I would not be able to
> comment on how to enable CODEC loopback for your CODEC. However,
> the audio map you provided above is kind of fishy. For example,
> shouldn't DAC be sink instead of source
> {"DAC", "DAC", "DAC MUX"} as opposed to {"DAC Mux", "DAC", "DAC"}
>
>   The DAC MUX is a misnomer , it can be thought of as HeadphoneMux where
the inputs are LINE_IN and DAC(arch of SGTL5000).
The datasheet has a DAC select register to choose between ADC and I2S_
IN(I2S In is default) . I don't see that in the map.
 The driver doesn't understand the command * amixer 'ADC Mux' 'LINE_IN' *it
understands amixer control or alsamixer though .
 So is there any other option for the connect source to destination
command... Am I missing something here?
 -amateur hence!



>
>> -Rashmi
>>
>>
>>
>
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>

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

* Re: Configuring an audio path within ALSA
  2012-06-27  5:27     ` Patrick Lai
  2012-06-27 12:04       ` rashmi narayan
@ 2012-06-27 12:04       ` rashmi narayan
  1 sibling, 0 replies; 7+ messages in thread
From: rashmi narayan @ 2012-06-27 12:04 UTC (permalink / raw)
  To: Patrick Lai; +Cc: alsa-devel

On Wed, Jun 27, 2012 at 10:57 AM, Patrick Lai <plai@codeaurora.org> wrote:

> On 6/26/2012 12:52 AM, rashmi narayan wrote:
>
>> Thank you Patrick .
>>
>> Currently my codec driver SGTL5000.c has the following audio map
>> static const struct snd_soc_dapm_route audio_map[] = {
>> {"ADC Mux", "LINE_IN", "LINE_IN"},
>> {"ADC Mux", "MIC_IN", "MIC_IN"},
>> {"ADC", NULL, "ADC Mux"},
>> {"DAC Mux", "DAC", "DAC"},
>> {"DAC Mux", "LINE_IN", "LINE_IN"},
>> {"LO", NULL, "DAC"},
>> {"HP", NULL, "DAC Mux"},
>> {"LINE_OUT", NULL, "LO"},
>> {"HP_OUT", NULL, "HP"},
>> };
>>
>> This map does not have a link from ADC to DAC.
>> You mention "After a set of ALSA mixer commands is issued to create a
>> path from one end point to another end point" , how do we issue those
>> commands? to create a link , currently my alsa mixer shows no option for
>> a ADC to DAC select.
>>
>
> If you have widgets defined matching what you specify in audio_map, you
> should see mixer command i.e "ADC Mux' base on audio map you have
> given. Then you give amixer 'ADC Mux' 'LINE_IN', this would translate
> to writing codec register to have ADC Mux take LINE_IN as input. Audio
> map is defined base on your CODEC topology. I would not be able to
> comment on how to enable CODEC loopback for your CODEC. However,
> the audio map you provided above is kind of fishy. For example,
> shouldn't DAC be sink instead of source
> {"DAC", "DAC", "DAC MUX"} as opposed to {"DAC Mux", "DAC", "DAC"}
>
>
  The DAC MUX is a misnomer , it can be thought of as HeadphoneMux where
the inputs are LINE_IN and DAC(arch of SGTL5000).
The datasheet has a DAC select register to choose between ADC and I2S_
IN(I2S In is default) . I don't see that in the map.
 The driver doesn't understand the command * amixer 'ADC Mux' 'LINE_IN' *it
understands amixer control or alsamixer though .
 So is there any other option for the connect source to destination
command... Am I missing something here?


>> -Rashmi
>>
>>
>>
>
> --
> Sent by an employee of the Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
>

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

end of thread, other threads:[~2012-06-27 12:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25 12:26 Configuring an audio path within ALSA rashmi narayan
2012-06-26  2:56 ` Patrick Lai
2012-06-26  7:52   ` rashmi narayan
2012-06-26  9:43     ` Vinod Koul
2012-06-27  5:27     ` Patrick Lai
2012-06-27 12:04       ` rashmi narayan
2012-06-27 12:04       ` rashmi narayan

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.