New issue
Advanced search Search tips

Issue 849594 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

USB audio device won't be select when interacting with 3.5mm

Project Member Reported by paulhsia@chromium.org, Jun 5 2018

Issue description

Pick a chromebook with a USB headphone and a 3.5mm headphone.
I test with eve/R68-10666.0.0.

[Problem]
First do the following three steps:
(1). Plug in USB headphone
(2). Plug in 3.5mm headphone
(3). Unplug USB headphone
After this:
(4). USB won't be select when we plugging it in the chromebook.

[Analysis]
According to the doc below:
https://docs.google.com/document/d/1BTTl_9yL6c9DQVLvA-Btuwms07xK6jHh33w4XHIlWAw/edit
Since we didn't manually select any device, the state of the devices should be:
USB status: last_state_active=false, last_active_by_user:false
3.5mm status: last_state_active=true, last_active_by_user:false

and chromeos should select USB by rule No.3 in the table inside the doc.

But this line:
https://cs.chromium.org/chromium/src/chromeos/audio/cras_audio_handler.cc?q=cras_audio_handler.cc&sq=package:chromium&dr&l=1250
set last_active_by_user to true when a 3.5mm device is plugged in. 

[Possible Fix]
We should use "ACTIVATE_BY_PRIORITY" instead of using "ACTIVATE_BY_USER" in the above line since the flag activate_by_user will be use for future state transition.

[Reference]
The change adding this line is made for  crbug.com/776549 

[Reset steps for debugging]
When falling in to the state, reset steps:
(5) Plug in the USB headphone and manually select it. OR
(6) Reboot

Thanks!
 
Status: Started (was: Assigned)
Yes, that is a reasonable fix. Pending cl for review:
https://chromium-review.googlesource.com/c/chromium/src/+/1087749
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/3dda649ec89264738665f4b8a50011d2e158556a

commit 3dda649ec89264738665f4b8a50011d2e158556a
Author: paulhsia <paulhsia@chromium.org>
Date: Wed Jun 06 12:00:52 2018

[autotest] Select USB device explicitly in audio_AudioBasicUSB tests

Sometimes the state for audio device selection will cause the DUT ignore
a plugged USB device.
In audio_AudioBasicUSBPlayback, audio_AudioBasicUSBRecord and
audio_AudioBasicUSBPlaybackRecord tests, we should select USB device in
tests explicitly since the tests are only for testing the functionality
of playback and record functions.
Testing the selection mechanism for nodes should not be included in these
tests.

BUG= chromium:809414 
BUG= chromium:849594 
TEST=test_that --board=BOARD --args="chameleon_host=CHAMELEON_IP" DUT_IP
audio_AudioBasicPlayback
TEST=test_that --board=BOARD --args="chameleon_host=CHAMELEON_IP" DUT_IP
audio_AudioBasicRecord
TEST=test_that --board=BOARD --args="chameleon_host=CHAMELEON_IP" DUT_IP
audio_AudioBasicPlaybackRecord

Change-Id: I3db2e7d30783a9ea897416f7830fb65f20683b94
Reviewed-on: https://chromium-review.googlesource.com/1086901
Commit-Ready: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>

[modify] https://crrev.com/3dda649ec89264738665f4b8a50011d2e158556a/server/site_tests/audio_AudioBasicUSBPlaybackRecord/audio_AudioBasicUSBPlaybackRecord.py
[modify] https://crrev.com/3dda649ec89264738665f4b8a50011d2e158556a/server/site_tests/audio_AudioBasicUSBRecord/audio_AudioBasicUSBRecord.py
[modify] https://crrev.com/3dda649ec89264738665f4b8a50011d2e158556a/server/site_tests/audio_AudioBasicUSBPlayback/audio_AudioBasicUSBPlayback.py

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dc92391591e74937ec7a46f3833e24bf378121e2

commit dc92391591e74937ec7a46f3833e24bf378121e2
Author: Jenny Zhang <jennyz@chromium.org>
Date: Wed Jun 06 17:27:09 2018

Switch to 35mm headphone and mic by priority when they are hot plugged.

Bug:  849594 
Change-Id: Idcfd987a4e2d3357a81905b1f003ab1e81302298
Reviewed-on: https://chromium-review.googlesource.com/1087749
Reviewed-by: Jenny Zhang <jennyz@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Jenny Zhang <jennyz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564945}
[modify] https://crrev.com/dc92391591e74937ec7a46f3833e24bf378121e2/chromeos/audio/cras_audio_handler.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Jun 6 2018

Labels: merge-merged-release-R68-10718.B
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/1b86343227020d21c9b54e607155c036a474626a

commit 1b86343227020d21c9b54e607155c036a474626a
Author: paulhsia <paulhsia@chromium.org>
Date: Wed Jun 06 19:20:15 2018

[autotest] Select USB device explicitly in audio_AudioBasicUSB tests

Sometimes the state for audio device selection will cause the DUT ignore
a plugged USB device.
In audio_AudioBasicUSBPlayback, audio_AudioBasicUSBRecord and
audio_AudioBasicUSBPlaybackRecord tests, we should select USB device in
tests explicitly since the tests are only for testing the functionality
of playback and record functions.
Testing the selection mechanism for nodes should not be included in these
tests.

BUG= chromium:809414 
BUG= chromium:849594 
TEST=test_that --board=BOARD --args="chameleon_host=CHAMELEON_IP" DUT_IP
audio_AudioBasicPlayback
TEST=test_that --board=BOARD --args="chameleon_host=CHAMELEON_IP" DUT_IP
audio_AudioBasicRecord
TEST=test_that --board=BOARD --args="chameleon_host=CHAMELEON_IP" DUT_IP
audio_AudioBasicPlaybackRecord

Change-Id: I3db2e7d30783a9ea897416f7830fb65f20683b94
Previous-Reviewed-on: https://chromium-review.googlesource.com/1086901
(cherry picked from commit f7279c2309022ac2abd2bd1e2738fc77fa07aead)
Reviewed-on: https://chromium-review.googlesource.com/1089590
Reviewed-by: Chih-Yang Hsia <paulhsia@chromium.org>
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>

[modify] https://crrev.com/1b86343227020d21c9b54e607155c036a474626a/server/site_tests/audio_AudioBasicUSBPlaybackRecord/audio_AudioBasicUSBPlaybackRecord.py
[modify] https://crrev.com/1b86343227020d21c9b54e607155c036a474626a/server/site_tests/audio_AudioBasicUSBRecord/audio_AudioBasicUSBRecord.py
[modify] https://crrev.com/1b86343227020d21c9b54e607155c036a474626a/server/site_tests/audio_AudioBasicUSBPlayback/audio_AudioBasicUSBPlayback.py

Status: Fixed (was: Started)

Sign in to add a comment