Hi Oleksandr,
Thank you for your input. I tried matching the hardware parameter (i.e. buffer size) in the HVM config file, but still no luck with audio from HVM guest.
Here is the complete vsnd config:
vsnd = [[ 'card, backend=Domain-0, buffer-size=22050, short-name=VCard, long-name=Virtual sound card, sample-rates=8000;11025;16000;22050;32000;44100;48000, sample-formats=s16_le', 'pcm, name=dev1', 'stream, unique-id=alsa, type=P' ]]
This is what I see when I play audio in Dom 0:
amd@amd-Bilby-RV2:~$ aplay -v ~/SampleAudio/music.wav
Playing WAVE '/home/amd/SampleAudio/music.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 22050
period_size : 5512
period_time : 125000
tstamp_mode : NONE
tstamp_type : GETTIMEOFDAY
period_step : 1
avail_min : 5512
period_event : 0
start_threshold : 22050
stop_threshold : 22050
silence_threshold: 0
silence_size : 0
boundary : 6206523236469964800
I have also tried giving buffer-size as 88200 (22050 * 2 channels * 2 bytes per sample), but still there is no audio from HVM guest.
What will be the right parameters based on the above aplay information?
Below is the information obtained using –dump-hw-params flag. Do I need to change vsnd parameters based on this information?
amd@amd-Bilby-RV2:~$ aplay ~/SampleAudio/music.wav --dump-hw-params
Playing WAVE '/home/amd/SampleAudio/music.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
HW Params of device "default":
--------------------
ACCESS: RW_INTERLEAVED
FORMAT: U8 S16_LE S16_BE S24_LE S24_BE S32_LE S32_BE FLOAT_LE FLOAT_BE MU_LAW A_LAW S24_3LE S24_3BE
SUBFORMAT: STD
SAMPLE_BITS: [8 32]
FRAME_BITS: [8 1024]
CHANNELS: [1 32]
RATE: [1 384000]
PERIOD_TIME: (2 4294967295)
PERIOD_SIZE: [1 1398102)
PERIOD_BYTES: [128 1398102)
PERIODS: [3 1024]
BUFFER_TIME: (7 4294967295]
BUFFER_SIZE: [3 4194304]
BUFFER_BYTES: [384 4194304]
TICK_TIME: ALL
--------------------
Added Oleksandr Grytsov for help.
Regards,
Jyotirmoy