diff options
author | Tai Vuong <tvuong@audiokinetic.com> | 2017-11-04 10:45:28 -0400 |
---|---|---|
committer | Tai Vuong <tvuong@audiokinetic.com> | 2017-11-04 10:45:28 -0400 |
commit | 8bd61adc2b75634e1e5136ac3c1403b26edd209f (patch) | |
tree | d223b5501b2b4876091458dfada78c9d237b8247 /USB-Device | |
parent | 3b86d29aa97cbd0b51c59fb1038807a565f69777 (diff) | |
parent | b93f9134f7342fcbf9fb15399e19f830401a7fe7 (diff) |
Merge branch 'master' of github.com:fulup-bzh/hal-sample-4a
Diffstat (limited to 'USB-Device')
-rw-r--r-- | USB-Device/UsbDeviceHAL.c | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/USB-Device/UsbDeviceHAL.c b/USB-Device/UsbDeviceHAL.c index c0315f9..78550f0 100644 --- a/USB-Device/UsbDeviceHAL.c +++ b/USB-Device/UsbDeviceHAL.c @@ -133,24 +133,39 @@ STATIC alsaHalMapT alsaHalMap[]= { .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Shutdown_Ramp", .minval=0, .maxval=100, .step=1, .value=80 } }, - // Bind with existing ones created by ALSA configuration (and linked to softvol) [0-255] - { .tag=Guidance_Playback_Volume , .ctl={.name="Guidance_Volume", .minval=0, .maxval=255, .step=1, .value=204 } }, - { .tag=Entertainment_Playback_Volume , .ctl={.name="Entertainment_Volume", .minval=0, .maxval=255, .step=1, .value=204 } }, - { .tag=Notification_Playback_Volume , .ctl={.name="Notification_Volume", .minval=0, .maxval=255, .step=1, .value=204 } }, - { .tag=Communication_Playback_Volume , .ctl={.name="Communications_Volume", .minval=0, .maxval=255, .step=1, .value=204 } }, - { .tag=Warning_Playback_Volume , .ctl={.name="Warning_Volume", .minval=0, .maxval=255, .step=1, .value=204 } }, - { .tag=System_Playback_Volume , .ctl={.name="System_Volume", .minval=0, .maxval=255, .step=1, .value=204 } }, - { .tag=Startup_Playback_Volume , .ctl={.name="Startup_Volume", .minval=0, .maxval=255, .step=1, .value=204 } }, - { .tag=Shutdown_Playback_Volume , .ctl={.name="Shutdown_Volume", .minval=0, .maxval=255, .step=1, .value=204 } }, - // Could have similar controls for input side + // Bind with existing ones created by ALSA configuration (and linked to softvol) [0-255] + { .tag=Guidance_Playback_Volume , + .ctl={.name="Guidance_Volume",.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.count=2, .maxval=255, .value=204 } + }, + { .tag=Entertainment_Playback_Volume , + .ctl={.name="Entertainment_Volume",.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.count=2, .maxval=255, .value=204 } + }, + { .tag=Notification_Playback_Volume , + .ctl={.name="Notification_Volume",.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.count=2, .maxval=255, .value=204 } + }, + { .tag=Communication_Playback_Volume , + .ctl={.name="Communications_Volume", .numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.count=2, .maxval=255, .value=204 } + }, + { .tag=Warning_Playback_Volume , + .ctl={.name="Warning_Volume",.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.count=2, .maxval=255, .value=204} + }, + { .tag=System_Playback_Volume , + .ctl={.name="System_Volume", .numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.count=2, .maxval=255, .value=204 } + }, + { .tag=Startup_Playback_Volume , + .ctl={.name="Startup_Volume", .numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.count=2, .maxval=255, .value=204} + }, + { .tag=Shutdown_Playback_Volume , + .ctl={.name="Shutdown_Volume",.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.count=2, .maxval=255, .value=204 } + }, { .tag=EndHalCrlTag} /* marker for end of the array */ } ; // HAL sound card mapping info STATIC alsaHalSndCardT alsaHalSndCard = { - .name = "USB Audio Device", // WARNING: name MUST match with 'aplay -l' - .info = "Hardware Abstraction Layer for IntelHDA sound card", + .name = "USB-Audio", // Match any USB audio sound card + .info = "Hardware Abstraction Layer for Generic USB Audio sound card", .ctls = alsaHalMap, }; @@ -163,7 +178,7 @@ STATIC int sndServiceInit() { // API prefix should be unique for each snd card PUBLIC const struct afb_binding_v2 afbBindingV2 = { - .api = "usbaudio", + .api = "usb-audio", .init = sndServiceInit, .verbs = halServiceApi, .onevent = halServiceEvent, |