"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "amixer/amixer.c" between
alsa-utils-1.2.1.tar.bz2 and alsa-utils-1.2.2.tar.bz2

About: ALSA (Advanced Linux Sound Architecture) - Utilities.

amixer.c  (alsa-utils-1.2.1.tar.bz2):amixer.c  (alsa-utils-1.2.2.tar.bz2)
skipping to change at line 31 skipping to change at line 31
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <getopt.h> #include <getopt.h>
#include <stdarg.h> #include <stdarg.h>
#include <ctype.h> #include <ctype.h>
#include <math.h> #include <math.h>
#include <errno.h> #include <errno.h>
#include <assert.h> #include <assert.h>
#include <alsa/asoundlib.h> #include <alsa/asoundlib.h>
#include <sys/poll.h> #include <poll.h>
#include <stdint.h> #include <stdint.h>
#include "amixer.h" #include "amixer.h"
#include "../alsamixer/volume_mapping.h" #include "../alsamixer/volume_mapping.h"
#define LEVEL_BASIC (1<<0) #define LEVEL_BASIC (1<<0)
#define LEVEL_INACTIVE (1<<1) #define LEVEL_INACTIVE (1<<1)
#define LEVEL_ID (1<<2) #define LEVEL_ID (1<<2)
static int quiet = 0; static int quiet = 0;
static int debugflag = 0; static int debugflag = 0;
skipping to change at line 468 skipping to change at line 468
if (tlv_size < 2 * sizeof(unsigned int)) { if (tlv_size < 2 * sizeof(unsigned int)) {
printf("TLV size error!\n"); printf("TLV size error!\n");
return; return;
} }
print_spaces(spaces); print_spaces(spaces);
printf("| "); printf("| ");
type = tlv[idx++]; type = tlv[idx++];
size = tlv[idx++]; size = tlv[idx++];
tlv_size -= 2 * sizeof(unsigned int); tlv_size -= 2 * sizeof(unsigned int);
if (size > tlv_size) { if (size > tlv_size) {
printf("TLV size error (%i, %i, %i)!\n", type, size, tlv_size); printf("TLV size error (%u, %u, %u)!\n", type, size, tlv_size);
return; return;
} }
switch (type) { switch (type) {
case SND_CTL_TLVT_CONTAINER: case SND_CTL_TLVT_CONTAINER:
printf("container\n"); printf("container\n");
size += sizeof(unsigned int) -1; size += sizeof(unsigned int) -1;
size /= sizeof(unsigned int); size /= sizeof(unsigned int);
while (idx < size) { while (idx < size) {
if (tlv[idx+1] > (size - idx) * sizeof(unsigned int)) { if (tlv[idx+1] > (size - idx) * sizeof(unsigned int)) {
printf("TLV size error in compound!\n"); printf("TLV size error in compound!\n");
skipping to change at line 579 skipping to change at line 579
while (size > 0) { while (size > 0) {
printf("%s", snd_pcm_chmap_name(tlv[idx++])); printf("%s", snd_pcm_chmap_name(tlv[idx++]));
size -= sizeof(unsigned int); size -= sizeof(unsigned int);
if (size > 0) if (size > 0)
printf(","); printf(",");
} }
break; break;
#endif #endif
default: default:
printf("unk-%i-", type); printf("unk-%u-", type);
while (size > 0) { while (size > 0) {
printf("0x%08x,", tlv[idx++]); printf("0x%08x,", tlv[idx++]);
size -= sizeof(unsigned int); size -= sizeof(unsigned int);
} }
break; break;
} }
if (lf) if (lf)
putc('\n', stdout); putc('\n', stdout);
} }
skipping to change at line 614 skipping to change at line 614
error("Control %s snd_hctl_elem_info error: %s\n", card, snd_stre rror(err)); error("Control %s snd_hctl_elem_info error: %s\n", card, snd_stre rror(err));
return err; return err;
} }
if (level & LEVEL_ID) { if (level & LEVEL_ID) {
snd_hctl_elem_get_id(elem, id); snd_hctl_elem_get_id(elem, id);
show_control_id(id); show_control_id(id);
printf("\n"); printf("\n");
} }
count = snd_ctl_elem_info_get_count(info); count = snd_ctl_elem_info_get_count(info);
type = snd_ctl_elem_info_get_type(info); type = snd_ctl_elem_info_get_type(info);
printf("%s; type=%s,access=%s,values=%i", space, control_type(info), cont rol_access(info), count); printf("%s; type=%s,access=%s,values=%u", space, control_type(info), cont rol_access(info), count);
switch (type) { switch (type) {
case SND_CTL_ELEM_TYPE_INTEGER: case SND_CTL_ELEM_TYPE_INTEGER:
printf(",min=%li,max=%li,step=%li\n", printf(",min=%li,max=%li,step=%li\n",
snd_ctl_elem_info_get_min(info), snd_ctl_elem_info_get_min(info),
snd_ctl_elem_info_get_max(info), snd_ctl_elem_info_get_max(info),
snd_ctl_elem_info_get_step(info)); snd_ctl_elem_info_get_step(info));
break; break;
case SND_CTL_ELEM_TYPE_INTEGER64: case SND_CTL_ELEM_TYPE_INTEGER64:
printf(",min=%Li,max=%Li,step=%Li\n", printf(",min=%lli,max=%lli,step=%lli\n",
snd_ctl_elem_info_get_min64(info), snd_ctl_elem_info_get_min64(info),
snd_ctl_elem_info_get_max64(info), snd_ctl_elem_info_get_max64(info),
snd_ctl_elem_info_get_step64(info)); snd_ctl_elem_info_get_step64(info));
break; break;
case SND_CTL_ELEM_TYPE_ENUMERATED: case SND_CTL_ELEM_TYPE_ENUMERATED:
{ {
unsigned int items = snd_ctl_elem_info_get_items(info); unsigned int items = snd_ctl_elem_info_get_items(info);
printf(",items=%u\n", items); printf(",items=%u\n", items);
for (item = 0; item < items; item++) { for (item = 0; item < items; item++) {
snd_ctl_elem_info_set_item(info, item); snd_ctl_elem_info_set_item(info, item);
skipping to change at line 665 skipping to change at line 665
if (idx > 0) if (idx > 0)
printf(","); printf(",");
switch (type) { switch (type) {
case SND_CTL_ELEM_TYPE_BOOLEAN: case SND_CTL_ELEM_TYPE_BOOLEAN:
printf("%s", snd_ctl_elem_value_get_boolean(contr ol, idx) ? "on" : "off"); printf("%s", snd_ctl_elem_value_get_boolean(contr ol, idx) ? "on" : "off");
break; break;
case SND_CTL_ELEM_TYPE_INTEGER: case SND_CTL_ELEM_TYPE_INTEGER:
printf("%li", snd_ctl_elem_value_get_integer(cont rol, idx)); printf("%li", snd_ctl_elem_value_get_integer(cont rol, idx));
break; break;
case SND_CTL_ELEM_TYPE_INTEGER64: case SND_CTL_ELEM_TYPE_INTEGER64:
printf("%Li", snd_ctl_elem_value_get_integer64(co ntrol, idx)); printf("%lli", snd_ctl_elem_value_get_integer64(c ontrol, idx));
break; break;
case SND_CTL_ELEM_TYPE_ENUMERATED: case SND_CTL_ELEM_TYPE_ENUMERATED:
printf("%u", snd_ctl_elem_value_get_enumerated(co ntrol, idx)); printf("%u", snd_ctl_elem_value_get_enumerated(co ntrol, idx));
break; break;
case SND_CTL_ELEM_TYPE_BYTES: case SND_CTL_ELEM_TYPE_BYTES:
printf("0x%02x", snd_ctl_elem_value_get_byte(cont rol, idx)); printf("0x%02x", snd_ctl_elem_value_get_byte(cont rol, idx));
break; break;
case SND_CTL_ELEM_TYPE_IEC958: case SND_CTL_ELEM_TYPE_IEC958:
snd_ctl_elem_value_get_iec958(control, &iec958); snd_ctl_elem_value_get_iec958(control, &iec958);
printf("[AES0=0x%02x AES1=0x%02x AES2=0x%02x AES3 =0x%02x]", printf("[AES0=0x%02x AES1=0x%02x AES2=0x%02x AES3 =0x%02x]",
 End of changes. 6 change blocks. 
6 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)