From Fedora Project Wiki

(Draft of the PipeWire CLI test case)
 
(→‎How to test: Forgot to update listing devices for recording)
 
(8 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 and a microphone (or another source of audio).
# The computer must be '''equipped with a sound device and a microphone''' (or another input source of audio).
# Install a desktop version of '''Fedora 34''' (or later).
# Install a desktop version of '''Fedora 35''' (or later).
# Log in as a ''common user''.
# Check that the <code>pipewire-utils</code> and <code>wireplumber</code> packages are installed. If not, report it and install them.
# Install the <code>pipewire-utils</code> package.
# Connect your '''speakers''' (headphones) to the default sound device.
# Connect your speakers (headphones) to the default sound device.
# Have an '''audio file''' in the ''wav'' format at your disposal. 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 also be found in the <code>/usr/share/sounds/</code> directory.
# Have an audio file ready (wav).
# Perform the following test case as a '''regular user'''.


== How to test ==
== How to test ==


<ol>
<ol>
<li><p>List all available playback devices (targets).</p>
<li><p>List all available devices (targets) and check that all your output sound devices are listed.</p>
<p><code>$ pw-cat -p --list-targets</code></p>
<p><code>$ wpctl status</code></p>
<p>You will notice a number identifying a particular target. Also, the default target is marked with an asterisk (<code>*</code>).</p></li>
<p>Note that each target has an identification number assigned. The default target is marked with an asterisk (<code>*</code>). Check that it matches your default audio device.</p></li>
<li><p>Play a sound file over the default target.</p>
<li><p>Play a wav sound file over the default target and check that it is correctly played over the default sound device.</p>
<p><code>$ pw-cat -p &lt;audiofile&gt;</code></p></li>
<p><code>$ pw-cat -p &lt;audiofile.wav&gt;</code></p></li>
<li><p>Play a sound file and set the volume level.</p>
<li><p>Play a wav sound file while setting the volume to a low level. Check that the playback is quieter when compared to the previous step.</p>
<p><code>$ pw-cat -p --volume=0.1 &lt;audiofile&gt;</code></p></li>
<p><code>$ pw-cat -p --volume=0.1 &lt;audiofile.wav&gt;</code></p></li>
<li><p>List all available recording devices (targets).</p>
<li><p>List all available devices (targets) and check that all your input sound devices are listed.</p>
<p><code>$ pw-cat -r --list-targets</code></p></li>
<p><code>$ wpctl status</code></p></li>
<li><p>Connect your microphone (or a source of audio) to the default sound device.</p></li>
<li><p>Connect your microphone (or another input source of audio) to the default input sound device.</p></li>
<li><p>Record a sample recording using your default sound device.</p>
<li><p>Record a sample recording using your default sound device. Check that it has been correctly recorded. Use the playback command used in '''Step 2'''.</p>
<p><code>$ pw-cat -r audiotest.wav</code></p></li>
<p><code>$ pw-cat -r audiotest.wav</code></p></li>
<li><p>Record a sample recording using a different volume level.</p>
<li><p>Record a sample recording using a different volume level. Check that it has been correctly recorded. Compare the volume level with the first recordings and make sure this one is much quieter.</p>
<p><code>$ pw-cat -r --volume=0.1 quiet.wav</code></p></li>
<p><code>$ pw-cat -r --volume=0.1 quiet.wav</code></p></li>
<li><p>Record a sample recording using a different rate.</p>
<li><p>Record a sample recording using a different rate. Check that it has been correctly recorded. Compare the quality with the first recording and check that this recording sounds less clean and has an overall "lower" quality.</p>
<p><code>$ pw-cat -r --rate=6000 lowrate.wav</code></p></li>
<p><code>$ pw-cat -r --rate=6000 lowrate.wav</code></p></li>
<li><p>If you have more than one audio devices, you can repeat the previous steps with another device using the <code>--target</code> option, such as</p>
<li><p>If you have more than one audio devices, you can repeat the previous steps with another device using the <code>--target</code> option, such as</p>
<p><code>$ pw-cat -p --target=XX &lt;audiofile&gt;</code></p> <p>where <code>XX</code> stands for the device number obtained by the <code>--list-targets</code> option.</p></li></ol>
<p><code>$ pw-cat -p --target=XX &lt;audiofile&gt;</code> or <code>$ pw-cat -r --target=XX &lt;audiofile&gt;</code></p> <p>where <code>XX</code> stands for the device number obtained by the <code>--list-targets</code> option.</p></li>
<li><p>Alternatively, you can use dedicated commands to play and record audio, i.e. <code>pw-play</code> and <code>pw-record</code>.</p></li></ol>


== Expected results ==
== Expected results ==


# Playback targets are listed and they correspond to your audio devices.
# Playback targets are listed and they correspond to your audio devices.
# The audio file is correctly played back in step 3.
# Audio files can be played and recorded using the <code>pw-cat</code> command or its dedicated variants.
# The selected audio is played back much quieter when compared to step 3.
# Connected output and input sound devices work.
# Recording targets are listed and they correspond to your devices.
 
# The audio is correctly recorded and can be played back (using <code>pw-cat</code> or another application).
[[Category:Test Days Test Cases]]
# The audio recorded with limited volume (sensitivity) is much quieter when compared to the recording from step 7.
[[Category:Package_pipewire_test_cases]]
# The audio recorded with limited rate has much lower quality when compared to the recording from step 7.
# If you test different sound devices that have been recognized by ''PipeWire'', it must be possible to use them for playback and recording via the <code>--target</code> option.

Latest revision as of 09:30, 14 April 2023

PipeWire CLI tools

This test case tests that PipeWire can be controlled using CLI commands.

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 and a microphone (or another input source of audio).
  3. Install a desktop version of Fedora 35 (or later).
  4. Check that the pipewire-utils and wireplumber packages are installed. If not, report it and install them.
  5. Connect your speakers (headphones) to the default sound device.
  6. Have an audio file in the wav format at your disposal. If you do not have one, you can download a suitable audio file. Some default files can also be found in the /usr/share/sounds/ directory.
  7. Perform the following test case as a regular user.

How to test

  1. List all available devices (targets) and check that all your output sound devices are listed.

    $ wpctl status

    Note that each target has an identification number assigned. The default target is marked with an asterisk (*). Check that it matches your default audio device.

  2. Play a wav sound file over the default target and check that it is correctly played over the default sound device.

    $ pw-cat -p <audiofile.wav>

  3. Play a wav sound file while setting the volume to a low level. Check that the playback is quieter when compared to the previous step.

    $ pw-cat -p --volume=0.1 <audiofile.wav>

  4. List all available devices (targets) and check that all your input sound devices are listed.

    $ wpctl status

  5. Connect your microphone (or another input source of audio) to the default input sound device.

  6. Record a sample recording using your default sound device. Check that it has been correctly recorded. Use the playback command used in Step 2.

    $ pw-cat -r audiotest.wav

  7. Record a sample recording using a different volume level. Check that it has been correctly recorded. Compare the volume level with the first recordings and make sure this one is much quieter.

    $ pw-cat -r --volume=0.1 quiet.wav

  8. Record a sample recording using a different rate. Check that it has been correctly recorded. Compare the quality with the first recording and check that this recording sounds less clean and has an overall "lower" quality.

    $ pw-cat -r --rate=6000 lowrate.wav

  9. If you have more than one audio devices, you can repeat the previous steps with another device using the --target option, such as

    $ pw-cat -p --target=XX <audiofile> or $ pw-cat -r --target=XX <audiofile>

    where XX stands for the device number obtained by the --list-targets option.

  10. Alternatively, you can use dedicated commands to play and record audio, i.e. pw-play and pw-record.

Expected results

  1. Playback targets are listed and they correspond to your audio devices.
  2. Audio files can be played and recorded using the pw-cat command or its dedicated variants.
  3. Connected output and input sound devices work.