lkml.org 
[lkml]   [2020]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 8/8] ASoC: qcom: apq8096: add kcontrols to set PCM rate
On 2020-02-10 11:18, Jaroslav Kysela wrote:
> Dne 09. 02. 20 v 16:47 Adam Serbinski napsal(a):
>> This makes it possible for the backend sample rate to be
>> set to 8000 or 16000 Hz, depending on the needs of the HFP
>> call being set up.
>
> Two points:
>
> Why enum? It adds just more code than the integer value handlers.

Because enum allows the potential values to be restricted to a set of
distinct values rather than a range. And while yes, I understand that
the value can be validated, or the step can in this case be set to
correspond to the difference between the current 2 values, this approach
would neither make it clear to the user what the permitted values are,
nor would it scale well once additional values are required.


> Also, this belongs to the PCM interface, so it should be handled with
> SNDRV_CTL_ELEM_IFACE_PCM not mixer.
>
> The name should be probably "Rate" and assigned to the corresponding
> PCM device.
>
> Add this to Documentation/sound/designs/control-names.rst .

Above 3 lines are noted, I will make these changed.

\
 
 \ /
  Last update: 2020-02-10 18:14    [W:0.081 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site