<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>28648</bug_id>
          
          <creation_ts>2013-03-09 04:41:58 +0400</creation_ts>
          <short_desc>неудобный приоритет звуковых карт в alsa</short_desc>
          <delta_ts>2022-09-30 14:23:05 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>alsa-plugins</component>
          <version>unstable</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="LugumanovAlexandr">sasalug</reporter>
          <assigned_to name="Michael Shigorin">mike</assigned_to>
          <cc>mike</cc>
    
    <cc>rider</cc>
    
    <cc>shrek</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>138491</commentid>
    <comment_count>0</comment_count>
    <who name="LugumanovAlexandr">sasalug</who>
    <bug_when>2013-03-09 04:41:58 +0400</bug_when>
    <thetext>При наличии звуковой карты на видеокарте - она получает в alsa приоритет перед основной звуковой картой, используемой в системе.
Что, видимо, не правильно, потому как я не использую встроенное аудио видеокарты :) (может кто-то и использует?)
Если нет графической утилиты для настройки приоритета модулей alsa (например в lxde) - необходимо править конфигурационный файл /etc/modprobe.d/alsa-modindex.conf, что не очень удобно и не всем по силам.
На форуме предложили такое решение: добавить в вышеупомянутый конфиг строки:

options snd-usb-audio index=0
options snd-hda-intel index=1
options snd-hda-intel index=2  id=&quot;NVidia&quot;

что сделает самыми приоритетными usb-устройства, для горячего подключения, затем обычную аудиокарту, а nvidi-евский чип отодвинет в самый конец.

Вот обсуждение:
http://194.107.17.160/index.php/topic,28619.msg199188.html#msg199188</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>138498</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2013-03-09 18:16:55 +0400</bug_when>
    <thetext>По результатам огугливания и проверки на USB-гарнитуре:

- если прибить индексы гвоздями, по умолчанию звука может не быть (т.к. в 0);
- некоторым как раз _не_ нужен звук по умолчанию в гарнитуру;
- некоторым как раз нужен звук в HDMI.

Так что alsa-modindex.conf можно только поправить в плане комментариев:

## spare index=0 for a hotplug soundcard (if any)
#options snd-usb-audio index=0

## offset HDMI output compared to onboard audio (#28648)
#options snd_hda_intel index=2,3

#options snd_intel8x0 index=2
#options snd_via82xx index=2
#options snd-bt87x index=3
#options snd_intel8x0m index=4
#options snd-atiixp-modem index=4
#options snd-via82xx-modem index=4

## get PC speaker out of the way
options snd_pcsp index=10

Для более цивильного конфигурирования вручную надо написать модуль alterator -- см. тж. bug #7347; для переконфигурирования на лету следует применять pulseaudio или jack.

Вот правило udev для переключения умолчания при подключении звукочипа:

https://wiki.archlinux.org/index.php/Advanced_Linux_Sound_Architecture#Hot-plugging_a_USB_Sound_Card</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>138500</commentid>
    <comment_count>2</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2013-03-09 19:59:02 +0400</bug_when>
    <thetext>libalsa-1:1.0.26-alt3 -&gt; sisyphus:

* Sat Mar 09 2013 Michael Shigorin &lt;mike@altlinux&gt; 1:1.0.26-alt3
- alsa-modindex.conf: promote USB audio, demote HDMI audio example
  (closes: #28648)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>157070</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2016-05-27 13:24:00 +0300</bug_when>
    <thetext>Как ещё один вариант, может пригодиться:

options snd_hda_intel index=1,0

(на случай, когда по умолчанию звук ушёл в HDMI, а не в набортное ноута)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>215471</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Shigorin">mike</who>
    <bug_when>2022-09-30 14:23:05 +0300</bug_when>
    <thetext>Для архива: посмотреть текущее соответствие модулей и индексов можно так:

$ cat /proc/asound/modules
 0 snd_hda_intel
 1 snd_hda_intel
 2 snd_usb_audio

Спасибо Speccyfighter за http://forum.altlinux.org/index.php?topic=32855.0</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>