lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b44319c9fabbea2e8c333191a0005ef5c4ec6b2c.camel@mediatek.com>
Date: Fri, 6 Dec 2024 15:39:15 +0000
From: Jiaxin Yu (俞家鑫) <Jiaxin.Yu@...iatek.com>
To: "broonie@...nel.org" <broonie@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>,
	"ajye_huang@...pal.corp-partner.google.com"
	<ajye_huang@...pal.corp-partner.google.com>,
	Chunxu Li (李春旭) <Chunxu.Li@...iatek.com>,
	Allen-KH Cheng (程冠勲)
	<Allen-KH.Cheng@...iatek.com>, "dri-devel@...ts.freedesktop.org"
	<dri-devel@...ts.freedesktop.org>, "kuninori.morimoto.gx@...esas.com"
	<kuninori.morimoto.gx@...esas.com>, "andrzej.hajda@...el.com"
	<andrzej.hajda@...el.com>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@...iatek.com>, "robert.foss@...aro.org"
	<robert.foss@...aro.org>, "Laurent.pinchart@...asonboard.com"
	<Laurent.pinchart@...asonboard.com>, "neil.armstrong@...aro.org"
	<neil.armstrong@...aro.org>, AngeloGioacchino Del Regno
	<angelogioacchino.delregno@...labora.com>, Nicolas Prado
	<nfraprado@...labora.com>, "alsa-devel@...a-project.org"
	<alsa-devel@...a-project.org>
Subject: Re: [PATCH v2 1/3] ASoC: hdmi-codec: Add event handler for hdmi TX

On Mon, 2024-12-02 at 13:16 +0000, Mark Brown wrote:
> On Sun, Dec 01, 2024 at 05:15:45PM +0000, Jiaxin Yu (俞家鑫) wrote:
> 
> > So I want to ask if I can do it by just adding
> > SOC_DAPM_PIN_SWITCH("Speakers") and SOC_DAPM_PIN_SWITCH("HDMI")?
> > Correspondingly, dapm widget and route path need to be added. That
> > is
> > "SND_SOC_DAPM_SPK("Speakers", NULL)/ SND_SOC_DAPM_LINE("HDMI1",
> > NULL)"
> > and "{"Speakers", NULL, "Speaker"}/ {"HDMI1", NULL, "TX"}".
> 
> Yes, that's what I'd expect to see.

Dear Mark,

So if I open the "HDMI Switch" amixer control, it will call
'hdmi_codec_startup', which in turn calls "audio_startup()"  in
'hdmi_codec_ops'. Conversely, if I close it, it will call
'hdmi_codec_shutdown', which in turn calls 'audio_shutdown' in
'hdmi_codec_ops'. Is this understanding correct?

static const struct snd_soc_dai_ops hdmi_codec_i2s_dai_ops = {
        .probe                          = hdmi_dai_probe,
        .startup                        = hdmi_codec_startup,
        .shutdown                       = hdmi_codec_shutdown,
        .hw_params                      = hdmi_codec_hw_params,
        .prepare                        = hdmi_codec_prepare,
        .set_fmt                        = hdmi_codec_i2s_set_fmt,
        .mute_stream                    = hdmi_codec_mute,
        .pcm_new                        = hdmi_codec_pcm_new,
        .auto_selectable_formats        = &hdmi_codec_formats,
        .num_auto_selectable_formats    = 1,
};

 struct hdmi_codec_ops {
         /*
          * Called when ASoC starts an audio stream setup.
          * Optional
          */
         int (*audio_startup)(struct device *dev, void *data);


         /*
          * Shuts down the audio stream.
          * Mandatory
          */
         void (*audio_shutdown)(struct device *dev, void *data);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ