From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Guenter Roeck <groeck@google.com>
Cc: alsa-devel@alsa-project.org,
linux-kernel <linux-kernel@vger.kernel.org>,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
"Patel, Chintan M" <chintan.m.patel@intel.com>,
Guenter Roeck <groeck@chromium.org>
Subject: Re: [alsa-devel] [RFC/RFT PATCH] ASoC: topology: Improve backwards compatibility with v4 topology files
Date: Wed, 23 May 2018 22:38:03 -0500 [thread overview]
Message-ID: <ed07d060-de54-1a35-25d7-a69c6cf47f7f@linux.intel.com> (raw)
In-Reply-To: <CABXOdTdyWVtbWXR6O3VenwTezVLGvEfKuvH=Xz6e5D3np-ZQNw@mail.gmail.com>
>>> +static int skl_tplg_get_pvt_data_v4(struct snd_soc_tplg_dapm_widget
> *tplg_w,
>>> + struct skl *skl, struct device *dev,
>>> + struct skl_module_cfg *mconfig)
>>> +{
>>> + struct skl_dfw_v4_module *dfw =
>>> + (struct skl_dfw_v4_module
> *)tplg_w->priv.data;
>>> + int ret;
>>> +
>>> + dev_dbg(dev, "Parsing Skylake v4 widget topology data\n");
>>> +
>>> + ret = guid_parse(dfw->uuid, (guid_t *)mconfig->guid);
>>> + if (ret)
>>> + return ret;
>>> + mconfig->id.module_id = -1;
>>> + mconfig->id.instance_id = dfw->instance_id;
>>> + mconfig->module->resources[0].cps = dfw->max_mcps;
>>> + mconfig->module->resources[0].ibs = dfw->ibs;
>>> + mconfig->module->resources[0].obs = dfw->obs;
>>> + mconfig->core_id = dfw->core_id;
>>> + mconfig->module->max_input_pins = dfw->max_in_queue;
>>> + mconfig->module->max_output_pins = dfw->max_out_queue;
>>> + mconfig->module->loadable = dfw->is_loadable;
>>> + skl_tplg_fill_fmt_v4(mconfig->module->formats[0].inputs,
> dfw->in_fmt,
>>> + MAX_IN_QUEUE);
>>> + skl_tplg_fill_fmt_v4(mconfig->module->formats[0].outputs,
> dfw->out_fmt,
>>> + MAX_OUT_QUEUE);
>> Not clear to me if there is a confusion between MAX_IN_QUEUE and
>> MODULE_MAX_IN_PINS. The two values happen to be identical.
>
>
> The target (mconfig->module->formats[]) size is MAX_IN_QUEUE. Upstream
> v4.4/v4.5
> use both defines interchangeably as far as I can see.
>
> sound/soc/intel/skylake/skl-topology.h: struct skl_module_fmt
> in_fmt[MODULE_MAX_IN_PINS];
> sound/soc/intel/skylake/skl-tplg-interface.h: struct skl_dfw_module_fmt
> in_fmt[MAX_IN_QUEUE];
>
> I could make it
> min(MAX_IN_QUEUE, dfw->max_in_queue)
> Would that be better ?
Looks like your code was fine in the first place.
>
>>> +
>>> + mconfig->params_fixup = dfw->params_fixup;
>>> + mconfig->converter = dfw->converter;
>>> + mconfig->m_type = dfw->module_type;
>>> + mconfig->vbus_id = dfw->vbus_id;
>>> + mconfig->module->resources[0].is_pages = dfw->mem_pages;
>>> +
>>> + ret = skl_tplg_add_pipe_v4(dev, mconfig, skl, &dfw->pipe);
>>> + if (ret)
>>> + return ret;
>>> +
>>> + mconfig->dev_type = dfw->dev_type;
>>> + mconfig->hw_conn_type = dfw->hw_conn_type;
>>> + mconfig->time_slot = dfw->time_slot;
>>> + mconfig->formats_config.caps_size = dfw->caps.caps_size;
>
>> chromeos-3.18 has this:
>> if (dfw_config->is_loadable)
>> memcpy(mconfig->guid, dfw_config->uuid,
>> ARRAY_SIZE(dfw_config->uuid));
>
>> Is this needed here?
>
>
> Direct memcpy doesn't work anymore since the uuid format is different. The
> above is replaced
> with (unconditional)
>
> ret = guid_parse(dfw->uuid, (guid_t *)mconfig->guid);
> if (ret)
> return ret;
>
> at the beginning of skl_tplg_get_pvt_data_v4(). The new code, as far as I
> can see, loads
> the uuid unconditionally if it finds SND_SOC_TPLG_TUPLE_TYPE_UUID. I wanted
> to
> be on the safe side and decided to do the same.
ok.
next prev parent reply other threads:[~2018-05-24 3:38 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-22 16:58 [RFC/RFT PATCH] ASoC: topology: Improve backwards compatibility with v4 topology files Guenter Roeck
2018-05-22 17:14 ` Mark Brown
2018-05-22 19:59 ` [alsa-devel] " Pierre-Louis Bossart
2018-05-22 21:59 ` Guenter Roeck
2018-05-23 9:49 ` Mark Brown
2018-05-23 13:15 ` Guenter Roeck
2018-05-23 8:24 ` Mark Brown
2018-05-23 13:42 ` Pierre-Louis Bossart
2018-05-23 13:56 ` [alsa-devel] " Takashi Iwai
2018-05-23 14:49 ` Guenter Roeck
2018-05-23 14:58 ` Takashi Iwai
2018-05-23 15:52 ` [alsa-devel] " Mark Brown
2018-05-23 13:54 ` Takashi Iwai
2018-05-23 13:56 ` Mark Brown
2018-05-23 15:54 ` Guenter Roeck
2018-05-23 15:58 ` Mark Brown
2018-05-23 16:17 ` Guenter Roeck
2018-05-24 9:52 ` Takashi Iwai
2018-05-24 14:18 ` Mark Brown
2018-05-24 14:55 ` Guenter Roeck
2018-05-24 15:11 ` Mark Brown
2018-05-25 9:04 ` [alsa-devel] " Lin, Mengdong
2018-05-25 13:20 ` Guenter Roeck
2018-05-23 16:29 ` Guenter Roeck
2018-05-23 20:28 ` [alsa-devel] " Pierre-Louis Bossart
2018-05-23 21:22 ` Guenter Roeck
2018-05-24 3:38 ` Pierre-Louis Bossart [this message]
2018-05-25 13:40 ` Shreyas NC
2018-05-25 14:09 ` Guenter Roeck
2018-05-25 17:41 ` Guenter Roeck
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=ed07d060-de54-1a35-25d7-a69c6cf47f7f@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=chintan.m.patel@intel.com \
--cc=groeck@chromium.org \
--cc=groeck@google.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).