Skip to content

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

Closed
fredoh9 wants to merge 1 commit into
thesofproject:masterfrom
fredoh9:fix/add_pulseaudio_test
Closed

fredoh9 wants to merge 1 commit into
thesofproject:masterfrom
fredoh9:fix/add_pulseaudio_test

Conversation

@fredoh9

@fredoh9 fredoh9 commented Feb 25, 2020

Copy link
Copy Markdown
Contributor

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

fredoh9 commented Feb 25, 2020 •

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

Bin-QA commented Apr 1, 2020

Copy link
Copy Markdown
Contributor

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

@fredoh9

fredoh9 commented Apr 1, 2020

Copy link
Copy Markdown
Contributor Author

@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

fredoh9 commented Apr 10, 2020

Copy link
Copy Markdown
Contributor Author

close this for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants