Skip to content

DAI: Need echo reference stream #631

Closed

Description

@plbossart

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.

Activity

  1. added
    enhancementNew feature or request
    WHLApplies to WhiskeyLake platform
    on Nov 27, 2018
  2. akloniex commented on May 15, 2019

    @akloniex
    Member

    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.

  3. juimonen commented on May 15, 2019

    @juimonen

    @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?

  4. akloniex commented on May 15, 2019

    @akloniex
    Member

    @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.

  5. juimonen commented on May 15, 2019

    @juimonen

    @akloniex ok I see, Yes definitely interesting to try out...

  6. dbaluta commented on Jan 26, 2021

    @dbaluta
    Collaborator

    @plbossart any progress on this :)

  7. plbossart commented on Jan 26, 2021

    @plbossart
    MemberAuthor

    @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?

  8. lgirdwood commented on Jan 27, 2021

    @lgirdwood
    Member

    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.

  9. dbaluta commented on Jan 27, 2021

    @dbaluta
    Collaborator

    @lgirdwood my grep foo is weak. tried with xrun, allow, etc but 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.

  10. plbossart commented on Jan 27, 2021

    @plbossart
    MemberAuthor
    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,
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

WHLApplies to WhiskeyLake platformenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions