From: Jerome Brunet <jbrunet@baylibre.com> To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>, Kevin Hilman <khilman@baylibre.com> Cc: Jerome Brunet <jbrunet@baylibre.com>, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org Subject: [PATCH v2 0/6] ASoC: improve codec to codec link support Date: Thu, 25 Jul 2019 18:59:43 +0200 [thread overview] Message-ID: <20190725165949.29699-1-jbrunet@baylibre.com> (raw) As explained in this previous series [0], on Amlogic, we are using codec to codec links to deal with the glue which is between the i2s backends and the synopsys hdmi controller. This worked well until I tried to .get_eld() support in the dw-hdmi-i2s driver. Doing so adds channel mapping controls to the codec. This shown several problem 1) .pcm_new() is not called on codec to codec links. struct snd_soc_pcm_runtime do not even have a valid .pcm 2) struct snd_pcm_substream and struct snd_pcm_runtime are ephemeral This is a problem if a control needs to access them The goal of this patchset is to resolve the above issues and improve the codec to codec link support enough to correctly handle the hdmi-codec The support of these codec to codec links could probably be improved in the future to behave like any other link and use soc_pcm_open(), soc_pcm_hw_params(), etc... The challenge lies in the dapm mutex. The soc_pcm call dapm function locking this mutex but the dapm mutex is already held in snd_soc_dai_link_event() Changes since v1 [1]: * Fix rebase on Murimoto-san's patches * Allocate params dynamically again and refactor the pre_pmu code to simplify the error handling and rollback a bit [0]: https://lkml.kernel.org/r/20190515131858.32130-1-jbrunet@baylibre.com [1]: https://lkml.kernel.org/r/20190724162405.6574-1-jbrunet@baylibre.com Jerome Brunet (6): ASoC: codec2codec: run callbacks in order ASoC: codec2codec: name link using stream direction ASoC: codec2codec: deal with params when necessary ASoC: create pcm for codec2codec links as well ASoC: codec2codec: remove ephemeral variables ASoC: codec2codec: fill some of the runtime stream parameters sound/soc/soc-core.c | 42 +++------ sound/soc/soc-dapm.c | 220 +++++++++++++++++++++++++++---------------- sound/soc/soc-pcm.c | 35 ++++++- 3 files changed, 182 insertions(+), 115 deletions(-) -- 2.21.0
WARNING: multiple messages have this Message-ID (diff)
From: Jerome Brunet <jbrunet@baylibre.com> To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>, Kevin Hilman <khilman@baylibre.com> Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Jerome Brunet <jbrunet@baylibre.com> Subject: [PATCH v2 0/6] ASoC: improve codec to codec link support Date: Thu, 25 Jul 2019 18:59:43 +0200 [thread overview] Message-ID: <20190725165949.29699-1-jbrunet@baylibre.com> (raw) As explained in this previous series [0], on Amlogic, we are using codec to codec links to deal with the glue which is between the i2s backends and the synopsys hdmi controller. This worked well until I tried to .get_eld() support in the dw-hdmi-i2s driver. Doing so adds channel mapping controls to the codec. This shown several problem 1) .pcm_new() is not called on codec to codec links. struct snd_soc_pcm_runtime do not even have a valid .pcm 2) struct snd_pcm_substream and struct snd_pcm_runtime are ephemeral This is a problem if a control needs to access them The goal of this patchset is to resolve the above issues and improve the codec to codec link support enough to correctly handle the hdmi-codec The support of these codec to codec links could probably be improved in the future to behave like any other link and use soc_pcm_open(), soc_pcm_hw_params(), etc... The challenge lies in the dapm mutex. The soc_pcm call dapm function locking this mutex but the dapm mutex is already held in snd_soc_dai_link_event() Changes since v1 [1]: * Fix rebase on Murimoto-san's patches * Allocate params dynamically again and refactor the pre_pmu code to simplify the error handling and rollback a bit [0]: https://lkml.kernel.org/r/20190515131858.32130-1-jbrunet@baylibre.com [1]: https://lkml.kernel.org/r/20190724162405.6574-1-jbrunet@baylibre.com Jerome Brunet (6): ASoC: codec2codec: run callbacks in order ASoC: codec2codec: name link using stream direction ASoC: codec2codec: deal with params when necessary ASoC: create pcm for codec2codec links as well ASoC: codec2codec: remove ephemeral variables ASoC: codec2codec: fill some of the runtime stream parameters sound/soc/soc-core.c | 42 +++------ sound/soc/soc-dapm.c | 220 +++++++++++++++++++++++++++---------------- sound/soc/soc-pcm.c | 35 ++++++- 3 files changed, 182 insertions(+), 115 deletions(-) -- 2.21.0 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic
next reply other threads:[~2019-07-25 16:59 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-25 16:59 Jerome Brunet [this message] 2019-07-25 16:59 ` [PATCH v2 0/6] ASoC: improve codec to codec link support Jerome Brunet 2019-07-25 16:59 ` [PATCH v2 1/6] ASoC: codec2codec: run callbacks in order Jerome Brunet 2019-07-25 16:59 ` Jerome Brunet 2019-07-25 17:43 ` Applied "ASoC: codec2codec: run callbacks in order" to the asoc tree Mark Brown 2019-07-25 17:43 ` Mark Brown 2019-07-25 17:43 ` Mark Brown 2019-07-25 16:59 ` [PATCH v2 2/6] ASoC: codec2codec: name link using stream direction Jerome Brunet 2019-07-25 16:59 ` Jerome Brunet 2019-07-25 17:43 ` Applied "ASoC: codec2codec: name link using stream direction" to the asoc tree Mark Brown 2019-07-25 17:43 ` Mark Brown 2019-07-25 17:43 ` Mark Brown 2019-07-25 16:59 ` [PATCH v2 3/6] ASoC: codec2codec: deal with params when necessary Jerome Brunet 2019-07-25 16:59 ` Jerome Brunet 2019-07-25 17:43 ` Applied "ASoC: codec2codec: deal with params when necessary" to the asoc tree Mark Brown 2019-07-25 17:43 ` Mark Brown 2019-07-25 17:43 ` Mark Brown 2019-07-25 16:59 ` [PATCH v2 4/6] ASoC: create pcm for codec2codec links as well Jerome Brunet 2019-07-25 16:59 ` Jerome Brunet 2019-08-01 13:10 ` Applied "ASoC: create pcm for codec2codec links as well" to the asoc tree Mark Brown 2019-08-01 13:10 ` Mark Brown 2019-08-01 13:10 ` Mark Brown 2019-07-25 16:59 ` [PATCH v2 5/6] ASoC: codec2codec: remove ephemeral variables Jerome Brunet 2019-07-25 16:59 ` Jerome Brunet 2019-08-01 13:10 ` Applied "ASoC: codec2codec: remove ephemeral variables" to the asoc tree Mark Brown 2019-08-01 13:10 ` Mark Brown 2019-08-01 13:10 ` Mark Brown 2019-07-25 16:59 ` [PATCH v2 6/6] ASoC: codec2codec: fill some of the runtime stream parameters Jerome Brunet 2019-07-25 16:59 ` Jerome Brunet 2019-08-01 13:10 ` Applied "ASoC: codec2codec: fill some of the runtime stream parameters" to the asoc tree Mark Brown 2019-08-01 13:10 ` Mark Brown 2019-08-01 13:10 ` Mark Brown
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=20190725165949.29699-1-jbrunet@baylibre.com \ --to=jbrunet@baylibre.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=devicetree@vger.kernel.org \ --cc=khilman@baylibre.com \ --cc=lgirdwood@gmail.com \ --cc=linux-amlogic@lists.infradead.org \ --cc=linux-kernel@vger.kernel.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.