Page 1 of 1

i2c control specification for vocalfusion

Posted: Fri Nov 16, 2018 12:18 pm
by nicolass
Hi,
We've built a board based on the mono AEC vocalfusion reference design and want to control parameters like AEC on/off and tuning using i2c from another device in our hardware stack.

I am looking for a specification of the i2c commands that I can use to do this.

I have already seen that there are example host programs that can be run on the Raspberry Pi, and I realise it should be possible to reproduce this on our own hardware but it's difficult to decipher from the source exactly what is included in the payload and in what order.

I have also checked the documentation in lib_device_control, but the very general specification there doesn't seem to match the specific checks that I can see in e.g. the vf_control.xc file in module_vocalfusion. For example the vocalfusion code checks for the 'type' of the payload data, which is written in the payload, and also grabs the actual parameter value from from the payload at an offset position:

memcpy(&param_type, &(payload[8]), sizeof(unsigned));
memcpy(&temp_param_f, &(payload[4]), sizeof(unsigned));

Is there any resource that states in a clear way exactly how an i2c command should be structured? Am I missing something? (I have checked the forums and the docs as best as possible, sorry!).

Re: i2c control specification for vocalfusion

Posted: Fri Nov 16, 2018 12:58 pm
by nicolass
Sorry it looks like I'm just having one of those days where I can't see the wood for the trees. It seems to be that the structure is as follows:
8 bits8 bits8 bits32 bits32 bits32 bits
Resource IDCommand (R/W)data lengthParameter IDParameter ValueParameter type (0:Float, 1:Int, 2:NA)
Does this seem correct? It might be useful to others trying to achieve the same thing if this were included in e.g. the xCORE VocalFusion Control Users Guide document, along with the appropriate Resource ID values and Parameter ID values (though these can be found in the source files with some work).

<edited in a correction>

Re: i2c control specification for vocalfusion

Posted: Fri Nov 16, 2018 1:58 pm
by mon2
Hi. There is some discussion about AEC inside the following document:

https://www.xmos.com/developer/download ... rc5%29.pdf
* see section 7.2.2

and this document - see section 8.2

https://www.xmos.com/developer/download ... .0rc7).pdf
vocalfusion_commands.png

Re: i2c control specification for vocalfusion

Posted: Fri Nov 16, 2018 2:08 pm
by nicolass
Thanks, I have seen these documents and they don't answer the question I've asked.

Not to worry though, I think I've found a way to get through.

Thanks!

Re: i2c control specification for vocalfusion

Posted: Wed Sep 11, 2019 9:39 am
by hyuting1008
nicolass wrote: Fri Nov 16, 2018 2:08 pm Thanks, I have seen these documents and they don't answer the question I've asked.

Not to worry though, I think I've found a way to get through.

Thanks!
Hello, I also have the same question.
I would like to change the parameters "BEAMWIDTH" and "BEAMANGLE" to modify the DOA range in run time.
Could you share the way how did you get through?

Thanks a lot!