Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-case: add pulseaudio playback and capture test #87

Closed

Conversation

fredoh9
Copy link
Collaborator

@fredoh9 fredoh9 commented Feb 25, 2020

Using pactl and pacmd sink or source can be set. paplay and parecord are
pulseaudio utility for playback and capture respectively. PulseAudio
should be enabled before the test. paplay expects actual audio file, dummy
file cannot be used.

Signed-off-by: Fred Oh fred.oh@linux.intel.com

Using pactl and pacmd sink or source can be set. paplay and parecord are
pulseaudio utility for playback and capture respectively. PulseAudio
should be enabled before the test. paplay expects actual audio file, dummy
file cannot be used.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
@fredoh9 fredoh9 requested a review from Bin-QA as a code owner February 25, 2020 02:41
@fredoh9
Copy link
Collaborator Author

fredoh9 commented Feb 25, 2020

Tested with GLK_BOB_DA7219. This is PulseAudio sinks and sources in the DUT. That's why i did some grep and find indexes. sink index = [0, 1 ], source index = [2 ,3].

ubuntu@glk-bob:~$ pactl list short sources | grep sink
0       alsa_output.pci-0000_00_0e.0-platform-glk_da7219_max98357a.HiFi__hw_sofglkda7219max_1__sink.monitor     module-alsa-card.c      s16le 2ch 48000Hz       SUSPENDED
1       alsa_output.pci-0000_00_0e.0-platform-glk_da7219_max98357a.HiFi__hw_sofglkda7219max_0__sink.monitor     module-alsa-card.c      s16le 2ch 48000Hz       SUSPENDED
ubuntu@glk-bob:~$ pactl list short sources
0       alsa_output.pci-0000_00_0e.0-platform-glk_da7219_max98357a.HiFi__hw_sofglkda7219max_1__sink.monitor     module-alsa-card.c      s16le 2ch 48000Hz       SUSPENDED
1       alsa_output.pci-0000_00_0e.0-platform-glk_da7219_max98357a.HiFi__hw_sofglkda7219max_0__sink.monitor     module-alsa-card.c      s16le 2ch 48000Hz       SUSPENDED
2       alsa_input.pci-0000_00_0e.0-platform-glk_da7219_max98357a.HiFi__hw_sofglkda7219max_99__source   module-alsa-card.c      s16le 4ch 48000Hz       SUSPENDED
3       alsa_input.pci-0000_00_0e.0-platform-glk_da7219_max98357a.HiFi__hw_sofglkda7219max_1__source    module-alsa-card.c      s16le 2ch 48000Hz       SUSPENDED
4       alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo.monitor      module-alsa-card.c      s16le 2ch 44100Hz       SUSPENDED
5       alsa_input.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-mono module-alsa-card.c      s16le 1ch 44100Hz       SUSPENDED

If PulseAudio is disabled, pulseaudio error will occur.

17:18:23  2020-02-25 01:18:20 UTC [REMOTE_INFO] pactl list short sources
17:18:23  Connection failure: Connection refused
17:18:23  pa_context_connect() failed: Connection refused

@xiulipan
Copy link
Contributor

@fredoh9 Thanks for the new test. But I think we may need a good solution about when to enable pulseaudio and when to disable the pulseaudio. This will include pulseaudio status check, UCM file validation, pulseaudio switch function, pcm inuse check and etc.
@Bin-QA Could you help to work with @fredoh9 to make some solution for this? I will create a issue for this.

@xiulipan xiulipan mentioned this pull request Feb 25, 2020
6 tasks
@Bin-QA
Copy link
Contributor

Bin-QA commented Apr 1, 2020

@fredoh9 How about add pactl effect check into lib.sh then if this function check failed, this case direct report exit 2

@fredoh9
Copy link
Collaborator Author

fredoh9 commented Apr 1, 2020

@fredoh9 How about add pactl effect check into lib.sh then if this function check failed, this case direct report exit 2

Thank you for comment. I can do that. When we are ready with pulseaudio utils, let's address changes at same time.

@fredoh9
Copy link
Collaborator Author

fredoh9 commented Apr 10, 2020

close this for now

@fredoh9 fredoh9 closed this Apr 10, 2020
@marc-hb marc-hb added the area:pulseaudio Related to pulseaudio label Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:pulseaudio Related to pulseaudio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants