summaryrefslogtreecommitdiffstats
path: root/Jabra-Solemate
diff options
context:
space:
mode:
authorFulup Ar Foll <fulup@iot.bzh>2017-11-04 15:05:18 +0100
committerFulup Ar Foll <fulup@iot.bzh>2017-11-04 15:05:18 +0100
commitb93f9134f7342fcbf9fb15399e19f830401a7fe7 (patch)
tree73656f5afb700729301d0507e27782e3f393881c /Jabra-Solemate
parente866930eade8dbc24e21b8f814d83fed4049e3df (diff)
Updated HAL to match with latest Alsa-Core API
Diffstat (limited to 'Jabra-Solemate')
-rw-r--r--Jabra-Solemate/JabraUsbHAL.c52
1 files changed, 34 insertions, 18 deletions
diff --git a/Jabra-Solemate/JabraUsbHAL.c b/Jabra-Solemate/JabraUsbHAL.c
index 2ad3fb0..6a4ffd0 100644
--- a/Jabra-Solemate/JabraUsbHAL.c
+++ b/Jabra-Solemate/JabraUsbHAL.c
@@ -106,45 +106,61 @@ STATIC alsaHalMapT alsaHalMap[]= {
// Sound card does not have hardware volume ramping
{ .tag=Master_Playback_Ramp , .cb={.callback=volumeRamp, .handle=&volRampMaster}, .info="ramp volume linearly according to current ramp setting",
- .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .count=1, .minval=0, .maxval=100, .step=1, .name="Rampup Master"}
+ .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Rampup Master", .value=100}
},
// Implement Rampup Volume for Virtual Channels (0-100)
{ .tag=Guidance_Playback_Ramp, .cb={.callback=volumeRamp, .handle=&volRampGuidance}, .info="RampUp Guidance Volume",
- .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.name="Guidance_Ramp", .minval=0, .maxval=100, .step=1, .value=80 }
+ .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.name="Guidance_Ramp", .value=80 }
},
{ .tag=Entertainment_Playback_Ramp, .cb={.callback=volumeRamp, .handle=&volRampEntertainment}, .info="Rampup Entertainment Volume",
- .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.name="Entertainment_Ramp", .minval=0, .maxval=100, .step=1, .value=80 }
+ .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.name="Entertainment_Ramp", .value=80 }
},
{ .tag=Notification_Playback_Ramp, .cb={.callback=volumeRamp, .handle=&volRampNotification}, .info="Ramp-up Notification Volume",
- .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Notification_Ramp", .minval=0, .maxval=100, .step=1, .value=80 }
+ .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Notification_Ramp", .value=80 }
},
{ .tag=Communication_Playback_Ramp, .cb={.callback=volumeRamp, .handle=&volRampCommunication}, .info="RampUp Communication Volume",
- .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.name="Communication_Ramp", .minval=0, .maxval=100, .step=1, .value=80 }
+ .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER,.name="Communication_Ramp", .value=80 }
},
{ .tag=Warning_Playback_Ramp, .cb={.callback=volumeRamp, .handle=&volRampWarning}, .info="Ramp-up Warning Volume",
- .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Warning_Ramp", .minval=0, .maxval=100, .step=1, .value=80 }
+ .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Warning_Ramp", .value=80 }
},
{ .tag=System_Playback_Ramp, .cb={.callback=volumeRamp, .handle=&volRampSystem}, .info="Ramp-up System Volume",
- .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="System_Ramp", .minval=0, .maxval=100, .step=1, .value=80 }
+ .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="System_Ramp", .value=80 }
},
{ .tag=Startup_Playback_Ramp, .cb={.callback=volumeRamp, .handle=&volRampStartup}, .info="Ramp-up Startup Volume",
- .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Startup_Ramp", .minval=0, .maxval=100, .step=1, .value=80 }
+ .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Startup_Ramp", .value=80 }
},
{ .tag=Shutdown_Playback_Ramp, .cb={.callback=volumeRamp, .handle=&volRampShutdown}, .info="Ramp-up Shutdown Volume",
- .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Shutdown_Ramp", .minval=0, .maxval=100, .step=1, .value=80 }
+ .ctl={.numid=CTL_AUTO, .type=SND_CTL_ELEM_TYPE_INTEGER, .name="Shutdown_Ramp", .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 } },
+ { .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 }
+ },
// Could have similar controls for input side
{ .tag=EndHalCrlTag} /* marker for end of the array */
@@ -168,7 +184,7 @@ STATIC int sndServiceInit () {
// API prefix should be unique for each snd card
PUBLIC const struct afb_binding_v2 afbBindingV2 = {
- .api = "jabra-usb",
+ .api = "usb-jabra",
.init = sndServiceInit,
.verbs = halServiceApi,
.onevent = halServiceEvent,