mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jiaxin Yu (俞家鑫)" <Jiaxin.Yu@mediatek.com>
To: "broonie@kernel.org" <broonie@kernel.org>
Cc: "linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Chunxu Li (李春旭)" <Chunxu.Li@mediatek.com>,
	"ajye_huang@compal.corp-partner.google.com"
	<ajye_huang@compal.corp-partner.google.com>,
	"Allen-KH Cheng (程冠勲)" <Allen-KH.Cheng@mediatek.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"kuninori.morimoto.gx@renesas.com"
	<kuninori.morimoto.gx@renesas.com>,
	"andrzej.hajda@intel.com" <andrzej.hajda@intel.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"robert.foss@linaro.org" <robert.foss@linaro.org>,
	"Laurent.pinchart@ideasonboard.com"
	<Laurent.pinchart@ideasonboard.com>,
	"neil.armstrong@linaro.org" <neil.armstrong@linaro.org>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>,
	"nfraprado@collabora.com" <nfraprado@collabora.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [v3 2/3] ASoC: mediatek: mt8186: correct the HDMI widgets
Date: Wed, 2 Aug 2023 14:52:57 +0000	[thread overview]
Message-ID: <c6ae8630d06138b6d0156c19323afebf0718f522.camel@mediatek.com> (raw)
In-Reply-To: <25e6ab45-ecad-4bc3-bf4d-983243c939ad@sirena.org.uk>

On Mon, 2023-07-31 at 12:50 +0100, Mark Brown wrote:
> On Mon, Jul 31, 2023 at 02:08:02AM +0800, Jiaxin Yu wrote:
> 
> > Use SND_SOC_DAPM_LINE instead of SND_SOC_DAPM_OUTPUT to trigger
> > DAPM events to hdmi-codec when userspace control the DPAM pin.
> 
> Why?

I have defined an SOC_DAPM_PIN_SWITCH that named as "HDMI1", if I use
SND_SOC_DAPM_OUTPUT, it can't be controlled by HDMI1's PIN_SWITCH.

 994 static const struct snd_kcontrol_new
 995 mt8186_mt6366_da7219_max98357_controls[] = {
 996         SOC_DAPM_PIN_SWITCH("Speakers"),
 997         SOC_DAPM_PIN_SWITCH("Headphones"),
 998         SOC_DAPM_PIN_SWITCH("Headset Mic"),
 999         SOC_DAPM_PIN_SWITCH("HDMI1"),

I think SND_SOC_DAPM_OUTPUT must be judged as ep, so I want to define
HDMI1 as a snd_soc_dapm_spk's widget.
From the perspective of hardware connection, their relationship is
indeed equal, so I find SOC_SOC_DAPM_LINE to define HDMI1.


                       ==> hdmi-codec ==> it6505(HDMI output)
DL1(FE) ==> I2S3(BE)
                       ==> rt1015p(SPEAKER output)

2738 static void dapm_update_widget_flags(struct snd_soc_dapm_widget
*w)
2739 {
2740         enum snd_soc_dapm_direction dir;
2741         struct snd_soc_dapm_path *p;
2742         unsigned int ep;
2743         ...
2760         case snd_soc_dapm_output:
2761                 /* On a fully routed card a output is never a sink
*/
2762                 if (w->dapm->card->fully_routed)
2763                         return;
2764                 ep = SND_SOC_DAPM_EP_SINK;
2765                 snd_soc_dapm_widget_for_each_sink_path(w, p) {
2766                         if (p->sink->id == snd_soc_dapm_spk ||
2767                                 p->sink->id == snd_soc_dapm_hp ||
2768                                 p->sink->id == snd_soc_dapm_line
||
2769                                 p->sink->id == snd_soc_dapm_input)
{
2770                                         ep = 0;
2771                                         break;
2772                         }
2773                 }
2774                 break;

  reply	other threads:[~2023-08-02 14:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-30 18:08 [v3 0/3] ASoC: mediatek:mt8186: fix both the speaker and hdmi Jiaxin Yu
2023-07-30 18:08 ` [v3 1/3] ASoC: hdmi-codec: Add event handler for hdmi TX Jiaxin Yu
2023-07-30 18:08 ` [v3 2/3] ASoC: mediatek: mt8186: correct the HDMI widgets Jiaxin Yu
2023-07-31 11:50   ` Mark Brown
2023-08-02 14:52     ` Jiaxin Yu (俞家鑫) [this message]
2023-08-02 16:38       ` Mark Brown
2023-08-03  7:20         ` Jiaxin Yu (俞家鑫)
2023-08-03 19:33           ` Mark Brown
2024-01-31 11:42             ` AngeloGioacchino Del Regno
2024-01-31 12:25               ` Jiaxin Yu (俞家鑫)
2024-01-31 12:37                 ` AngeloGioacchino Del Regno
2023-07-30 18:08 ` [v3 3/3] drm/bridge: it6505: Add audio support Jiaxin Yu
2023-11-21 12:54   ` AngeloGioacchino Del Regno
2023-11-28  3:17     ` Chen-Yu Tsai

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=c6ae8630d06138b6d0156c19323afebf0718f522.camel@mediatek.com \
    --to=jiaxin.yu@mediatek.com \
    --cc=Allen-KH.Cheng@mediatek.com \
    --cc=Chunxu.Li@mediatek.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=ajye_huang@compal.corp-partner.google.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andrzej.hajda@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nfraprado@collabora.com \
    --cc=robert.foss@linaro.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

all inboxes | Powered by JetHome®