ucm2: HDA: HiFi-analog/mic: Refactor the analog mic discovery and pre…

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



alsa-project/alsa-ucm-conf pull request #526 was opened from ujfalusi:

…sentation

The current mic device creation works on certain machines and fails on others. There are several places of conflicts and setups which can only just fail, but this is mostly not an issue if the user never uses the mic, only the speaker/headset - which, to be honest is what most of us do ;)

As an example:
The mic selection in most codecs are via enum and it is assumed to be named 'Input Source', which is not always the case as some device uses 'Capture Source' for the control's name.
There is also different sets of mics that one can select from: Exhibit A
numid=6,iface=MIXER,name='Input Source'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Headset Mic'
  ; Item #1 'Headphone Mic'
  : values=1

Exhibit B
numid=6,iface=MIXER,name='Capture Source'
  ; type=ENUMERATED,access=rw------,values=1,items=2
  ; Item #0 'Internal Mic'
  ; Item #1 'Headset Mic'
  : values=0

Exhibit C
numid=6,iface=MIXER,name='Capture Source'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Internal Mic'
  ; Item #1 'Headset Mic'
  ; Item #2 'Headphone Mic'
  : values=0

Exhibit D (this pushes the limits... The patch will ignore item 1) numid=6,iface=MIXER,name='Capture Source'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'Internal Mic'
  ; Item #1 'Internal Mic 1'
  ; Item #2 'Mic'
  : values=2

Other issue is that we have this 'Headphone Mic', which turned out to be a 'Stereo Microphone in Headphone Jack', so if it is selected then the Headphone cannot work, they conflict, they use the same rings for different direction and purpose.

This patch aims to make the mic discovery a bit more deterministic and pragmatic.

But even if the UCM creates the use case profiles correctly, it is still up to UIs (KDE/GNOME/etc) to misunderstand how UCM presents the profiles, what they mean and most of all what 'Mic1', `Mic2', etc is. KDE presents the profiles as they are and user can selct between them to pick the right combination of output and input.
GNOME goes further with simplification (and fails with it) and presents 'random' Configuration profiles for Output and Input, plus a device selection and they do work in an interesting way. GNOME also have popup for specifying the type of the plugged accessory, which does not worl at all with UCM profiles.

But, this patch is meant for a small step to have clear rules based mic presentation for HDA.

The expectation is that what have worked will work as it used to and what did not worked should be detected and presented correctly.

Request URL   : https://github.com/alsa-project/alsa-ucm-conf/pull/526
Patch URL     : https://github.com/alsa-project/alsa-ucm-conf/pull/526.patch
Repository URL: https://github.com/alsa-project/alsa-ucm-conf




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux