aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2011-10-24 15:00:17 -0500
committerSimon Wilson <simonwilson@google.com>2011-10-27 11:24:39 -0700
commit52510160f90bb583f4eaf1392533b8a2108323c7 (patch)
treebabb21a7e4fe00e5b4cf2b145deee7ec655eb211
parenta912d706c1583e60096c1b4c54dfec2c68547eb8 (diff)
mixer: show BYTE controls
Use existing routines to read BYTE controls. Somewhat inefficient since an ioctl is done for every byte, some caching in intermediate fields would be beneficial.
-rw-r--r--mixer.c3
-rw-r--r--tinymix.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/mixer.c b/mixer.c
index 5563bc6..a7f5d21 100644
--- a/mixer.c
+++ b/mixer.c
@@ -306,6 +306,9 @@ int mixer_ctl_get_value(struct mixer_ctl *ctl, unsigned int id)
case SNDRV_CTL_ELEM_TYPE_ENUMERATED:
return ev.value.enumerated.item[id];
+ case SNDRV_CTL_ELEM_TYPE_BYTES:
+ return ev.value.bytes.data[id];
+
default:
return -EINVAL;
}
diff --git a/tinymix.c b/tinymix.c
index 3b778e1..b9c71a4 100644
--- a/tinymix.c
+++ b/tinymix.c
@@ -140,6 +140,9 @@ static void tinymix_detail_control(struct mixer *mixer, unsigned int id,
case MIXER_CTL_TYPE_ENUM:
tinymix_print_enum(ctl, print_all);
break;
+ case MIXER_CTL_TYPE_BYTE:
+ printf(" 0x%02x", mixer_ctl_get_value(ctl, i));
+ break;
default:
printf(" unknown");
break;