mNo edit summary |
(Change according to the review (2step).) |
||
Line 5: | Line 5: | ||
== Setup == | == Setup == | ||
# This test case should be performed on | # This test case should be performed on '''bare-metal machines'''. | ||
# 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 34''' (or later). | ||
# Make sure the <code>alsa-utils</code> package is installed. | # Make sure the <code>alsa-utils</code> package is installed. | ||
# Connect your speakers ( | # Connect your '''speakers''' (headphones) to your computer’s sound device. | ||
# | # 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 <audiofile></code></p></li> | <p><code>$ aplay -D sysdefault <audiofile.wav></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.</p> | ||
<p><code>$ aplay -D hw:X <audiofile></code></p></li> | <p><code>$ aplay -D hw:X <audiofile.wav></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 <audiofile></code></p></li> | <p><code>$ aplay -D pipewire <audiofile.wav></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.</p> | ||
<p><code>$ aplay -D sysdefault:CARD=USB <audiofile></code><ref><p>The device identifier might differ on your machine.</p></ref></p></li> | <p><code>$ aplay -D sysdefault:CARD=USB <audiofile.wav></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 | # Audio can be played over different endpoints using the <code>aplay</code> command. | ||
# 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> | ||
Revision as of 13:15, 18 February 2021
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
- This test case should be performed on bare-metal machines.
- The computer must be equipped with a sound device.
- Install a desktop version of Fedora 34 (or later).
- Make sure the
alsa-utils
package is installed. - Connect your speakers (headphones) to your computer’s sound device.
- 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. - Perform the following steps as a regular user.
How to test
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
)Play the audio file (wav) over the default device.
$ aplay -D sysdefault <audiofile.wav>
Play the audio file (wav) over a selected ALSA device.
$ aplay -D hw:X <audiofile.wav>
Play the audio file (wav) over the pipewire device.
$ aplay -D pipewire <audiofile.wav>
Play the audio file (wav) over the physical device.
$ aplay -D sysdefault:CARD=USB <audiofile.wav>
[1]Repeat the above step for all physical devices.
Run
alsamixer
and try setting the volume for a physical device use while playing some audio.
Expected results
aplay -L
lists physical and logical devices on the system.- Audio can be played over different endpoints using the
aplay
command. - Volume levels can be adjusted for physical devices using
alsamixer
[2]