sof icon indicating copy to clipboard operation
sof copied to clipboard

Audio: Start add simulated DAI and host component

Open singalsu opened this issue 1 year ago • 9 comments

singalsu avatar Feb 02 '24 17:02 singalsu

The just updated version adds a triangle wave generator to DAI capture and and glitch detector to DAI playback.

singalsu avatar Feb 05 '24 18:02 singalsu

This version adds to host triangle wave generate to playback and to capture detecting of glitches. Both triangle generators in DAI and host have now an option to force making glitch every 5s for sanity check to make sure glitches are detected.

singalsu avatar Feb 06 '24 15:02 singalsu

@singalsu AFAIK the simulated Host will self-generate the data right? Can we call it "Virtual"?

@lgirdwood @singalsu we are trying to decouple SOF firmware from Linux kernel to have it run on MCUs so this could be a good start for us.

dbaluta avatar Feb 08 '24 11:02 dbaluta

@singalsu AFAIK the simulated Host will self-generate the data right? Can we call it "Virtual"?

Virtual could be better., I'm not good in naming things. It's still a functional host with data flow to/from user but the playback data is replaced. The next step would be to remove the host DMA traffic, but I have no idea if such is possible without changes to kernel and other SOF framework. The DAI part is now decoupled from HW, so it is "virtual".

singalsu avatar Feb 08 '24 12:02 singalsu

Update - removed device driver probe from dai_get().

singalsu avatar Feb 13 '24 10:02 singalsu

most comments apply to both host and DAI

lyakh avatar Feb 15 '24 08:02 lyakh

@singalsu what topology would you use to test these? Also, how do you start a simulated host playback or capture? Would you still need a PCM in the topology? Ideally, we also want hostless capabaility right?

ranj063 avatar Feb 20 '24 20:02 ranj063

@singalsu AFAIK the simulated Host will self-generate the data right? Can we call it "Virtual"?

@lgirdwood @singalsu we are trying to decouple SOF firmware from Linux kernel to have it run on MCUs so this could be a good start for us.

This is not intended for MCU, but you could modify for MCUs as needed - intention here was to help test code flows without invoking any IP programming. i.e. pipelines could be created and run without programming IPs (and do memory to memory copies).

lgirdwood avatar Feb 21 '24 14:02 lgirdwood

@singalsu what topology would you use to test these? Also, how do you start a simulated host playback or capture? Would you still need a PCM in the topology? Ideally, we also want hostless capabaility right?

Re hostless - yes, that would be a followup. i.e. it would use locally generated test data instead of copying from host.

lgirdwood avatar Feb 21 '24 14:02 lgirdwood