You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since all processing on playback pipelines isn't guaranteed to be linear, we need to provide an echo reference to either userspace or DSP capture pipelines. Alternatively this echo reference might be provided by an external component (e.g. amplifier w/ DSP capabilities) and extracted from a TDM stream.
One of ways to provide echo reference signal would be to use Demux component implemented in #1275 and used as such in topology in #1316 .
I've also discussed another approach with @lbetlej and @mmaka1 to create new virtual dai component type which could be connected/bound via IPC to an existing dai and would serve as BE for the echo reference capture pipeline and copy signal from the associated dai or generate zeros in case of absence of signal to copy. This is to be estimated and scheduled to do in upcoming days.
@akloniex the topology in 1316 already has a virtual widget for BE connection. Virtual widgets are not created at FW side at all, they just provide a way for alsa/asoc to connect incomplete graph from fe to be. I guess you mean just "normal" new component, which would be the start of the echo ref pipe from demux onwards?
The problem with echo ref pipe is that it should be only scheduled when its related PCM is open. I'm not sure the component you describe would help in this situation. If you only open capture, and there's no playback, what should happen? currently there's alsa inpout/output error, which is kind of logical because there's no playback. if you would generate 0's, who would schedule this? there's only playback dai so should we start that?
@juimonen
I mean completely separate echo pipeline, from topology point of view. This virtual dai that would 'listen' to data played through related dai and duplicate it via virtual dma, virtualization of said dai would be that it is not associated with any HW components, but other than that it would act as if was a 'real' dai component. There would be no additional components involved in the playback pipeline, just association between the 2 dai components setup via IPC.
tools/topology$ git grep Echo
development/sof-tgl-nocodec-ci.m4:PCM_CAPTURE_ADD(FWEchoRef, 3, PIPELINE_PCM_7)
sof-apl-demux-pcm512x.m4:PCM_CAPTURE_ADD(EchoRef, 4, PIPELINE_PCM_5)
sof-cml-demux-rt5682.m4:PCM_CAPTURE_ADD(EchoRef, 5, PIPELINE_PCM_5)
sof-smart-amplifier.m4:ifdef(`SMART_REF_PPL_ID',`',`errprint(note: Need to define Echo Ref pipeline ID for sof-smart-amplifier
sof-smart-amplifier.m4:ifdef(`SMART_REF_CH_NUM',`',`errprint(note: Need to define Echo Ref channel number for sof-smart-amplifier
sof-smart-amplifier.m4:ifdef(`SMART_PCM_NAME',`',`errprint(note: Need to define Echo Ref pipeline ID for sof-smart-amplifier
sof-smart-amplifier.m4:# PCM for SMART_AMP Playback and EchoRef.
sof-tgl-max98357a-rt5682.m4:PCM_CAPTURE_ADD(EchoRef, 6, PIPELINE_PCM_9)
sof/pipe-amp-ref-capture.m4:ifdef(`SMART_REF_PPL_ID',`',`errprint(note: Need to define Echo Ref pipeline ID for sof-smart-amplifier
sof/pipe-amp-ref-capture.m4:ifdef(`SMART_REF_CH_NUM',`',`errprint(note: Need to define Echo Ref channel number for sof-smart-amplifier
sof/pipe-amp-ref-capture.m4:# Host "Echo Reference Capture" PCM
sof/pipe-amp-ref-capture.m4:W_PCM_CAPTURE(PCM_ID, Echo Reference Capture, 0, 2)
sof/pipe-amp-ref-capture.m4:indir(`define', concat(`PIPELINE_PCM_', PIPELINE_ID), Echo Reference Capture PCM_ID)
sof/pipe-amp-ref-capture.m4:PCM_CAPABILITIES(Echo Reference Capture PCM_ID,
Activity
akloniex commentedon May 15, 2019
One of ways to provide echo reference signal would be to use Demux component implemented in #1275 and used as such in topology in #1316 .
I've also discussed another approach with @lbetlej and @mmaka1 to create new virtual dai component type which could be connected/bound via IPC to an existing dai and would serve as BE for the echo reference capture pipeline and copy signal from the associated dai or generate zeros in case of absence of signal to copy. This is to be estimated and scheduled to do in upcoming days.
juimonen commentedon May 15, 2019
@akloniex the topology in 1316 already has a virtual widget for BE connection. Virtual widgets are not created at FW side at all, they just provide a way for alsa/asoc to connect incomplete graph from fe to be. I guess you mean just "normal" new component, which would be the start of the echo ref pipe from demux onwards?
The problem with echo ref pipe is that it should be only scheduled when its related PCM is open. I'm not sure the component you describe would help in this situation. If you only open capture, and there's no playback, what should happen? currently there's alsa inpout/output error, which is kind of logical because there's no playback. if you would generate 0's, who would schedule this? there's only playback dai so should we start that?
akloniex commentedon May 15, 2019
@juimonen
I mean completely separate echo pipeline, from topology point of view. This virtual dai that would 'listen' to data played through related dai and duplicate it via virtual dma, virtualization of said dai would be that it is not associated with any HW components, but other than that it would act as if was a 'real' dai component. There would be no additional components involved in the playback pipeline, just association between the 2 dai components setup via IPC.
juimonen commentedon May 15, 2019
@akloniex ok I see, Yes definitely interesting to try out...
dbaluta commentedon Jan 26, 2021
@plbossart any progress on this :)
plbossart commentedon Jan 26, 2021
@dbaluta I think it's supported today already. we can either create an echo reference from a playback stream, or use one provided by an external amp.
@ranj063 @keyonjie can you point Daniel to the topologies where this is used?
lgirdwood commentedon Jan 27, 2021
Yep, used today for DSM iirc. @dbaluta look for topology token for allow buffer xruns, you should be able to grep for these and find the examples.
dbaluta commentedon Jan 27, 2021
@lgirdwood my grep foo is weak. tried with
xrun, allow, etcbut couldn't find anything that makes sense.Later edit: grepping for 'EchoRef' found this tools/topology/sof-tgl-max98357a-rt5682.m4 This might be a good starting point.
thanks.
plbossart commentedon Jan 27, 2021