From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [Sound-open-firmware] [PATCH v4 02/14] ASoC: SOF: Add Sound Open Firmware KControl support Date: Thu, 14 Feb 2019 16:21:06 +0100 Message-ID: References: <20190213220734.10471-1-pierre-louis.bossart@linux.intel.com> <20190213220734.10471-3-pierre-louis.bossart@linux.intel.com> <6a16955e-7095-4dfb-b4ac-9dcd8d4fc995@linux.intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <6a16955e-7095-4dfb-b4ac-9dcd8d4fc995@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Pierre-Louis Bossart Cc: Daniel Baluta , andriy.shevchenko@intel.com, alsa-devel@alsa-project.org, liam.r.girdwood@linux.intel.com, vkoul@kernel.org, broonie@kernel.org, sound-open-firmware@alsa-project.org, Alan Cox List-Id: alsa-devel@alsa-project.org On Thu, 14 Feb 2019 15:35:48 +0100, Pierre-Louis Bossart wrote: > > On 2/14/19 3:30 AM, Takashi Iwai wrote: > > On Wed, 13 Feb 2019 23:07:22 +0100, > > Pierre-Louis Bossart wrote: > >> > >> +int snd_sof_bytes_ext_put(struct snd_kcontrol *kcontrol, > >> + const unsigned int __user *binary_data, > >> + unsigned int size) > >> +{ > >> + struct soc_bytes_ext *be = > >> + (struct soc_bytes_ext *)kcontrol->private_value; > >> + struct snd_sof_control *scontrol = be->dobj.private; > >> + struct snd_sof_dev *sdev = scontrol->sdev; > >> + struct sof_ipc_ctrl_data *cdata = scontrol->control_data; > >> + struct snd_ctl_tlv header; > >> + const struct snd_ctl_tlv __user *tlvd = > >> + (const struct snd_ctl_tlv __user *)binary_data; > > .... > > > > Do we keep supporting TLV-typed ext access in SOF? > > This seems to be disliked nowadays (since it's a sort of abuse of TLV > > API), and we agreed for dropping / reducing it. > > I started working on a replacement of the TLV w/ the hw-dep and showed > it could be introduced fairly easily in the topology with minor > changes to the kernel interfaces. > > https://github.com/plbossart/sound/commits/proto/hwdep > https://github.com/plbossart/alsa-lib/tree/proto/hwdep > > However the big open is linking this hw-dep element in DAPM, so that > it's handled in the same way as existing controls - specifically that > the state is restored on resume. That part looked really invasive and > complicated. I was even tempted to consider flipping the approach and > define a new control that would expose a hw-dep interface to reuse a > lot of the DAPM integration. > > In short, we know the TLV is not the path forward, and as soon as we > have a replacement we'll switch. For now we have no alternative. OK, then let's add some comments that this interface is subject to change / drop in future. thanks, Takashi