On 2020-01-24 21:00, Pierre-Louis Bossart wrote:
+int sof_probe_compr_open(struct snd_compr_stream *cstream, + struct snd_soc_dai *dai) +{ + struct snd_sof_dev *sdev = + snd_soc_component_get_drvdata(dai->component); + int ret;
+ ret = snd_sof_probe_compr_assign(sdev, cstream, dai); + if (ret < 0) { + dev_err(dai->dev, "Failed to assign probe stream: %d\n", ret); + return ret; + }
+ sdev->extractor = ret;
could you either rename the 'extractor' field to something meaningful or add a comment on what is stored in this field? A stream tag? a device number? It's only used once for the init.
'extractor' is _very_ meaningful and explicit so the naming should stay. Rewording to stream_tag / dev num or anything of that sort would achieve the exact opposite: ambiguity. Code around 'extractor' usage clearly states what it is for. I'd rather prefer such descriptions to stay within Documentation - which will be released on a later date as SOF's probes are very, very fresh subject.
Czarek