From Fedora Project Wiki

(Draft of the ALSA backend test case)
 
m (fixed prev. edit)
Tag: Manual revert
 
(10 intermediate revisions by 2 users not shown)
Line 5: Line 5:
== Setup ==
== Setup ==


# This test case should be performed on a bare machine.
# This test case should be performed on '''bare-metal''' machines. To be able to test with '''virtual''' machines, consider a [https://fedoraproject.org/wiki/QA:Howto_USB_Passtrough USB device pass-through]. Leave a note in the comments if you have performed this test using the VM with the USB Passthrough strategy.
# The computer must be equipped with a sound device.
# The computer must be equipped with a '''sound device'''.
# Install a desktop version of Fedora 34 (or later).
# Install a desktop version of '''Fedora 35''' (or later).
# Log in as a ''common user''.
# Make sure the <code>alsa-utils</code> package is installed.
# Make sure the <code>alsa-utils</code> package is installed.
# Connect your speakers (headphoned) to your computer’s sound device.
# Connect your '''speakers''' (headphones) to your computer’s sound device.
# Keep an audio file at hand (wav).
# Use an audio file in ''wav'' format. If you do not have one you can [https://pagure.io/fedora-qa/test_cases/blob/master/f/fedora_sample.wav download a suitable audio file]. Some default files can be also found in the <code>/usr/share/sounds/</code> directory.
# Perform the following steps as a '''regular user'''.


== How to test ==
== How to test ==
Line 22: Line 22:
<p>Identify the ones that represent the logical (<code>default</code>, <code>pipewire</code>) or a physical device (<code>sysdefault:CARD=USB</code>, <code>sysdefault:CARD=PCH </code>)</p></li>
<p>Identify the ones that represent the logical (<code>default</code>, <code>pipewire</code>) or a physical device (<code>sysdefault:CARD=USB</code>, <code>sysdefault:CARD=PCH </code>)</p></li>
<li><p>Play the audio file (wav) over the default device.</p>
<li><p>Play the audio file (wav) over the default device.</p>
<p><code>$ aplay -D sysdefault &lt;audiofile&gt;</code></p></li>
<p><code>$ aplay -D sysdefault &lt;audiofile.wav&gt;</code></p></li>
<li><p>Play the audio file (wav) over a selected ALSA device.</p>
<li><p>Play the audio file (wav) over a selected ALSA device. Make sure that you do not have another audio application running in the background, because the command would end up in error due to the device being blocked by another application.</p>
<p><code>$ aplay -D hw:X &lt;audiofile&gt;</code></p></li>
<p><code>$ aplay -D hw:X &lt;audiofile.wav&gt;</code></p></li>
<li><p>Play the audio file (wav) over the pipewire device.</p>
<li><p>Play the audio file (wav) over the pipewire device.</p>
<p><code>$ aplay -D pipewire &lt;audiofile&gt;</code></p></li>
<p><code>$ aplay -D pipewire &lt;audiofile.wav&gt;</code></p></li>
<li><p>Play the audio file (wav) over the physical device.</p>
<li><p>Play the audio file (wav) over the physical device. The Step 3 limitation applies here, too.</p>
<p><code>$ aplay -D sysdefault:CARD=USB &lt;audiofile&gt;</code><ref><p>The device identifier might differ on your machine.</p></ref></p></li>
<p><code>$ aplay -D sysdefault:CARD=USB &lt;audiofile.wav&gt;</code><ref><p>The device identifier might differ on your machine.</p></ref></p></li>
<li><p>Repeat the above step for all physical devices.</p></li>
<li><p>Repeat the above step for all physical devices.</p></li>
<li><p>Run <code>alsamixer</code> and try setting the volume for a physical device use while playing some audio.</p></li></ol>
<li><p>Run <code>alsamixer</code> and try setting the volume for a physical device use while playing some audio.</p></li></ol>
Line 35: Line 35:


# <code>aplay -L</code> lists physical and logical devices on the system.
# <code>aplay -L</code> lists physical and logical devices on the system.
# Audio is playing through the default system device.
# Audio can be played over different endpoints using the <code>aplay</code> command.
# Audio is playing through the selected physical device.
# Audio is playing through the default PipeWire device.
# Audio is playing through the selected physical device.
# Audio is playing through the selected physical device (of applicable).
# Volume levels can be adjusted for physical devices using <code>alsamixer</code><ref>This is valid for devices that support software volume adjusting. USB cards often use dedicated hardware knobs to do it and they cannot be controlled programmatically.</ref>
# Volume levels can be adjusted for physical devices using <code>alsamixer</code><ref>This is valid for devices that support software volume adjusting. USB cards often use dedicated hardware knobs to do it and they cannot be controlled programmatically.</ref>


Line 45: Line 41:


<references />
<references />
[[Category:Test Days Test Cases]]
[[Category:Package_pipewire_test_cases]]

Latest revision as of 02:03, 26 July 2023

ALSA backend

This test case tests that ALSA works as a sound backend and that various frontends can be used to communicate with it.

Setup

  1. This test case should be performed on bare-metal machines. To be able to test with virtual machines, consider a USB device pass-through. Leave a note in the comments if you have performed this test using the VM with the USB Passthrough strategy.
  2. The computer must be equipped with a sound device.
  3. Install a desktop version of Fedora 35 (or later).
  4. Make sure the alsa-utils package is installed.
  5. Connect your speakers (headphones) to your computer’s sound device.
  6. Use an audio file in wav format. If you do not have one you can download a suitable audio file. Some default files can be also found in the /usr/share/sounds/ directory.
  7. Perform the following steps as a regular user.

How to test

  1. List the sound devices known to ALSA.

    $ aplay -l

    or (for more details)

    $ aplay -L

    Identify the ones that represent the logical (default, pipewire) or a physical device (sysdefault:CARD=USB, sysdefault:CARD=PCH )

  2. Play the audio file (wav) over the default device.

    $ aplay -D sysdefault <audiofile.wav>

  3. Play the audio file (wav) over a selected ALSA device. Make sure that you do not have another audio application running in the background, because the command would end up in error due to the device being blocked by another application.

    $ aplay -D hw:X <audiofile.wav>

  4. Play the audio file (wav) over the pipewire device.

    $ aplay -D pipewire <audiofile.wav>

  5. Play the audio file (wav) over the physical device. The Step 3 limitation applies here, too.

    $ aplay -D sysdefault:CARD=USB <audiofile.wav>[1]

  6. Repeat the above step for all physical devices.

  7. Run alsamixer and try setting the volume for a physical device use while playing some audio.

Expected results

  1. aplay -L lists physical and logical devices on the system.
  2. Audio can be played over different endpoints using the aplay command.
  3. Volume levels can be adjusted for physical devices using alsamixer[2]

Footnotes

  1. The device identifier might differ on your machine.

  2. This is valid for devices that support software volume adjusting. USB cards often use dedicated hardware knobs to do it and they cannot be controlled programmatically.