* [PATCH 1/2] ASoC: n810: Consistently pass the card DAPM context to n810_ext_control() @ 2015-04-11 8:47 Lars-Peter Clausen 2015-04-11 8:47 ` [PATCH 2/2] ASoC: n810: Automatically disconnect non-connected pins Lars-Peter Clausen 2015-04-12 11:45 ` [PATCH 1/2] ASoC: n810: Consistently pass the card DAPM context to n810_ext_control() Mark Brown 0 siblings, 2 replies; 4+ messages in thread From: Lars-Peter Clausen @ 2015-04-11 8:47 UTC (permalink / raw) To: Mark Brown, Liam Girdwood Cc: Peter Ujfalusi, alsa-devel, Lars-Peter Clausen, Jarkko Nikula Some callers of n810_ext_control() pass the card DAPM context and some pass the CODEC DAPM context. Given that some of the widgets that are accessed in the function are in the card's context, always passing it is the obvious choice. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> --- sound/soc/omap/n810.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 5d7f9ce..617eae3 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c @@ -98,12 +98,11 @@ static int n810_startup(struct snd_pcm_substream *substream) { struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_codec *codec = rtd->codec; snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2); - n810_ext_control(&codec->dapm); + n810_ext_control(&rtd->card->dapm); return clk_prepare_enable(sys_clkout2); } -- 1.8.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ASoC: n810: Automatically disconnect non-connected pins 2015-04-11 8:47 [PATCH 1/2] ASoC: n810: Consistently pass the card DAPM context to n810_ext_control() Lars-Peter Clausen @ 2015-04-11 8:47 ` Lars-Peter Clausen 2015-04-12 8:52 ` Jarkko Nikula 2015-04-12 11:45 ` [PATCH 1/2] ASoC: n810: Consistently pass the card DAPM context to n810_ext_control() Mark Brown 1 sibling, 1 reply; 4+ messages in thread From: Lars-Peter Clausen @ 2015-04-11 8:47 UTC (permalink / raw) To: Mark Brown, Liam Girdwood Cc: Peter Ujfalusi, alsa-devel, Lars-Peter Clausen, Jarkko Nikula All CODEC input and output widgets are either in the DAPM routing table or manually marked as non-connected. This means the card is fully routed and we can let the core take care of disconnecting non-connected pins. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> --- sound/soc/omap/n810.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 617eae3..dcb5336 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c @@ -254,24 +254,6 @@ static const struct snd_kcontrol_new aic33_n810_controls[] = { n810_get_input, n810_set_input), }; -static int n810_aic33_init(struct snd_soc_pcm_runtime *rtd) -{ - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_dapm_context *dapm = &codec->dapm; - - /* Not connected */ - snd_soc_dapm_nc_pin(dapm, "MONO_LOUT"); - snd_soc_dapm_nc_pin(dapm, "HPLCOM"); - snd_soc_dapm_nc_pin(dapm, "HPRCOM"); - snd_soc_dapm_nc_pin(dapm, "MIC3L"); - snd_soc_dapm_nc_pin(dapm, "MIC3R"); - snd_soc_dapm_nc_pin(dapm, "LINE1R"); - snd_soc_dapm_nc_pin(dapm, "LINE2L"); - snd_soc_dapm_nc_pin(dapm, "LINE2R"); - - return 0; -} - /* Digital audio interface glue - connects codec <--> CPU */ static struct snd_soc_dai_link n810_dai = { .name = "TLV320AIC33", @@ -282,7 +264,6 @@ static struct snd_soc_dai_link n810_dai = { .codec_dai_name = "tlv320aic3x-hifi", .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM, - .init = n810_aic33_init, .ops = &n810_ops, }; @@ -299,6 +280,7 @@ static struct snd_soc_card snd_soc_n810 = { .num_dapm_widgets = ARRAY_SIZE(aic33_dapm_widgets), .dapm_routes = audio_map, .num_dapm_routes = ARRAY_SIZE(audio_map), + .fully_routed = true, }; static struct platform_device *n810_snd_device; -- 1.8.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] ASoC: n810: Automatically disconnect non-connected pins 2015-04-11 8:47 ` [PATCH 2/2] ASoC: n810: Automatically disconnect non-connected pins Lars-Peter Clausen @ 2015-04-12 8:52 ` Jarkko Nikula 0 siblings, 0 replies; 4+ messages in thread From: Jarkko Nikula @ 2015-04-12 8:52 UTC (permalink / raw) To: Lars-Peter Clausen, Mark Brown, Liam Girdwood; +Cc: Peter Ujfalusi, alsa-devel On 04/11/2015 11:47 AM, Lars-Peter Clausen wrote: > All CODEC input and output widgets are either in the DAPM routing table or > manually marked as non-connected. This means the card is fully routed and we > can let the core take care of disconnecting non-connected pins. > > Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> > --- > sound/soc/omap/n810.c | 20 +------------------- > 1 file changed, 1 insertion(+), 19 deletions(-) > Both, Jarkko Nikula <jarkko.nikula@bitmer.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ASoC: n810: Consistently pass the card DAPM context to n810_ext_control() 2015-04-11 8:47 [PATCH 1/2] ASoC: n810: Consistently pass the card DAPM context to n810_ext_control() Lars-Peter Clausen 2015-04-11 8:47 ` [PATCH 2/2] ASoC: n810: Automatically disconnect non-connected pins Lars-Peter Clausen @ 2015-04-12 11:45 ` Mark Brown 1 sibling, 0 replies; 4+ messages in thread From: Mark Brown @ 2015-04-12 11:45 UTC (permalink / raw) To: Lars-Peter Clausen Cc: Peter Ujfalusi, alsa-devel, Liam Girdwood, Jarkko Nikula [-- Attachment #1.1: Type: text/plain, Size: 332 bytes --] On Sat, Apr 11, 2015 at 10:47:57AM +0200, Lars-Peter Clausen wrote: > Some callers of n810_ext_control() pass the card DAPM context and some pass > the CODEC DAPM context. Given that some of the widgets that are accessed in > the function are in the card's context, always passing it is the obvious > choice. Applied both, thanks. [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 473 bytes --] [-- Attachment #2: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-12 11:45 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-04-11 8:47 [PATCH 1/2] ASoC: n810: Consistently pass the card DAPM context to n810_ext_control() Lars-Peter Clausen 2015-04-11 8:47 ` [PATCH 2/2] ASoC: n810: Automatically disconnect non-connected pins Lars-Peter Clausen 2015-04-12 8:52 ` Jarkko Nikula 2015-04-12 11:45 ` [PATCH 1/2] ASoC: n810: Consistently pass the card DAPM context to n810_ext_control() 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.