How to control the AVB media steam volume size
-
- Member++
- Posts: 16
- Joined: Fri Jun 01, 2012 7:01 am
-
- Member++
- Posts: 16
- Joined: Fri Jun 01, 2012 7:01 am
norman wrote:if you work on the low cost avb audio endpoint, we maybe going to help each other. I've done some modifications to test the volume with the remote button (unused for now) :
in xr_avb_demo.xc
void ptp_server_and_gpio
uncommentvoid demo(...)Code: Select all
c <: REMOTE_SEL;
add in the beginningadd afterCode: Select all
int volumes[4]; for(int i=0;i<4;i++) { volumes[i]=0x40000000; }
Code: Select all
case c_gpio_ctl :> int cmd: { switch (cmd) {
in media_output_fifo.cCode: Select all
case REMOTE_SEL: { int vol = 0; if (volumes[0]==0x40000000) { vol = 0x7FFFFFFF; } else if (volumes[0]==0x7FFFFFFF) { vol = 0; } else { vol = 0x40000000; } for(int i=0;i<4;i++) { volumes[i] = vol; } set_avb_source_volumes(0, volumes, 4); } break;
afteraddCode: Select all
#define MAX_VOLUME
Code: Select all
#define MEDIA_OUTPUT_FIFO_VOLUME_CONTROL
Hi, norman . I have some new discoveries of your way recently .
Also need to modify the following code section :
in avb.h
add code
#define MEDIA_OUTPUT_FIFO_VOLUME_CONTROL
in avb_1722_listener.h
add code
#define MEDIA_OUTPUT_FIFO_VOLUME_CONTROL
then Run the demo project is successful .
However , when I debug the project , encounter a problem .
The program runs to c_io.h suspended , see the picture (in my own project ,but it is the same as in DEMO).
How to use the "void set_avb_source_volumes(int sink_num, int volumes[], int count);" successfully and how to understand the c_io.h assembly code , please ?
You do not have the required permissions to view the files attached to this post.
-
- Active Member
- Posts: 55
- Joined: Wed Jan 11, 2012 2:27 pm
I met this error before ! but i don't remember for now what i've done. not helping ok....
You may have to look at which xc_abi_outint it stop by putting breakpoint in the caller "set_avb_source_volumes". then see which parameter is wrong between
You may have to look at which xc_abi_outint it stop by putting breakpoint in the caller "set_avb_source_volumes". then see which parameter is wrong between
Code: Select all
xc_abi_outuint(c, AVB1722_ADJUST_LISTENER_STREAM);
xc_abi_outuint(c, sink->stream.local_id);
xc_abi_outuint(c, AVB1722_ADJUST_LISTENER_VOLUME);
xc_abi_outuint(c, count);
for (int i=0;i<count;i++) {
xc_abi_outuint(c, volumes[i]);
}