Lines Matching refs:tlv
460 static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_size)
462 unsigned int type = tlv[0];
474 type = tlv[idx++];
475 size = tlv[idx++];
487 if (tlv[idx+1] > (size - idx) * sizeof(unsigned int)) {
491 decode_tlv(spaces + 2, tlv + idx, tlv[idx+1] + 8);
492 idx += 2 + (tlv[idx+1] + sizeof(unsigned int) - 1) / sizeof(unsigned int);
500 printf("0x%08x,", tlv[idx++]);
505 print_dB((int)tlv[2]);
507 print_dB(tlv[3] & 0xffff);
508 printf(",mute=%i", (tlv[3] >> 16) & 1);
516 printf("0x%08x,", tlv[idx++]);
521 print_dB((int)tlv[2]);
523 print_dB((int)tlv[3]);
532 printf("0x%08x,", tlv[idx++]);
539 printf("rangemin=%i,", tlv[idx++]);
540 printf(",rangemax=%i\n", tlv[idx++]);
541 decode_tlv(spaces + 4, tlv + idx, 4 * sizeof(unsigned int));
556 printf("0x%08x,", tlv[idx++]);
561 print_dB((int)tlv[2]);
563 print_dB((int)tlv[3]);
581 printf("%s", snd_pcm_chmap_name(tlv[idx++]));
591 printf("0x%08x,", tlv[idx++]);
604 unsigned int item, idx, count, *tlv;
706 tlv = malloc(4096);
707 if ((err = snd_hctl_elem_tlv_read(elem, tlv, 4096)) < 0) {
709 free(tlv);
712 decode_tlv(strlen(space), tlv, 4096);
713 free(tlv);