[alsa-devel] [Sound-open-firmware] [PATCH v4 02/14] ASoC: SOF: Add Sound Open Firmware KControl support
Takashi Iwai
tiwai at suse.de
Thu Feb 14 16:21:06 CET 2019
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
More information about the Alsa-devel
mailing list