[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Enable audio virtualization in Xen


  • To: "olekstysh@xxxxxxxxx" <olekstysh@xxxxxxxxx>
  • From: "SHARMA, JYOTIRMOY" <JYOTIRMOY.SHARMA@xxxxxxx>
  • Date: Mon, 5 Sep 2022 18:27:56 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r2YZjqSWAqsFEieyZigc4KKlHdLCzOveAHOrDx1ISKk=; b=O2TuBa/bc3T5vqMQoWmDzz8hh2hICiDsnW2cS2E0h1aDVy8Lv6CAvDL0zRg6Mbg14Jt0SZfagj0PkbWo+P8mwUBWdmcbhm2V/6Aw2h5unNeg2/D9fM0pTa9Z5Jojvd9qAQ8KI+ossFW0Ky/TgfWBWA+NNW/DZFdxss6TxYYq47KAzxm9yCyZ4yEIQjvYKRHk3nnceKyT62kTX6Tpx52Pq/aUWNdqTGn52tzkEk+SiNx7qjtub6J57C7kietzd/mZs9DKVa2EWES4/PAtMexf9oh5ynPrrN8bI5JGHIU3pm4Pxp2R2+zNfzOLZXh7wkmLtb0elrZE9n3k2tht94Cu9A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O84cBVXyGm31T7xq0tjp91LAZnzvT+41a7o9nvuKCsPrKYmoeJrEn7S9scMqLMjYHBupAA+CiPBLHErfX/CqWGKu4NIbl9KsuaTHgZfebTQUqq9HQVh5I1Z3PjtxbOK5DL5st4U5GKZMdS/+fUqL0ox7fC0LgAWLy8Hklf+1HPuhDD4O5NkIv3ZDykCi45LnbFAPQm5k+u2eEnFDFL5wsRCcrgxAWiaVD07C/W0yg4InrBBK9y5CmG1thtAO2AdNx4XQCzLJzZ2QXI24FJfsUza4W+GzYe7GGQ2Jw6XxgE7GkWvS1ds+fDyvp3SBIQPFzvqPdIK/dtpzGoXHxaw91A==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: "SHARMA, JYOTIRMOY" <JYOTIRMOY.SHARMA@xxxxxxx>, "christopher.w.clark@xxxxxxxxx" <christopher.w.clark@xxxxxxxxx>, "dpsmith@xxxxxxxxxxxxxxxxxxxx" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, "Stabellini, Stefano" <stefano.stabellini@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "xen-users@xxxxxxxxxxxxxxxxxxxx" <xen-users@xxxxxxxxxxxxxxxxxxxx>, "al1img@xxxxxxxxx" <al1img@xxxxxxxxx>
  • Delivery-date: Mon, 05 Sep 2022 18:28:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2022-09-05T18:27:54Z; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=37bedcd6-5a97-46e7-ba26-6fe49401d5ef; MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=1
  • Thread-index: AdjBJCbHGOCKcGneSouxTwfUhwYYsg==
  • Thread-topic: Re: Enable audio virtualization in Xen

[AMD Official Use Only - General]


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

 


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.