Hello.
I am writing an asoc codec driver and stuck with mixer and output naming. Could someone clarify a few things? This codec has two playback PGAs and 4 outputs:
PGA1 -> [Speaker,Headphone,Line Out] PGA2 -> [Mono Output]
[PGA1] controls volume and mute for all three outputs. [Speaker,Headphone,Line Out] have only mute.
[PGA2] controls volume and mute. [Mono Output] also has mute.
Codec is bound to platform driver via simple-audio-card: simple-audio-card,widgets = "Headphone", "Headphones", "Speaker", "Speakers", "Line", "Line Out Jack";
simple-audio-card,routing = "Headphones", "HPOUT", "Speakers", "SPKOUT", "Line Out Jack", "LINEOUT";
Is it possible to name mixer controls so that no further configuration is required when the driver is loaded? i.e. pulseaudio automatically detects all these outputs and controls, correctly maps them and allows switching between them?
Currently i have this configuration(simplified):
SOC_DOUBLE_S8_TLV("Master Playback Volume", PGA1, ...) SOC_DOUBLE("Master Playback Switch", PGA1, ...)
SOC_SINGLE("Speaker Playback Switch", ...) SOC_SINGLE("Headphone Playback Switch", ...) SOC_SINGLE("Line Out Playback Switch", ...)
SOC_SINGLE_S8_TLV("Mono Output Playback Volume", PGA2...) SOC_SINGLE("Mono Output Playback Switch", PGA2....)
With these settings pulseaudio only detects Speaker and Headphone (but not Line Out because it wants to find its Jack) But as I understand "Master Playback" assumes control for all sound streams, so this is probably not correct =\
If it is impossible to name those elements that way so everything is autodetected, what should i use then? Write a machine audio driver or use alsaucm?