Repository navigation
Codec Adapter: Use the passed output buffers in process() - #5559
Conversation
remove init for ret. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Remove init for source. It is not needed anymore. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
9f57812 to
92e3a22
Compare
|
First there is a compilation error that needs to be fixed: |
8b5e036 to
8874273
Compare
1d0af51 to
aa185f3
Compare
There was a problem hiding this comment.
does this mean it is no longer up to the IPC messages to allocate the buffers?
There was a problem hiding this comment.
@cujomalainey sorry not following the question. Which buffers are you alluding to? This list of buffers is a replacement for mod->local_buff which assumes there's only one sink for a module. So we expand it to a list to support multiple sinks
There was a problem hiding this comment.
what does mean "support multiple sinks".?
There was a problem hiding this comment.
@lenghonglin imagine a demux where you can have a single source split and copied to multiple sinks. Thats is what I mean by "support multiple sinks"
74165b9 to
a11a065
Compare
Add a sink_buffer_list to struct processing_module to support multiple output buffers for modules. Allocate sink buffers for all sinks during prepare and copy the produced samples from the output_buffers into the respective sink buffers during copy. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Add a helper function to copy from local buffer to the sink buffer. This will be used to copy from all output buffers. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Modify all codec implementations to copy the produced samples to the output_buffer. Copy the produced samples from all output buffers in the sink_buffer_list. Remove local_buff from struct processing_module as it is no longer needed. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
51358e0 to
e562ecc
Compare
|
@markbartonxperi can you please check if this PR works for you? |
|
@ranj063 Looks good. Thanks! |
|
CI looks good. |
|
|
||
| copy_period: | ||
| comp_get_copy_limits_with_lock(src_buffer, sink_buffer, &cl); | ||
| copy_bytes = cl.frames * cl.source_frame_bytes; |
There was a problem hiding this comment.
What if copy_bytes is zero?
There was a problem hiding this comment.
I dont think you can get here is copy_bytes is 0. we get to this point only if audio_stream_get_avail_bytes(&src_buffer->stream) conditions above are met
There was a problem hiding this comment.
for dai comp, if comsumer(codec) slow than producter(codec_adapter), the dai buffer will be fulled, so in this condition, copy_bytes should be 0.
There was a problem hiding this comment.
@lenghonglin even if copy_bytes is 0, the operations below will return without doing anything in that case. But sure, I can add a check for this in a follow up PR
|
There is another thing that i wanna disscuss. So what time for host to send |
|
So, you say that we don't play the entire mp3 file till the end right? I think the solution here is to implement DRAIN. Patches are welcomed if you can implement this. I have this on my todo list but with low prio this quarter. |
|
ok, i will add this thing in my todolist |
No description provided.