31 #include <sys/ioctl.h>
33 #include <sys/types.h>
72 void getStartStride() {
73 FILE *fp = fopen(
"/dev/shm/amx_llc_start_stride",
"r");
76 if (fscanf(fp,
"%d,%d", &_start, &_stride) == 2 &&
77 _start >= 0 && _start<(ai_count-ao_count) &&
78 _stride >= 1 && _stride <= 100){
88 ao_count(_ao_count), ai_count(_ai_count), ai_start(_ai_start), ai_stride(_ai_stride),
91 printf(
"InlineDataHanderMuxAO_LLC ao_dev=%d ao_count=%d ai_count=%d ai_start=%d ai_stride=%d\n",
92 ao_dev, ao_count, ai_count, ai_start, ai_stride);
96 for (
int ib = 0;
ib < wavelen; ++
ib){
103 perror(
"ioctl AFHBA_START_AO_ABN");
108 ao_va =
new short* [wavelen];
112 printf(
"%s [%d] va:%p pa:%08x\n", __FUNCTION__, 0, ao_va[0],
abn.
buffers[0].
pa);
114 for (
int ib = 1;
ib < wavelen; ++
ib){
127 const int instep = ai_count*ai_stride;
128 short* ai = (
short*)src + ai_start;
129 for (
int ib = 0;
ib < wavelen; ++
ib){
130 memcpy(ao_va[
ib], ai, ao_count*
sizeof(
short));
138 printf(
"InlineDataHandler::factory() option InlineDataHanderMuxAO_LLC\n");
139 if (
getenv(
"MUXAO_VERBOSE")){
142 if (
const char* value =
getenv(
"MUXAO")){
144 if (sscanf(value,
"%d,%d,%d,%d,%d,%d", pr+0, pr+1, pr+2, pr+3, pr+4, pr+5) == 6){