mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	alsa-devel@alsa-project.org
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
	tiwai@suse.de, Jie Yang <yang.jie@linux.intel.com>,
	Takashi Iwai <tiwai@suse.com>, Mac Chiang <mac.chiang@intel.com>,
	srinivas.kandagatla@linaro.org, jank@cadence.com,
	Amery Song <chao.song@intel.com>,
	Bard liao <yung-chuan.liao@linux.intel.com>,
	Pan Xiuli <xiuli.pan@linux.intel.com>,
	Hui Wang <hui.wang@canonical.com>,
	Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
	Rander Wang <rander.wang@linux.intel.com>,
	slawomir.blauciak@intel.com, broonie@kernel.org,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
	Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>,
	Naveen Manohar <naveen.m@intel.com>,
	gregkh@linuxfoundation.org, Liam Girdwood <lgirdwood@gmail.com>,
	linux-kernel@vger.kernel.org, vkoul@kernel.org,
	Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Subject: Re: [PATCH 01/10] ASoC: soc-acpi: expand description of _ADR-based devices
Date: Fri, 13 Mar 2020 09:09:04 +0100	[thread overview]
Message-ID: <6ea77c3e-2333-2876-7fa1-ea8a2a6f35e4@linux.intel.com> (raw)
In-Reply-To: <20200312193346.3264-2-pierre-louis.bossart@linux.intel.com>



On 3/12/2020 8:33 PM, Pierre-Louis Bossart wrote:
> For SoundWire, we need to know if endpoints needs to be 'aggregated'
> (MIPI parlance, meaning logically grouped), e.g. when two speaker
> amplifiers need to be handled as a single logical output.
> 
> We don't necessarily have the information at the firmware (BIOS)
> level, so add a notion of endpoints and specify if a device/endpoint
> is part of a group, with a position.
> 
> This may be expanded in future solutions, for now only provide a group
> and position information.
> 
> Since we modify the header file, change all existing upstream tables
> as well to avoid breaking compilation/bisect.
> 
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
>   include/sound/soc-acpi.h                      | 39 ++++++--
>   .../intel/common/soc-acpi-intel-cml-match.c   | 87 +++++++++++++----
>   .../intel/common/soc-acpi-intel-icl-match.c   | 97 +++++++++++++++----
>   .../intel/common/soc-acpi-intel-tgl-match.c   | 49 ++++++++--
>   4 files changed, 221 insertions(+), 51 deletions(-)
> 

(...)

> diff --git a/sound/soc/intel/common/soc-acpi-intel-icl-match.c b/sound/soc/intel/common/soc-acpi-intel-icl-match.c
> index 752733013d54..36e2d09cf58c 100644
> --- a/sound/soc/intel/common/soc-acpi-intel-icl-match.c
> +++ b/sound/soc/intel/common/soc-acpi-intel-icl-match.c
> @@ -33,55 +33,112 @@ struct snd_soc_acpi_mach snd_soc_acpi_intel_icl_machines[] = {
>   };
>   EXPORT_SYMBOL_GPL(snd_soc_acpi_intel_icl_machines);
>   
> -static const u64 rt700_0_adr[] = {
> -	0x000010025D070000
> +static const struct snd_soc_acpi_endpoint single_endpoint = {
> +	.num = 0,
> +	.aggregated = 0,
> +	.group_position = 0,
> +	.group_id = 0,
> +};
> +
> +static const struct snd_soc_acpi_endpoint spk_l_endpoint = {
> +	.num = 0,
> +	.aggregated = 1,
> +	.group_position = 0,
> +	.group_id = 1,
> +};
> +
> +static const struct snd_soc_acpi_endpoint spk_r_endpoint = {
> +	.num = 0,
> +	.aggregated = 1,
> +	.group_position = 1,
> +	.group_id = 1,
> +};
> +
> +static const struct snd_soc_acpi_adr_device rt700_0_adr[] = {
> +	{
> +		.adr = 0x000010025D070000,
> +		.num_endpoints = 1,
> +		.endpoints = &single_endpoint,
> +	}
>   };
>   
>   static const struct snd_soc_acpi_link_adr icl_rvp[] = {
>   	{
>   		.mask = BIT(0),
>   		.num_adr = ARRAY_SIZE(rt700_0_adr),
> -		.adr = rt700_0_adr,
> +		.adr_d = rt700_0_adr,
>   	},
>   	{}
>   };
>   
> -static const u64 rt711_0_adr[] = {
> -	0x000010025D071100
> +static const struct snd_soc_acpi_adr_device rt711_0_adr[] = {
> +	{
> +		.adr = 0x000010025D071100,
> +		.num_endpoints = 1,
> +		.endpoints = &single_endpoint,
> +	}
> +};
> +
> +static const struct snd_soc_acpi_adr_device rt1308_1_adr[] = {
> +	{
> +		.adr = 0x000110025D130800,
> +		.num_endpoints = 1,
> +		.endpoints = &single_endpoint,
> +	}
>   };
>   
> -static const u64 rt1308_1_adr[] = {
> -	0x000110025D130800
> +static const struct snd_soc_acpi_adr_device rt1308_2_adr[] = {
> +	{
> +		.adr = 0x000210025D130800,
> +		.num_endpoints = 1,
> +		.endpoints = &single_endpoint,
> +	}
>   };
>   
> -static const u64 rt1308_2_adr[] = {
> -	0x000210025D130800
> +static const struct snd_soc_acpi_adr_device rt1308_1_group1_adr[] = {
> +	{
> +		.adr = 0x000110025D130800,
> +		.num_endpoints = 1,
> +		.endpoints = &spk_l_endpoint,
> +	}
>   };
>   
> -static const u64 rt715_3_adr[] = {
> -	0x000310025D071500
> +static const struct snd_soc_acpi_adr_device rt1308_2_group1_adr[] = {
> +	{
> +		.adr = 0x000210025D130800,
> +		.num_endpoints = 1,
> +		.endpoints = &spk_r_endpoint,
> +	}
> +};
> +
> +static const struct snd_soc_acpi_adr_device rt715_3_adr[] = {
> +	{
> +		.adr = 0x000310025D071500,
> +		.num_endpoints = 1,
> +		.endpoints = &single_endpoint,
> +	}
>   };
>   
>   static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = {
>   	{
>   		.mask = BIT(0),
>   		.num_adr = ARRAY_SIZE(rt711_0_adr),
> -		.adr = rt711_0_adr,
> +		.adr_d = rt711_0_adr,
>   	},
>   	{
>   		.mask = BIT(1),
> -		.num_adr = ARRAY_SIZE(rt1308_1_adr),
> -		.adr = rt1308_1_adr,
> +		.num_adr = ARRAY_SIZE(rt1308_1_group1_adr),
> +		.adr_d = rt1308_1_adr,

Is this right, you use different struct in ARRAY_SIZE and assignment?

>   	},
>   	{
>   		.mask = BIT(2),
> -		.num_adr = ARRAY_SIZE(rt1308_2_adr),
> -		.adr = rt1308_2_adr,
> +		.num_adr = ARRAY_SIZE(rt1308_2_group1_adr),
> +		.adr_d = rt1308_2_adr,

Same here.

>   	},
>   	{
>   		.mask = BIT(3),
>   		.num_adr = ARRAY_SIZE(rt715_3_adr),
> -		.adr = rt715_3_adr,
> +		.adr_d = rt715_3_adr,
>   	},
>   	{}
>   };
> @@ -90,17 +147,17 @@ static const struct snd_soc_acpi_link_adr icl_3_in_1_mono_amp[] = {
>   	{
>   		.mask = BIT(0),
>   		.num_adr = ARRAY_SIZE(rt711_0_adr),
> -		.adr = rt711_0_adr,
> +		.adr_d = rt711_0_adr,
>   	},
>   	{
>   		.mask = BIT(1),
>   		.num_adr = ARRAY_SIZE(rt1308_1_adr),
> -		.adr = rt1308_1_adr,
> +		.adr_d = rt1308_1_adr,
>   	},
>   	{
>   		.mask = BIT(3),
>   		.num_adr = ARRAY_SIZE(rt715_3_adr),
> -		.adr = rt715_3_adr,
> +		.adr_d = rt715_3_adr,
>   	},
>   	{}
>   };

(...)

  reply	other threads:[~2020-03-13  8:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 19:33 [PATCH 00/10] ASoC: SOF: Intel: add SoundWire support Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 01/10] ASoC: soc-acpi: expand description of _ADR-based devices Pierre-Louis Bossart
2020-03-13  8:09   ` Amadeusz Sławiński [this message]
2020-03-13 16:21     ` Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 02/10] ASoC: SOF: Intel: add SoundWire configuration interface Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 03/10] ASoC: SOF: IPC: dai-intel: move ALH declarations in header file Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 04/10] ASoC: SOF: Intel: hda: add SoundWire stream config/free callbacks Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 05/10] ASoC: SOF: Intel: hda: initial SoundWire machine driver autodetect Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 06/10] ASoC: SOF: Intel: hda: disable SoundWire interrupts on suspend Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 07/10] ASoC: SOF: Intel: hda: merge IPC, stream and SoundWire interrupt handlers Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 08/10] ASoC: SOF: Intel: hda: add parameter to control SoundWire clock stop quirks Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 09/10] ASoC: SOF: Intel: hda: add WAKEEN interrupt support for SoundWire Pierre-Louis Bossart
2020-03-12 19:33 ` [PATCH 10/10] Asoc: SOF: Intel: hda: check SoundWire wakeen interrupt in irq thread Pierre-Louis Bossart

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=6ea77c3e-2333-2876-7fa1-ea8a2a6f35e4@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=chao.song@intel.com \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=gregkh@linuxfoundation.org \
    --cc=hui.wang@canonical.com \
    --cc=jank@cadence.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mac.chiang@intel.com \
    --cc=naveen.m@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rander.wang@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=sathya.prakash.m.r@intel.com \
    --cc=sathyanarayana.nujella@intel.com \
    --cc=slawomir.blauciak@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    --cc=vkoul@kernel.org \
    --cc=xiuli.pan@linux.intel.com \
    --cc=yang.jie@linux.intel.com \
    --cc=yung-chuan.liao@linux.intel.com \
    /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

Powered by JetHome