[alsa-devel] [PATCH 08/12] ASoC: SOF: Generic probe compress operations

Cezary Rojewski cezary.rojewski at intel.com
Mon Jan 27 13:28:03 CET 2020


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


More information about the Alsa-devel mailing list