Skip to content

[feature][sof->pulseaudio] Thinking about dropping the UCM, try to use legacy hdaudio mixer name #920

Closed

Description

@jason77-wang

And I think we should not use the UCM for the sof/dmic for long term, it is fine to use UCM for this project due to the urgent schedule.

  1. If the desgin of dmic->pch is not changed, but the codec is changed (it is very common issue, alc236->alc285->alcxxx or conextant codec, ...), we need to add a new ucm since codec changes usually means mixer changes.

  2. If the desgin of dmic->pch is not changed, and the codec is not changed, but the verb table is changed (ie there are one more headphone, mic or linein lineout), the mixer will change, then we have to add a new UCM

  3. nothing changes, but the legacy hdaudio driver changes (hda_generic. patch_realtek.c), the mixer will change, then the UCM need to be changed or need to add a new UCM.

anyway, once the mixer has a minor change, the UCM need to be changed or need to add a new UCM.

I think Intel should try to change the dmic related mixer names to the ones used by legacy hdaudio, then the pulseaudio will support this design automatically.

Activity

  1. changed the title [-][sof->pulseaudio] Thinking about dropping the UCM, try to use legacy hdaudio mixer name[/-] [+][feature][sof->pulseaudio] Thinking about dropping the UCM, try to use legacy hdaudio mixer name[/+] on May 9, 2019
  2. jason77-wang commented on May 16, 2019

    @jason77-wang
    Author

    I just have a try with this idea, Looks like except the HDMI audio still can't work, others works better than before, the audio-selection-dialogue can shows up now:

    add sof-skl_hda_car cards.HDA-Intel in the /usr/share/alsa/cards/aliases.conf

    add below section to /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf
    [Mapping analog-stereo-dmic]
    device-strings = hw:%f,6
    channel-map = left,right
    paths-input = analog-input-internal-dmic
    priority = 10

    change the attached file's name from conf.txt to conf
    put the file analog-input-internal-dmic.conf to /usr/share/pulseaudio/alsa-mixer/paths/

    change the ucm folder name to a different one.
    reboot
    analog-input-internal-dmic.conf.txt

  3. mengdonglin commented on May 17, 2019

    @mengdonglin

    @jason77-wang Thanks!
    @libinyang is working #935 to improve ASoC/SOF driver support for HDMI hotplug. Still in progress. I think this will improve your integration even w/o UCM.

  4. mengdonglin commented on May 17, 2019

    @mengdonglin

    @jason77-wang @lgirdwood @RanderWang @kv2019i Let's cover the concern in feature #956

  5. libinyang commented on May 17, 2019

    @libinyang

    As we discussed before that we preferred UCM. UCM has a formal interface and easy to extend, doesn't it? @lgirdwood

    What's my concern for legacy method is not HDMI's naming, but other mixers, such as DMIC and other pipelines mixer name. Do we have a good solution for all the mixer names?

  6. jason77-wang commented on May 28, 2019

    @jason77-wang
    Author

    For DMIC+Hda Legacy machines, if we drop ucm, it will save us lots of effort. This is a proto-type of dropping ucm, the dmic, hdmi and audio-selection-menu all can work. and Could we change the HDMI audio Jack name to:
    HDMI/DP,pcm=3 Jack HDMI/DP,pcm=7 Jack HDMI/DP,pcm=8 Jack, this will save our effort to change the pulseaudio.

    To test the proto-type, please rename the attached file to tar.bz2.

    1. edit /usr/share/alsa/alsa.conf to add:
      pcm.dmic cards.pcm.dmic

    2. edit /usr/share/alsa/cards/aliases.conf to add:
      sof-skl_hda_car cards.SOF-Intel

    3. put SOF-Intel.conf to /usr/share/alsa/cards/

    4. put dmic.conf to /usr/share/alsa/pcm/

    5. edit /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf to add:
      [Mapping analog-stereo-dmic]
      device-strings = dmic:%f
      channel-map = left,right
      paths-input = analog-input-internal-dmic
      priority = 10

    6. put the analog-input-internal-dmic.conf to /usr/share/pulseaudio/alsa-mixer/paths

    7. edit /usr/share/pulseaudio/alsa-mixer/paths/hdmi-output-0.conf to change:
      [Jack HDMI/DP,pcm=3] to [Jack HDMI/DP, pcm=11]

    8. edit /usr/share/pulseaudio/alsa-mixer/paths/hdmi-output-1.conf to change:
      [Jack HDMI/DP,pcm=7] to [Jack HDMI/DP, pcm=12]

    9. edit /usr/share/pulseaudio/alsa-mixer/paths/hdmi-output-2.conf to change:
      [Jack HDMI/DP,pcm=8] to [Jack HDMI/DP, pcm=13]

    reboot

    menu.tar.bz2.txt

  7. RanderWang commented on May 29, 2019

    @RanderWang

    @jason77-wang do we need to create a jack for dmic in driver ?

  8. kv2019i commented on Jul 15, 2019

    @kv2019i
    Collaborator
  9. kv2019i commented on Nov 7, 2019

    @kv2019i
    Collaborator

    @jason77-wang Coming back to this issue. We have now got the common HDMI driver merged upstream, so the difference in HDMI control names between non-DSP and DSP (SOF) configurations has been removed.

    DMIC remains, but you can now support configurations without UCM by modifying ALSA and pulseaudio configurations, but we believe UCM is still the better approach long-term as you will get well-defined use-case configurations for all applications (not just pulseaudio) by use of UCM, and Pulseaudio can use the UCM files as well.

    There is now ongoing effort on alsa-devel to improve the UCM infrastructure to ease the effort in maintaining UCM files. With these changes, typical HDA configurations can be handled with a common UCM file (and we have already updated these in the upstream UCM repository). Plus you have infrastructure how to make per product configurations. E.g. by providing a more specific UCM file for a given, you can configure special codec features, apply EQs or other processing and so forth.

    Link to discussion:
    https://mailman.alsa-project.org/pipermail/alsa-devel/2019-November/158029.html

    Please also note that this infrastructure allows to cover non-discoverables codecs like I2S and SoundWire. Unlike HDA, these don't have built-in support in Pulseaudio, so additional configuration logic might be needed and UCM provides tools for this.

  10. plbossart commented on Jan 17, 2020

    @plbossart
    Member

    there's no plan to avoid UCM, so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionOpen discussion and clarification

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions