[alsa-devel] [PATCH 4/7] Asoc: sti: add CPU DAI driver for capture

Arnaud Pouliquen arnaud.pouliquen at st.com
Mon Apr 27 16:53:24 CEST 2015



On 04/24/2015 08:20 PM, Mark Brown wrote:
> On Tue, Apr 14, 2015 at 03:35:28PM +0200, Arnaud Pouliquen wrote:
>
>> +const struct snd_pcm_hardware uni_reader_pcm_hw = {
>> +	.info = (SNDRV_PCM_INFO_INTERLEAVED |
>> +		 SNDRV_PCM_INFO_BLOCK_TRANSFER |
>> +		 SNDRV_PCM_INFO_PAUSE),
> The commit message says this is a CPU DAI but a snd_pcm_hardware is a
> DMA controller.
Do you means that i should just define a structure related to DAI 
constraints
and fill snd_pcm_hardware in sti_platform.c?
>
>> +static inline int get_property_hdl(struct device *dev, struct device_node *np,
>> +				   const char *prop, int idx)
> This appears to be duplicated from the previous patch, as does a *lot*
> of the code here.  Can we not share more of the code between playback
> and capture paths?
I spitted reader and player code,because it is 2 different IPs with some 
specific features and behavior
( clock, master/slave mode, IEC, standby ...).
 From my point of view is is more clear like this, but It is feasible to 
merge both code
adding conditions on direction in most functions. Please tell me what 
you prefer.
I case of merge i suppose that the best is to not define uniperif_ops 
struct but externalize functions...





More information about the Alsa-devel mailing list