@@ -156,7 +156,7 @@ static void comp_buffer_free(struct sof_audio_buffer *audio_buffer)
156156
157157 struct mod_alloc_ctx * alloc = buffer -> audio_buffer .alloc ;
158158
159- #ifdef CONFIG_SOF_USERSPACE_LL
159+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
160160 assert (alloc );
161161 sof_ctx_free (alloc , buffer -> stream .addr );
162162#else
@@ -255,7 +255,7 @@ struct comp_buffer *buffer_alloc(struct mod_alloc_ctx *alloc, size_t size, uint3
255255 return NULL ;
256256 }
257257
258- #ifdef CONFIG_SOF_USERSPACE_LL
258+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
259259 assert (alloc );
260260 stream_addr = sof_ctx_alloc (alloc , flags , size , align );
261261#else
@@ -270,7 +270,7 @@ struct comp_buffer *buffer_alloc(struct mod_alloc_ctx *alloc, size_t size, uint3
270270 buffer = buffer_alloc_struct (alloc , stream_addr , size , flags , is_shared );
271271 if (!buffer ) {
272272 tr_err (& buffer_tr , "could not alloc buffer structure" );
273- #ifdef CONFIG_SOF_USERSPACE_LL
273+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
274274 assert (alloc );
275275 sof_ctx_free (alloc , stream_addr );
276276#else
@@ -303,7 +303,7 @@ struct comp_buffer *buffer_alloc_range(struct mod_alloc_ctx *alloc, size_t prefe
303303 preferred_size += minimum_size - preferred_size % minimum_size ;
304304
305305 for (size = preferred_size ; size >= minimum_size ; size -= minimum_size ) {
306- #ifdef CONFIG_SOF_USERSPACE_LL
306+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
307307 assert (alloc );
308308 stream_addr = sof_ctx_alloc (alloc , flags , size , align );
309309#else
@@ -324,7 +324,7 @@ struct comp_buffer *buffer_alloc_range(struct mod_alloc_ctx *alloc, size_t prefe
324324 buffer = buffer_alloc_struct (alloc , stream_addr , size , flags , is_shared );
325325 if (!buffer ) {
326326 tr_err (& buffer_tr , "could not alloc buffer structure" );
327- #ifdef CONFIG_SOF_USERSPACE_LL
327+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
328328 assert (alloc );
329329 sof_ctx_free (alloc , stream_addr );
330330#else
@@ -350,7 +350,7 @@ void buffer_zero(struct comp_buffer *buffer)
350350int buffer_set_size (struct comp_buffer * buffer , uint32_t size , uint32_t alignment )
351351{
352352 void * new_ptr = NULL ;
353- #ifdef CONFIG_SOF_USERSPACE_LL
353+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
354354 struct mod_alloc_ctx * alloc = buffer -> audio_buffer .alloc ;
355355#endif
356356
@@ -365,7 +365,7 @@ int buffer_set_size(struct comp_buffer *buffer, uint32_t size, uint32_t alignmen
365365 if (size == audio_stream_get_size (& buffer -> stream ))
366366 return 0 ;
367367
368- #ifdef CONFIG_SOF_USERSPACE_LL
368+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
369369 assert (alloc );
370370 new_ptr = sof_ctx_alloc (alloc , buffer -> flags , size , alignment );
371371#else
@@ -381,7 +381,7 @@ int buffer_set_size(struct comp_buffer *buffer, uint32_t size, uint32_t alignmen
381381
382382 /* use bigger chunk, else just use the old chunk but set smaller */
383383 if (new_ptr ) {
384- #ifdef CONFIG_SOF_USERSPACE_LL
384+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
385385 assert (alloc );
386386 sof_ctx_free (alloc , audio_stream_get_addr (& buffer -> stream ));
387387#else
@@ -401,7 +401,7 @@ int buffer_set_size_range(struct comp_buffer *buffer, size_t preferred_size, siz
401401 const size_t actual_size = audio_stream_get_size (& buffer -> stream );
402402 void * new_ptr = NULL ;
403403 size_t new_size ;
404- #ifdef CONFIG_SOF_USERSPACE_LL
404+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
405405 struct mod_alloc_ctx * alloc = buffer -> audio_buffer .alloc ;
406406#endif
407407
@@ -423,7 +423,7 @@ int buffer_set_size_range(struct comp_buffer *buffer, size_t preferred_size, siz
423423
424424 for (new_size = preferred_size ; new_size >= minimum_size ;
425425 new_size -= minimum_size ) {
426- #ifdef CONFIG_SOF_USERSPACE_LL
426+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
427427 assert (alloc );
428428 new_ptr = sof_ctx_alloc (alloc , buffer -> flags , new_size , alignment );
429429#else
@@ -442,7 +442,7 @@ int buffer_set_size_range(struct comp_buffer *buffer, size_t preferred_size, siz
442442
443443 /* use bigger chunk, else just use the old chunk but set smaller */
444444 if (new_ptr ) {
445- #ifdef CONFIG_SOF_USERSPACE_LL
445+ #ifdef CONFIG_USERSPACE /// CONFIG_SOF_USERSPACE_LL
446446 assert (alloc );
447447 sof_ctx_free (alloc , audio_stream_get_addr (& buffer -> stream ));
448448#else
0 commit comments