Bug 1248091 - Audio test ignores everything but HDMI devices when present
Audio test ignores everything but HDMI devices when present
Status: CLOSED ERRATA
Product: Red Hat Certification Program
Classification: Red Hat
Component: redhat-certification-hardware (Show other bugs)
1.0
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: brose
Brian Brock
:
Depends On:
Blocks: 1248707
  Show dependency treegraph
 
Reported: 2015-07-29 11:01 EDT by Gary Case
Modified: 2015-08-27 16:16 EDT (History)
2 users (show)

See Also:
Fixed In Version: 1.6.6-20150811.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1248707 (view as bug list)
Environment:
Last Closed: 2015-08-20 08:08:41 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Gary Case 2015-07-29 11:01:39 EDT
Description of problem:
On systems with both HDMI audio and a regular audio card (a laptop, for example), the AUDIO test will only run on the HDMI audio device. 

Version-Release number of selected component (if applicable):
redhat-certification-1.0-20150707.el7.noarch.rpm
redhat-certification-hardware-1.7.1-20150618.el7.noarch.rpm
redhat-certification-information-1.7.1-20150618.el7.noarch.rpm


How reproducible:
Every time

Steps to Reproduce:
1. Install RHEL 7.1 and the test suite on a laptop
2. Create a certification entry on the test server and associate the laptop with it
3. Note that there are two hwcert/audio test entries in the test plan, as expected
4. Run an audio test
5. The test runs twice, both times on the HDMI device

Actual results:
HDMI-only audio testing

Expected results:
Test runs on all audio devices

Additional info:
The two hwcert/audio entries list all the available audio hardware. Shouldn't they list only the specific device that test instance will be testing?
Comment 1 brose 2015-07-30 10:49:10 EDT
https://en.wikibooks.org/wiki/Configuring_Sound_on_Linux/ALSA/Troubleshooting#Invalid_card_specified

The error raised when running aplay is misleading, and the above link shows a solution to the problem.  But the real issue is why the other card is not being used in its aplay test.

The run method of the audio test returns out on the first aplay command failure, which appears to be happening for the hdmi related device driver.  It should still move on to the next test though..
Comment 2 brose 2015-07-30 11:02:10 EDT
I'm seeing in the log that the harness thinks it is running with card1 (after a card0 device run), but then subsequent print statements indicate that it is being run on card0.

So, somewhere it's supposed to be setting this device, it is not.  A fix may require change on rhc, rhc-hw, or both...
Comment 3 brose 2015-07-30 11:30:38 EDT
getUDI method checks if there's a device set for the object, finding that device's UDI if it is present before checking the parameters sent in with the test from the harness.  I do not know why this function is written this way, but I suspect the same test object is being used for multiple parameters because I have observed both parameter runs (in the larger audio test run), where the first run doesn't have a device prior to running, and the second test does (the device is that of the first test).

So, for the scope of this change, I think the solution should either be to clean out all of the object variables in the loop, or instantiate a new object for each run.
Comment 4 brose 2015-07-30 11:33:04 EDT
On second thought, there are other issues that need to be resolved soon and to limit the footprint of this change, knowing we should circle back and research this behavior on the larger scale anyway, the best option for now, may be to modify the audio test to not use the getUDI method, instead always use the parameter passed into the test.
Comment 10 Gary Case 2015-08-10 18:07:14 EDT
Ignore comment 9 please. This is what really happens.

Selecting the first of the two hwcert/audio runs displays this output

<output>

Sound Card:

udev device: /devices/pci0000:00/0000:00:03.0/sound/card0
------------------------------------------------------
SUBSYSTEM sound
ID_VENDOR_ID 0x8086
ID_VENDOR_FROM_DATABASE Intel Corporation
DEVPATH /devices/pci0000:00/0000:00:03.0/sound/card0
UDEV_LOG 3
ID_MODEL_FROM_DATABASE Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
ID_PATH pci-0000:00:03.0
SOUND_INITIALIZED 1
info.udi /devices/pci0000:00/0000:00:03.0/sound/card0
ID_MODEL_ID 0x0c0c
PULSE_PROFILE_SET extra-hdmi.conf
SOUND_FORM_FACTOR internal
ID_BUS pci


/proc/asound/card0/pcm8p/info
card: 0
device: 8
subdevice: 0
stream: PLAYBACK
id: HDMI 2
name: HDMI 2
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

/proc/asound/card0/pcm7p/info
card: 0
device: 7
subdevice: 0
stream: PLAYBACK
id: HDMI 1
name: HDMI 1
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

/proc/asound/card0/pcm3p/info
card: 0
device: 3
subdevice: 0
stream: PLAYBACK
id: HDMI 0
name: HDMI 0
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

Then, this question is displayed:

This test plays a sound sample and records it to another file. Please use the Volume Control application and insure that the Capture settings will record the sound. Continue?

If I say "Yes", I am taken to the "continuing audio test" intermediary screen. No sound comes out of any device at this point. 

Then this is displayed:

<output>

Sound Card:

udev device: /devices/pci0000:00/0000:00:1b.0/sound/card1
------------------------------------------------------
SUBSYSTEM sound
ID_VENDOR_ID 0x8086
ID_VENDOR_FROM_DATABASE Intel Corporation
DEVPATH /devices/pci0000:00/0000:00:1b.0/sound/card1
UDEV_LOG 3
ID_MODEL_FROM_DATABASE 8 Series/C220 Series Chipset High Definition Audio Controller
ID_PATH pci-0000:00:1b.0
SOUND_INITIALIZED 1
info.udi /devices/pci0000:00/0000:00:1b.0/sound/card1
ID_MODEL_ID 0x8c20
PULSE_PROFILE_SET extra-hdmi.conf
SOUND_FORM_FACTOR internal
ID_BUS pci


/proc/asound/card1/pcm0c/info
card: 1
device: 0
subdevice: 0
stream: CAPTURE
id: ALC3232 Analog
name: ALC3232 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

/proc/asound/card1/pcm0p/info
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: ALC3232 Analog
name: ALC3232 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

and this question is displayed:

This test plays a sound sample and records it to another file. Please use the Volume Control application and insure that the Capture settings will record the sound. Continue?

If I say "Yes", sound comes out of the laptop, and this is displayed:

<output>

Sound Card:

udev device: /devices/pci0000:00/0000:00:1b.0/sound/card1
------------------------------------------------------
SUBSYSTEM sound
ID_VENDOR_ID 0x8086
ID_VENDOR_FROM_DATABASE Intel Corporation
DEVPATH /devices/pci0000:00/0000:00:1b.0/sound/card1
UDEV_LOG 3
ID_MODEL_FROM_DATABASE 8 Series/C220 Series Chipset High Definition Audio Controller
ID_PATH pci-0000:00:1b.0
SOUND_INITIALIZED 1
info.udi /devices/pci0000:00/0000:00:1b.0/sound/card1
ID_MODEL_ID 0x8c20
PULSE_PROFILE_SET extra-hdmi.conf
SOUND_FORM_FACTOR internal
ID_BUS pci


/proc/asound/card1/pcm0c/info
card: 1
device: 0
subdevice: 0
stream: CAPTURE
id: ALC3232 Analog
name: ALC3232 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

/proc/asound/card1/pcm0p/info
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: ALC3232 Analog
name: ALC3232 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

response: True
starting recording while playing demo sound
aplay /usr/share/sounds/alsa/Front_Right.wav -D plughw:1
aplay /usr/share/sounds/alsa/Front_Left.wav -D plughw:1

This question is displayed:

Did you hear the played sound?

If I answer "yes", because I did hear sound, it plays the recorded sound while displaying the intermediary screen. When that completes, this information is displayed:

<output>

Sound Card:

udev device: /devices/pci0000:00/0000:00:1b.0/sound/card1
------------------------------------------------------
SUBSYSTEM sound
ID_VENDOR_ID 0x8086
ID_VENDOR_FROM_DATABASE Intel Corporation
DEVPATH /devices/pci0000:00/0000:00:1b.0/sound/card1
UDEV_LOG 3
ID_MODEL_FROM_DATABASE 8 Series/C220 Series Chipset High Definition Audio Controller
ID_PATH pci-0000:00:1b.0
SOUND_INITIALIZED 1
info.udi /devices/pci0000:00/0000:00:1b.0/sound/card1
ID_MODEL_ID 0x8c20
PULSE_PROFILE_SET extra-hdmi.conf
SOUND_FORM_FACTOR internal
ID_BUS pci


/proc/asound/card1/pcm0c/info
card: 1
device: 0
subdevice: 0
stream: CAPTURE
id: ALC3232 Analog
name: ALC3232 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

/proc/asound/card1/pcm0p/info
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: ALC3232 Analog
name: ALC3232 Analog
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

response: True
starting recording while playing demo sound
aplay /usr/share/sounds/alsa/Front_Right.wav -D plughw:1
aplay /usr/share/sounds/alsa/Front_Left.wav -D plughw:1
response: True

and this question is asked: Did you hear the recorded sound?

If I say "Yes", it goes to the intermediary audio test screen, then the intermediary info test screen. The test completes with a FAIL for the first audio test, which is what I clicked on to begin things, and a PASS for the second audio test, which I did not click on.
Comment 12 Brian Brock 2015-08-18 14:02:51 EDT
verified in 1.6.6-20150813.el6
Comment 15 errata-xmlrpc 2015-08-20 08:08:41 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1648.html

Note You need to log in before you can comment on or make changes to this bug.