i2c control specification for vocalfusion

If you have a simple question and just want an answer.
Post Reply
nicolass
Member
Posts: 9
Joined: Fri Aug 17, 2018 4:42 pm

i2c control specification for vocalfusion

Post 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!).


nicolass
Member
Posts: 9
Joined: Fri Aug 17, 2018 4:42 pm

Post 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>
Last edited by nicolass on Fri Nov 16, 2018 9:12 pm, edited 1 time in total.
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post 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
(50.68 KiB) Not downloaded yet
vocalfusion_commands.png
(50.68 KiB) Not downloaded yet
nicolass
Member
Posts: 9
Joined: Fri Aug 17, 2018 4:42 pm

Post 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!
hyuting1008
Member
Posts: 9
Joined: Mon May 20, 2019 12:45 pm

Post 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!
Post Reply