linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shreyas NC <shreyas.nc@intel.com>
To: Guenter Roeck <groeck@google.com>
Cc: pierre-louis.bossart@linux.intel.com,
	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: Fri, 25 May 2018 19:10:23 +0530	[thread overview]
Message-ID: <20180525134023.GJ3116@snc-desk> (raw)
In-Reply-To: <CABXOdTdyWVtbWXR6O3VenwTezVLGvEfKuvH=Xz6e5D3np-ZQNw@mail.gmail.com>

> > > +struct skl_dfw_v4_pipe {
> > > +     u8 pipe_id;
> > > +     u8 pipe_priority;
> > > +     u16 conn_type:4;
> > > +     u16 rsvd:4;
> > > +     u16 memory_pages:8;
> > > +} __packed;
> > > +
> > > +struct skl_dfw_v4_module {
> > > +     char uuid[SKL_UUID_STR_SZ];
> > > +

Any reason to not have this as u8?
commit 09305da97c7808b900985526aa9198233f32fb37 had changed this to u8..

<snip>

> > > +
> > > +     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.
> 

In the new code, still does a memcpy(). So, I am not sure if I understand
why memcpy() does not work.

        if (uuid_tkn->token == SKL_TKN_UUID) {
                memcpy(guid, &uuid_tkn->uuid, 16);
                return 0;
        }

Replied on the older mail since Pierre had a similar question as well.

--Shreyas

-- 

  parent reply	other threads:[~2018-05-25 13:42 UTC|newest]

Thread overview: 26+ 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-23  8:24   ` Mark Brown
2018-05-23 13:42     ` Pierre-Louis Bossart
2018-05-23 13:56       ` Takashi Iwai
     [not found]         ` <CABXOdTdGyfBdZUzG-DzGgfr0Afrh9dtgdXibQreOZm7nb4z3=w@mail.gmail.com>
2018-05-23 14:58           ` Takashi Iwai
2018-05-23 15:52           ` Mark Brown
     [not found]   ` <CABXOdTd5+QJHOZ6BcSO-TfJCqcLzdd+Gbnf4HYh9i9cG+UH+1g@mail.gmail.com>
2018-05-23  9:49     ` Mark Brown
2018-05-23 13:54 ` Takashi Iwai
2018-05-23 13:56   ` Mark Brown
     [not found]     ` <CABXOdTeCr-ExO9O3XAHK-DnNf5yLGO0TPkXgs60TB90jGNB2_Q@mail.gmail.com>
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
2018-05-25 13:40     ` Shreyas NC [this message]
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=20180525134023.GJ3116@snc-desk \
    --to=shreyas.nc@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=pierre-louis.bossart@linux.intel.com \
    --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).