* Default enabling of mixer controls @ 2009-06-08 12:10 Aggarwal, Anuj 2009-06-08 12:14 ` Mark Brown 0 siblings, 1 reply; 7+ messages in thread From: Aggarwal, Anuj @ 2009-06-08 12:10 UTC (permalink / raw) To: alsa-devel@alsa-project.org Hi, I want to by-default enable the following mixer controls for my platform: Analog Left Capture Route AUXL Analog Right Capture Route AUXR Right now, they both come disabled in the default configuration and I have to enable them explicitly by issuing the amixer cset command. How can I do that automatically? Thanks and Regards, Anuj Aggarwal ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Default enabling of mixer controls 2009-06-08 12:10 Default enabling of mixer controls Aggarwal, Anuj @ 2009-06-08 12:14 ` Mark Brown 2009-06-08 14:24 ` Aggarwal, Anuj 0 siblings, 1 reply; 7+ messages in thread From: Mark Brown @ 2009-06-08 12:14 UTC (permalink / raw) To: Aggarwal, Anuj; +Cc: alsa-devel@alsa-project.org On Mon, Jun 08, 2009 at 05:40:56PM +0530, Aggarwal, Anuj wrote: > Right now, they both come disabled in the default configuration and I > have to enable them explicitly by issuing the amixer cset command. How > can I do that automatically? Register writes in the DAI init function will probably do the job, however the general advice is to leave this up to user space. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Default enabling of mixer controls 2009-06-08 12:14 ` Mark Brown @ 2009-06-08 14:24 ` Aggarwal, Anuj 2009-06-08 14:39 ` Mark Brown 0 siblings, 1 reply; 7+ messages in thread From: Aggarwal, Anuj @ 2009-06-08 14:24 UTC (permalink / raw) To: Mark Brown; +Cc: alsa-devel@alsa-project.org It is not working for me. I wrote this small piece of code: static int omap3evm_twl4030_init(struct snd_soc_codec *codec) { unsigned short reg; printk (KERN_DEBUG "inside omap3evm_twl4030_init\n\n"); /* Enable Analog Left Capture Route AUXL */ reg = codec->read(codec, TWL4030_REG_ANAMICL); reg |= TWL4030_AUXL_EN; codec->write(codec, TWL4030_REG_ANAMICL, reg); /* Enable Analog Right Capture Route AUXR */ reg = codec->read(codec, TWL4030_REG_ANAMICR); reg |= TWL4030_AUXR_EN; codec->write(codec, TWL4030_REG_ANAMICR, reg); return 0; } After that, if I do a get on Analog Left Capture Route AUXL (or the other), I am seeing that it has been turned ON. However, when I try to capture, It doesn't work. I have to disable it first and then re-enable it to capture properly. Any clues? Regards, Anuj Aggarwal > -----Original Message----- > From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel-bounces@alsa- > project.org] On Behalf Of Mark Brown > Sent: Monday, June 08, 2009 5:45 PM > To: Aggarwal, Anuj > Cc: alsa-devel@alsa-project.org > Subject: Re: [alsa-devel] Default enabling of mixer controls > > On Mon, Jun 08, 2009 at 05:40:56PM +0530, Aggarwal, Anuj wrote: > > > Right now, they both come disabled in the default configuration and I > > have to enable them explicitly by issuing the amixer cset command. How > > can I do that automatically? > > Register writes in the DAI init function will probably do the job, > however the general advice is to leave this up to user space. > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Default enabling of mixer controls 2009-06-08 14:24 ` Aggarwal, Anuj @ 2009-06-08 14:39 ` Mark Brown 2009-06-09 3:45 ` Aggarwal, Anuj 0 siblings, 1 reply; 7+ messages in thread From: Mark Brown @ 2009-06-08 14:39 UTC (permalink / raw) To: Aggarwal, Anuj; +Cc: alsa-devel@alsa-project.org On Mon, Jun 08, 2009 at 07:54:00PM +0530, Aggarwal, Anuj wrote: > /* Enable Analog Left Capture Route AUXL */ > reg = codec->read(codec, TWL4030_REG_ANAMICL); > reg |= TWL4030_AUXL_EN; > codec->write(codec, TWL4030_REG_ANAMICL, reg); > After that, if I do a get on Analog Left Capture Route AUXL (or the other), > I am seeing that it has been turned ON. However, when I try to capture, > It doesn't work. I have to disable it first and then re-enable it to > capture properly. Hrm, you'll be missing some internal DAPM state updates. Currently the most direct way to do that would be to go through the actual control interface and there's not a particularly nice way of doing that that from the kernel that I'm aware of. Is this not something you can have user space do? ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Default enabling of mixer controls 2009-06-08 14:39 ` Mark Brown @ 2009-06-09 3:45 ` Aggarwal, Anuj 2009-06-09 6:57 ` Peter Ujfalusi 0 siblings, 1 reply; 7+ messages in thread From: Aggarwal, Anuj @ 2009-06-09 3:45 UTC (permalink / raw) To: Mark Brown; +Cc: alsa-devel@alsa-project.org > -----Original Message----- > From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com] > Sent: Monday, June 08, 2009 8:09 PM > To: Aggarwal, Anuj > Cc: alsa-devel@alsa-project.org > Subject: Re: [alsa-devel] Default enabling of mixer controls > > On Mon, Jun 08, 2009 at 07:54:00PM +0530, Aggarwal, Anuj wrote: > > > /* Enable Analog Left Capture Route AUXL */ > > reg = codec->read(codec, TWL4030_REG_ANAMICL); > > reg |= TWL4030_AUXL_EN; > > codec->write(codec, TWL4030_REG_ANAMICL, reg); > > > After that, if I do a get on Analog Left Capture Route AUXL (or the > other), > > I am seeing that it has been turned ON. However, when I try to capture, > > It doesn't work. I have to disable it first and then re-enable it to > > capture properly. > > Hrm, you'll be missing some internal DAPM state updates. Currently the > most direct way to do that would be to go through the actual control > interface and there's not a particularly nice way of doing that that > from the kernel that I'm aware of. > > Is this not something you can have user space do? [Aggarwal, Anuj] Since this was by default enabled in my earlier codec driver, I wanted to make the change transparent to the end user. However, since the same can be done from user space too, it should not be a problem for my customer. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Default enabling of mixer controls 2009-06-09 3:45 ` Aggarwal, Anuj @ 2009-06-09 6:57 ` Peter Ujfalusi 2009-06-09 8:54 ` Mark Brown 0 siblings, 1 reply; 7+ messages in thread From: Peter Ujfalusi @ 2009-06-09 6:57 UTC (permalink / raw) To: alsa-devel; +Cc: ext Aggarwal, Anuj, Mark Brown On Tuesday 09 June 2009 06:45:24 ext Aggarwal, Anuj wrote: > > Hrm, you'll be missing some internal DAPM state updates. Currently the > > most direct way to do that would be to go through the actual control > > interface and there's not a particularly nice way of doing that that > > from the kernel that I'm aware of. Should the snd_soc_dapm_sync(codec); need to be called after the register updates? > > > > Is this not something you can have user space do? > > [Aggarwal, Anuj] Since this was by default enabled in my earlier codec > driver, I wanted to make the change transparent to the end user. However, > since the same can be done from user space too, it should not be a problem > for my customer. I think this should be done by the user space as well. I have had plans to disable all paths by default on the twl4030 codec, and let the user space to configure for the given board. At least that is what we are doing in our custom board. > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel -- Péter ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Default enabling of mixer controls 2009-06-09 6:57 ` Peter Ujfalusi @ 2009-06-09 8:54 ` Mark Brown 0 siblings, 0 replies; 7+ messages in thread From: Mark Brown @ 2009-06-09 8:54 UTC (permalink / raw) To: Peter Ujfalusi; +Cc: ext Aggarwal, Anuj, alsa-devel On Tue, Jun 09, 2009 at 09:57:39AM +0300, Peter Ujfalusi wrote: > On Tuesday 09 June 2009 06:45:24 ext Aggarwal, Anuj wrote: > > > Hrm, you'll be missing some internal DAPM state updates. Currently the > > > most direct way to do that would be to go through the actual control > > > interface and there's not a particularly nice way of doing that that > > > from the kernel that I'm aware of. > Should the snd_soc_dapm_sync(codec); need to be called after the register > updates? The equivalent thing will happen when the capture starts so I'd not expect that to help. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-06-09 8:54 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-06-08 12:10 Default enabling of mixer controls Aggarwal, Anuj 2009-06-08 12:14 ` Mark Brown 2009-06-08 14:24 ` Aggarwal, Anuj 2009-06-08 14:39 ` Mark Brown 2009-06-09 3:45 ` Aggarwal, Anuj 2009-06-09 6:57 ` Peter Ujfalusi 2009-06-09 8:54 ` Mark Brown
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.