-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio: Crossover: Convert to module adapter #7871
Audio: Crossover: Convert to module adapter #7871
Conversation
408510d
to
8f25733
Compare
8f25733
to
3fddb6d
Compare
sinks_c[i] = buffer_acquire(sinks[i]); | ||
avail = audio_stream_avail_frames(&source_c->stream, | ||
&sinks_c[i]->stream); | ||
frames = MIN(frames, avail); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic seems to be removed by the commit, is it intentional?
It looks important that determines the processed frames with regard to sink capacities in case of overrun.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as Curtis asked? The module adapter does this for clients. Though there's also the sinks[i] NULL case if states are not equal. I have not been able to create such test situation, could a NULL sink impact the avail/free. I'm not sure.
src/audio/crossover/crossover.c
Outdated
|
||
/* Validate frame format and buffer size of sinks */ | ||
list_for_item(sink_list, &dev->bsink_list) { | ||
sink = container_of(sink_list, struct comp_buffer, source_list); | ||
sink_c = buffer_acquire(sink); | ||
|
||
/* Note: Printing pipeline IDs for debug, these are with IPC4 zeros, probably due |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the bug you mentioned still exist under IPC4? If yes, is it worked-around by the commit, or is it non-critical?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm now after vacation starting to study this again -- I hope I'll gain understanding of IPC4 to be able to address this.
3fddb6d
to
f1fc850
Compare
a7b2560
to
dfe5fc7
Compare
Crossover now runs with this PR correctly with IPC4 and IPC3, so changing this to non-draft. I'm able to run 2-way configuration with UPX board in nocodec mode. I play one stream and capture back from SSP loopback paths the band filtered filters versions those appear to be OK. The other patches those belong to this work are: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @singalsu ! I think there is one req-for-an-inline-comment outstanding, but otherwise looks good to go.
dfe5fc7
to
a7a2dfc
Compare
src/audio/crossover/crossover.c
Outdated
&sinks_c[i]->stream); | ||
frames = MIN(frames, avail); | ||
/* Process crossover */ | ||
if (frames) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: an easier form would be
if (!frames)
return -ENODATA;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, done
src/audio/crossover/crossover.c
Outdated
} | ||
|
||
audio_stream_init_alignment_constants(1, 1, &sink_c->stream); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be done even if the formats didn't match and we're going to error out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, ordered this way for more compact appear with my style but done now.
a7a2dfc
to
dfe9ef6
Compare
src/audio/crossover/crossover.c
Outdated
goto out; | ||
return ret; | ||
|
||
audio_stream_init_alignment_constants(1, 1, &sink_c->stream); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this cannot be done here - cannot use sink_c
after releasing
This patch contains the changes to run crossover component as module adapter client in IPC3 and IPC4 systems. The largest change is to use pin indices in IPC4 instead of pipeline IDs to identify sink streams. Pipeline IDs on firmware side are temporary in IPC4. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The filters state need to be retrieved for every channel as it is done in other s16 and s24 processing cores. The mistake caused very distorted sound with waveform discontinuity every copy period, e.g. 1 ms. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
dfe9ef6
to
516750c
Compare
@lgirdwood Internal CI result is pass :) |
This patch contains basic changes to run crossover component as module adapter client in IPC3 system. Additional changes are needed for IPC4.