i2c control specification for vocalfusion

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

i2c control specification for vocalfusion

Postby nicolass » Fri Nov 16, 2018 12:18 pm

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: 8
Joined: Fri Aug 17, 2018 4:42 pm

Postby nicolass » Fri Nov 16, 2018 12:58 pm

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: 1298
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Fri Nov 16, 2018 1:58 pm

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 ... e(2.2.0rc7).pdf

vocalfusion_commands.png
(50.68 KiB) Not downloaded yet
vocalfusion_commands.png
(50.68 KiB) Not downloaded yet
nicolass
Member
Posts: 8
Joined: Fri Aug 17, 2018 4:42 pm

Postby nicolass » 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!

Who is online

Users browsing this forum: No registered users and 30 guests