Audio HAL control name must be dynamic

Description

In the HAL (e.g. from Intel) we list the control name in a way that they must match exactly the alsa driver output.

As this changes with HW platform (e.g. from a PC to a Minnow) creating a multiplatform binary is not possible.

For example as a hack to go to CES, I have changed the file IntelHdaHAL.c to declare the same control with multiple name.

{ .tag=Master_Playback_Volume, .ctl={.name="Master Playback Volume", .value=100 } },
{ .tag=Master_Playback_Volume, .ctl={.name="Video_Volume", .value=100 } },

It will create a warning but at least gives back some control.

The solution remains a hack and the simple control should be read from the alsa actual configuration.

 

Control name on real target can be read with the command (change hw:0 by valid ID to read other card that the default one)

amixer -D hw:0 controls

 

 

Environment

None

Activity

Show:

Sebastien Douheret 
May 29, 2019 at 2:58 PM

Regarding Jonathan's comment, HAL control name can be change using json config file.

Feel free to re-open this defect if you think that it's not enough in your opinion.

Jonathan Aillet 
March 25, 2019 at 12:53 PM

With 4A, controls are defined in json instead of being defined in c code.
So, you just have to change your control name in json configuration file and reload 4a service to update them.

You can also easily switch from one hal configuration to another by moving files from etc.availble/ to etc/ and reload 4a service.

However, it is not recommended to have the same hal configuration file if the sound device does not have the same entry in '/dev/snd/'.

Is it dynamic enough ?

 

Sebastien Douheret 
October 30, 2018 at 4:34 PM

: would you please tell us if you still encounter this issue with the new 4a audio framework ?

Sebastien Douheret 
May 30, 2018 at 3:02 PM

: would you please confirm that this issue is fixed by the new controller based HAL ?

Won't Fix

Details

Assignee

Reporter

Labels

Contract ID

Components

Priority

Created December 13, 2017 at 7:02 AM
Updated May 30, 2019 at 4:11 PM
Resolved May 29, 2019 at 2:58 PM

Flag notifications