Re: [PATCH 08/12] ASoC: SOF: Generic probe compress operations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux