Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Omer <omer.job@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Re: ASoC: Max98090 Codec DAPM Widget setup in Open	Embedded
Date: Wed, 25 Mar 2015 07:22:29 +0000 (UTC)	[thread overview]
Message-ID: <loom.20150325T081642-60@post.gmane.org> (raw)
In-Reply-To: 1BBF0420-296C-435B-9208-5939803DAD57@gmail.com

Variksla <variksla <at> gmail.com> writes:

> 
> 
> > On Mar 24, 2015, at 12:26 AM, Lars-Peter Clausen <lars <at> metafoo.de> 
> > 
> >> On 03/24/2015 07:54 AM, noman pouigt wrote:
> >> On Mon, Mar 23, 2015 at 11:53 PM, noman pouigt <variksla <at> gmail.com> 
wrote:
> >>>> I would like to know which file I can use to connect/enable
> >>>> DPAM widgets permanently so a simple aplay/record can work?
> >>>> 
> >>>> My environment is:
> >>>> - Yocto Linux Kernel 3.10 - (DTS based)
> >>>> - Max98090 Codec
> >>>> - imx6SL SoC
> >>>> 
> >>>> I thought about doing this in alsa.conf or asound.conf but I couldn't
> >>>> find a single example with DAPM widgets .
> >>> 
> >>> I am also stuck with the same problem. I am sure ALSA experts
> >>> can help here.
> >>> 
> >>> What i want to know is how to set the dapm widgets in open
> >>> embedded? Is it alsa.conf or asound.conf ?
> >>> 
> >>> I need to set something like this:
> >>> amixer cset  name="LEFT MIXER DAC" 1
> >>> 
> >>> Using amixer i am able to playback but i don't know how can i
> >>> modify conf file to have this dapm widgets associated with
> >>> a device.
> >>> 
> >>> Any example would suffice.
> > 
> > Hi,
> > 
> > The whole point of DAPM (dynamic audio power management) is that you don't
 have to manually power up or down
> a widget. Userspace configures the routing of the audio paths and the kernel 
automatically detects which
> parts of the chip need to be powered up for the current routing configuration.
> > 
> > Why do you want to manually enable a widget?
> 
> In android we have ucm files where dapm routings are associated with each
 device. Same way where can I list
> down dapm routings in open embedded?
> We know that user space gives the routings but we need to associate each 
device with certain set of dapm
> routes so i am looking for a place where we can list down dapm routes which
 gets triggered when a specific
> device is chosen for playback or recording. Something analogous to ucm files
 in open embedded? I couldn't
> find a way to associate dapm routes with a specific device in conf files.
 Can we use Asound.conf for this purpose?
> > 
> > - Lars
> > 
> 

In my  case, I do not want users to run these amixer commands to setup DAPM
routing if they just want to use aplay/arecord.

amixer cset name='LINMOD Mux' 1
amixer cset name='Left Receiver Mixer Left DAC Switch' 1
amixer cset name='Right Receiver Mixer Right DAC Switch' 1

When I run aplay without above commands, I can see aplay not able to
connect further than '"DACL" since there are multiple routes available
in codec driver. Only enabling the right DAC switches using above
commands completes routes:
Logs:
dapm_mark_dirty:max98090:dapm enter HiFi Playback
dapm_dirty_widget:max98090:dapm enter HiFi Playback
max98090 2-0010: Marking HiFi Playback dirty due to stream event
dapm_power_widgets:max98090:dapm enter
dapm_reset:max98090:dapm enter
dapm_power_one_widget:max98090:dapm enter
dapm_dac_check_power:max98090:dapm enter
dapm_generic_check_power:max98090:dapm enter
is_connected_input_ep:max98090:dapm HiFi Playback
is_connected_output_ep:max98090:dapm HiFi Playback
is_connected_output_ep:max98090:dapm AIFINL
is_connected_output_ep:max98090:dapm LTENL Mux
is_connected_output_ep:max98090:dapm DACL
is_connected_output_ep:max98090:dapm AIFINR
is_connected_output_ep:max98090:dapm LTENR Mux
is_connected_output_ep:max98090:dapm DACR
is_connected_output_ep:max98090:dapm AIFINL
is_connected_output_ep:max98090:dapm AIFINR


Available DAPM Routes:
{"Right Headphone Mixer", "Left DAC Switch", "DACL"},
{"Left Speaker Mixer", "Left DAC Switch", "DACL"},
{"Right Speaker Mixer", "Left DAC Switch", "DACL"},
{"Left Receiver Mixer", "Left DAC Switch", "DACL"},
{"Right Receiver Mixer", "Left DAC Switch", "DACL"},


I think there must be a way to enable complete DAPM routes all the
 way from "HiFi Playback" to one of the outputs defined in
SND_SOC_DAPM_OUTPUT() from userspace without having to type commands.

asound.state save states however its not dynamic. i.e, it will just reload
 settings. Won't switch between paths.

  reply	other threads:[~2015-03-25  7:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24  6:54 ASoC: Max98090 Codec DAPM Widget setup in Open Embedded noman pouigt
2015-03-24  7:26 ` Lars-Peter Clausen
2015-03-24 16:02   ` Variksla
2015-03-25  7:22     ` Omer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-03-20 22:25 C. Omer Rafique

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=loom.20150325T081642-60@post.gmane.org \
    --to=omer.job@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox