Add a description and workaround for the problem where the built-in

sound devices of graphic cards are being assigned lower device numbers.
In order to use them, one has to change sysctls to the proper device
number than is being shown in the dmesg output.

PR:                 docs/155264
Submittted by:      Martin Ziegler (martin dot ziegler at ziegi dot ch)
Patch created by:   Niclas Zeising (niclas dot zeising at gmail dot com)
Minor additions by: me
This commit is contained in:
Benedict Reuschling 2011-05-23 16:08:54 +00:00
parent 558349fdf0
commit 3abf22679b
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=37288

View file

@ -353,6 +353,47 @@ kld snd_ich (1p/2r/0v channels duplex default)</screen>
</tbody>
</tgroup>
</informaltable>
<para>Another issue is that modern graphics cards often come with their
own sound driver, for use with <acronym>HDMI</acronym> and similar.
This sound device will sometimes be enumerated before the actual
soundcard and the soundcard will subsequently not be used as the
default playback device. To check if this is the case, run
<application>dmesg</application> and look for <literal>pcm</literal>.
The output looks something like this:</para>
<programlisting>...
hdac0: HDA Driver Revision: 20100226_0142
hdac1: HDA Driver Revision: 20100226_0142
hdac0: HDA Codec #0: NVidia (Unknown)
hdac0: HDA Codec #1: NVidia (Unknown)
hdac0: HDA Codec #2: NVidia (Unknown)
hdac0: HDA Codec #3: NVidia (Unknown)
pcm0: &lt;HDA NVidia (Unknown) PCM #0 DisplayPort&gt; at cad 0 nid 1 on hdac0
pcm1: &lt;HDA NVidia (Unknown) PCM #0 DisplayPort&gt; at cad 1 nid 1 on hdac0
pcm2: &lt;HDA NVidia (Unknown) PCM #0 DisplayPort&gt; at cad 2 nid 1 on hdac0
pcm3: &lt;HDA NVidia (Unknown) PCM #0 DisplayPort&gt; at cad 3 nid 1 on hdac0
hdac1: HDA Codec #2: Realtek ALC889
pcm4: &lt;HDA Realtek ALC889 PCM #0 Analog&gt; at cad 2 nid 1 on hdac1
pcm5: &lt;HDA Realtek ALC889 PCM #1 Analog&gt; at cad 2 nid 1 on hdac1
pcm6: &lt;HDA Realtek ALC889 PCM #2 Digital&gt; at cad 2 nid 1 on hdac1
pcm7: &lt;HDA Realtek ALC889 PCM #3 Digital&gt; at cad 2 nid 1 on hdac1
...</programlisting>
<para>Here the graphics card (<literal>NVidia</literal>) has been
enumerated before the sound card (<literal>Realtek ALC889</literal>).
To use the sound card as default playback device, change
<literal>hw.snd.default_unit</literal> to the unit that should be used
for playback, enter the following:</para>
<screen>&prompt.root; <userinput>sysctl hw.snd.default_unit=<replaceable>n</replaceable></userinput></screen>
<para>Here, <literal>n</literal> is the number of the sound device to
use, in this example <literal>4</literal>. You can make this change
permanent by adding the following line to
<filename>/etc/sysctl.conf</filename>:</para>
<programlisting>hw.snd.default_unit=<replaceable>4</replaceable></programlisting>
</sect3>
</sect2>