5.3. Audio

This section describes how to configure SGD audio services for Windows applications and X applications. Troubleshooting information for SGD audio is also included.

The following topics are covered:

5.3.1. Setting Up Audio

Setting up audio involves the following configuration steps:

  1. Configure the application servers for audio.

  2. Configure X application objects to use the correct audio device and audio format.

    See Section 5.3.4, “Configuring X Applications for Audio”.

  3. Enable the SGD audio services.

    See Section 5.3.5, “Enabling SGD Audio Services”.

  4. Configure the client device for audio.

    See Section 5.3.6, “Configuring Client Devices for Audio”.

5.3.2. Configuring Microsoft Windows Application Servers for Audio

You can only play audio if audio redirection is enabled on the Windows Remote Desktop Session Host.

You can only record audio if audio recording redirection is enabled on the Windows Remote Desktop Session Host.

See Section 4.1.3, “Configuring Microsoft Windows Remote Desktop Services for Use With SGD” for details of the Windows platforms that support audio redirection and audio recording redirection.

5.3.3. Configuring UNIX and Linux Platform Application Servers for Audio

To be able to hear audio in an X application, you must install and run the audio module of the SGD Enhancement Module on the UNIX or Linux platform application server.

5.3.3.1. Installing the Audio Module

See the Oracle Secure Global Desktop Installation Guide for Release 4.7 for instructions on installing the audio module. If you did not install the audio module when you installed the SGD Enhancement Module, you must uninstall and then reinstall the SGD Enhancement Module.

Note

If you are using zones on Oracle Solaris platforms, the audio module must be installed in the global zone.

The audio module installs the SGD audio daemon and audio driver emulator. On Linux platforms, the audio driver emulator requires the soundcore module in the kernel. The audio driver emulator is an Open Sound System (OSS) emulator.

Note

As the audio module includes an audio driver emulator, the application server itself does not actually need to have a sound card.

5.3.3.2. Starting the Audio Module

If the audio module is installed, you start the audio service with the /opt/tta_tem/bin/tem startaudio command. You must be superuser (root) to use this command.

5.3.3.3. About the SGD Audio Daemon

When audio is enabled and the user starts an X application, the SGD login script starts the SGD audio daemon, sgdaudio, on the application server.

The audio daemon connects to an SGD audio driver emulator, sgdadem, and starts an audio device node in the /tmp/SGD/dev/sgdaudio directory. The audio daemon sets the SGDAUDIODEV, AUDIODEV, and AUDIO environment variables to the location of the audio device node. The audio device node is then used to play audio during the application session.

The audio daemon transfers the audio data to the SGD server, which then sends the data to the client.

The audio daemon supports the following audio data formats:

  • u-law and A-law with 8-bit precision

  • 16-bit linear Pulse-code modulation (PCM)

To play audio, the client device must also support these formats.

The audio daemon supports any sample rate from 8000 Hz to 48 kHz for one or two channels. The audio daemon uses the sample rate specified by the UNIX Audio Sound Quality attribute on the Global Settings → Client Device tab in the Administration Console. By default, the sample rate is 22.05kHz.

The SGD audio daemon connects to the SGD server on random ports. If there is a firewall between the application server and the SGD server, the firewall must allow connections on all ports from the application server to the SGD server.

5.3.4. Configuring X Applications for Audio

To be able to hear audio in an X application, the X application might have to be configured to output audio using the right audio device and audio format.

Some X applications are hard-coded to use the /dev/audio or /dev/dsp devices for audio output. You can enable an SGD audio redirection library, to force the X application to use the device specified by the SGDAUDIODEV environment variable.

In the Administration Console, go to the Client Device tab for the X application and select the Audio Redirection Library check box.

Alternatively, use the following command:

$ tarantella object edit --name obj --unixaudiopreload true

As the SGD audio driver emulator is an OSS driver, the X application might have to be configured to use OSS. If your system uses the Advanced Linux Sound Architecture (ALSA), you might have to enable the ALSA OSS emulation modules in the kernel.

If the Connection Method (--method) used for the X application is SSH and the application's Window Type (--displayusing) is Kiosk, the Session Termination (--endswhen) attribute must be set to Login Script Exit or No Visible Windows (--loginscriptnowindows).

5.3.5. Enabling SGD Audio Services

To be able to hear audio in Windows applications and X applications, audio services must be enabled for the SGD array.

To be able to record audio in Windows applications, the Windows audio input service must be enabled for the SGD array.

Firewalls between SGD servers can interfere with the connections required for Windows audio, seeSection 1.4.2, “Firewalls Between SGD Servers”.

5.3.5.1. How to Enable the SGD Windows Audio Service

To be able to hear audio in a Windows application, the SGD Windows audio service must be enabled for the array. The Windows audio service is disabled by default.

  1. In the Administration Console, go to the Global Settings → Client Device tab and select the Windows Audio check box.

    Tip

    You can also use the tarantella config edit --array-audio command to enable the SGD Windows audio service.

    The audio service only takes effect for new user sessions. Users must log out of SGD and log back in again to enable audio in their current Windows Remote Desktop Services sessions.

  2. (Optional) Set the audio quality.

    Select an option for Windows Audio Sound Quality.

    The default is Medium Quality Audio, using a sample rate of 22.05kHz. Only change this setting if you experience problems with audio quality.

5.3.5.2. How to Enable the SGD UNIX Audio Service

To be able to hear audio in an X application, the SGD UNIX audio service must be enabled in the array. The UNIX audio service is disabled by default.

  1. In the Administration Console, go to the Global Settings → Client Device tab and select the Unix Audio check box.

    Tip

    You can also use the tarantella config edit --array-unixaudio command to enable the SGD UNIX audio service.

    Note

    The audio service only takes effect for new user sessions. Users must log out of SGD and log back in again to enable audio in their X application sessions.

  2. (Optional) Set the audio quality.

    Select an option for Unix Audio Sound Quality.

    The default is Medium Quality Audio, using a sample rate of 22.05kHz. Only change this setting if you experience problems with audio quality.

5.3.5.3. How to Enable the SGD Windows Audio Input Service

To be able to record audio in a Windows application, the SGD Windows audio input service must be enabled for the array. The Windows audio input service is disabled by default.

  • In the Administration Console, go to the Global Settings → Client Device tab and select the Audio Input check box.

    Tip

    You can also use the tarantella config edit --array-audioin command to enable the SGD Windows audio input service.

    The Windows audio input service only takes effect for new user sessions. Users must log out of SGD and log back in again to enable audio recording in their current Windows Remote Desktop Services sessions.

5.3.6. Configuring Client Devices for Audio

To be able to hear audio in an Windows application or X application, the client device must be capable of playing audio.

Users with Oracle Solaris or Linux platform client devices must have read and write access to the following audio devices:

  • The /dev/audio device on Oracle Solaris platforms

  • The /dev/dsp device on Linux platforms

For Linux platform client devices, the Enlightened Sound Daemon, also known as ESD or EsounD, must be running on the client device.

ESD is usually started when the client device desktop session is started. Otherwise, the daemon must be autospawned by the ESD library on request. Ensure that autospawning is enabled in the ESD configuration file, /etc/esd.conf. The correct setting is auto_spawn=1.

Audio mixing on the client device is supported. On Oracle Solaris workstations, Microsoft Windows, and Mac OS X client devices, the client hardware performs the mixing. On Linux and Sun Ray client devices, ESD is required to perform mixing.

To be able to record audio in an Windows application, the client device must be capable of recording audio.

5.3.7. Troubleshooting Audio in Applications

The following are common problems when using audio in Windows applications and X applications:

5.3.7.1. No Audio Plays At All

If no audio is playing at all in the application session, use the following checklist to resolve the problem.

For Windows applications and X applications, you can use the following checklist.

Questions

  • 5.3.7.1.1: Does the client device have an audio device?

  • 5.3.7.1.2: For Linux platform client devices, is ESD running?

  • 5.3.7.1.3: Is the volume muted on the client device?

  • 5.3.7.1.4: Is the volume muted on the application server?

  • 5.3.7.1.5: Has the audio service been enabled on the SGD server?

  • 5.3.7.1.6: Has the audio quality been changed?

  • 5.3.7.1.7: For Windows applications, is audio redirection enabled on the application server?

  • 5.3.7.1.8: For Windows applications, is the Remote Audio attribute enabled?

  • 5.3.7.1.9: For Windows applications, is there a firewall between the SGD server hosting the user session and the SGD server hosting the application session?

  • 5.3.7.1.10: For X applications, is there a firewall between the application server and the SGD server?

  • 5.3.7.1.11: For X applications, are you running compatible versions of SGD and the SGD Enhancement Module?

  • 5.3.7.1.12: For X applications, have you installed the audio module of the SGD Enhancement Module?

  • 5.3.7.1.13: Is the X application hard-coded to use either the /dev/audio or the /dev/dsp device?

  • 5.3.7.1.14: Is the X application outputting sound in the right format?

  • 5.3.7.1.15: For UNIX or Linux platform application servers, is the SGD audio driver loaded in the kernel?

  • 5.3.7.1.16: For X applications, is the SGD audio daemon running on the application server?

  • 5.3.7.1.17: For X applications, is there an SGD audio device node?

  • 5.3.7.1.18: For X applications, does audio debug logging show any errors with the application?

Questions and Answers

5.3.7.1.1: Does the client device have an audio device?

To be able to play audio, the client device must have an audio device. If there is an audio device, check that the audio device works.

Users with Oracle Solaris or Linux platform client devices must also have read and write access to the following audio devices:

  • The /dev/audio device on Oracle Solaris platforms

  • The /dev/dsp device on Linux platforms

Note

On Oracle Solaris platforms, if the AUDIODEV environment variable has been set to a different device, the SGD Client attempts to use this device before using the /dev/audio device.

5.3.7.1.2: For Linux platform client devices, is ESD running?

For Linux platform client devices, ESD must be running.

Use the following command to check if ESD is running:

$ ps -ef | grep esd

ESD is usually started when the client device desktop session is started. If ESD is not running, check that autospawning is enabled in the ESD configuration file, /etc/esd.conf. The correct setting is auto_spawn=1.

5.3.7.1.3: Is the volume muted on the client device?

Check the volume control on the client device, to see whether the user has muted the volume or set the volume level too low to hear.

5.3.7.1.4: Is the volume muted on the application server?

Check the volume control on the application server, or in the application, to see whether the user has muted the volume or set the volume level too low to hear.

5.3.7.1.5: Has the audio service been enabled on the SGD server?

By default, SGD audio services are disabled for an SGD array.

See Section 5.3.5.1, “How to Enable the SGD Windows Audio Service” for details of how to enable the SGD Windows audio service.

See Section 5.3.5.2, “How to Enable the SGD UNIX Audio Service” for details of how to enable the SGD UNIX audio service.

5.3.7.1.6: Has the audio quality been changed?

By default, the SGD audio service uses Medium Quality Audio. Changing the audio quality to Low Quality Audio or High Quality Audio limits the audio formats used in the application session and might mean that the client device cannot play audio.

Reset the audio quality to Medium Quality Audio on the Global Settings → Client Device tab in the Administration Console.

5.3.7.1.7: For Windows applications, is audio redirection enabled on the application server?

You can only play audio if audio redirection is enabled on the Windows Remote Desktop Session Host. See Section 4.1.3, “Configuring Microsoft Windows Remote Desktop Services for Use With SGD” for details of the Windows platforms that support audio redirection.

Audio redirection is disabled by default on Windows Remote Desktop Session Hosts.

5.3.7.1.8: For Windows applications, is the Remote Audio attribute enabled?

The Remote Audio (--remoteaudio) attribute for a Windows application object causes audio to be played on the Windows application server, rather than the client device. This attribute is disabled by default for a Windows application object.

In the Administration Console, you disable the Remote Audio attribute on the Client Device tab for the Windows application object.

5.3.7.1.9: For Windows applications, is there a firewall between the SGD server hosting the user session and the SGD server hosting the application session?

For Windows applications, firewalls between SGD servers can interfere with audio connections, seeSection 1.4.2, “Firewalls Between SGD Servers”.

5.3.7.1.10: For X applications, is there a firewall between the application server and the SGD server?

For X applications, the SGD audio daemon connects to the SGD server on random ports. If there is a firewall between the application server and the SGD server, the firewall must allow connections on all ports from the application server to the SGD server.

5.3.7.1.11: For X applications, are you running compatible versions of SGD and the SGD Enhancement Module?

UNIX audio services might not work correctly if the versions of SGD and the SGD Enhancement Module are different. For example, to play audio in X applications displayed through SGD version 4.7, Linux and UNIX platform application servers must be running version 4.7 of the Enhancement Module.

Use the following command to check the current version of the SGD Enhancement Module:

$ /opt/tta_tem/bin/tem version

Use the following command to check the current version of SGD:

$ tarantella version

See the Oracle Secure Global Desktop Installation Guide for Release 4.7 for details of how to upgrade the SGD Enhancement Module.

5.3.7.1.12: For X applications, have you installed the audio module of the SGD Enhancement Module?

To be able to play sound in X applications, you must install and run the audio module of the SGD Enhancement Module on the application server.

See the Oracle Secure Global Desktop Installation Guide for Release 4.7 for details of how to install the SGD Enhancement Module.

Note

If you are using zones on Oracle Solaris platforms, the audio module only works if it is installed in the global zone.

Use the following command to check that UNIX audio processes are running:

$ /opt/tta_tem/bin/tem status

You start the UNIX audio module with the following command:

# /opt/tta_tem/bin/tem startaudio

You must be superuser (root) to use this command.

5.3.7.1.13: Is the X application hard-coded to use either the /dev/audio or the /dev/dsp device?

If an application is hard-coded to use either the /dev/audio or the /dev/dsp device, you might have to enable the SGD audio redirection library to ensure that the SGD audio driver emulator is used by the application. See Section 5.3.4, “Configuring X Applications for Audio”.

5.3.7.1.14: Is the X application outputting sound in the right format?

The SGD audio driver emulator is an OSS driver. The X application might have to be configured to use OSS. If your system uses ALSA, you might have to enable the ALSA OSS emulation modules in the kernel.

5.3.7.1.15: For UNIX or Linux platform application servers, is the SGD audio driver loaded in the kernel?

When you install the SGD Enhancement Module on the application server, you install the SGD audio driver, sgdadem. Check that the audio driver is loaded in the kernel.

  • On Oracle Solaris platforms, use the modinfo -c command to check whether the sgdadem module is loaded.

  • On Linux platforms, use the lsmod command to check whether the sgdadem and soundcore modules are loaded.

If the audio driver is installed but not loaded, you can try to load the module manually, as follows:

  • On Oracle Solaris platforms, use the modload -i moduleID command. Use the modinfo -c command to find the moduleID.

  • On Linux platforms, use the modprobe sgdadem command.

If loading the audio driver manually produces any errors, try to correct those errors and load the driver again.

If the SGD audio driver is not listed, check the audio module installation log for any errors. The installation log is /opt/tta_tem/var/log/tem_unixaudio_inst.log. If the log reports any errors, try to correct those errors and load the driver again.

If the audio driver does not load into the kernel, contact Oracle Support.

5.3.7.1.16: For X applications, is the SGD audio daemon running on the application server?

There is an SGD audio daemon, called sgdaudio, running for each X application accessed through SGD. Use the following command to see the instances of the audio daemon:

$ ps -ef | grep -i sgdaudio

If the user does not have an audio daemon, check the audio daemon log files for any errors. The SGD audio daemon logs all fatal errors to the /opt/tta_tem/var/log/sgdaudioPID.log file.

5.3.7.1.17: For X applications, is there an SGD audio device node?

If the SGD audio daemon is running, it starts an audio device node in the /tmp/SGD/dev/sgdaudio directory.

In the X application session, check the value of the user's SGDAUDIODEV, AUDIODEV and AUDIO environment variables. These must be set to the location of the SGD audio device node.

If the environment variables are set correctly, check that the device file is present in the /tmp/SGD/dev/sgdaudio directory.

5.3.7.1.18: For X applications, does audio debug logging show any errors with the application?

Enable UNIX audio debug logging on the application server and check the log files for errors.

See Section 5.3.7.5, “Enabling UNIX Audio Debug Logging” for more details.

5.3.7.2. No Audio is Recorded

If audio recording in the Windows application session does not work, use the following checklist to resolve the problem.

Questions

  • 5.3.7.2.1: Does the client device have an audio recording device?

  • 5.3.7.2.2: Is the recording volume muted on the client device?

  • 5.3.7.2.3: Is the recording volume muted on the application server?

  • 5.3.7.2.4: Has the Windows audio input service been enabled on the SGD server?

  • 5.3.7.2.5: For Windows applications, is audio recording redirection enabled on the application server?

  • 5.3.7.2.6: For Windows applications, is there a firewall between the SGD server hosting the user session and the SGD server hosting the application session?

Questions and Answers

5.3.7.2.1: Does the client device have an audio recording device?

To be able to record audio, the client device must have an audio recording device. If there is an audio recording device, check that the audio recording device works.

5.3.7.2.2: Is the recording volume muted on the client device?

Check the recording volume control on the client device, to see whether the user has muted the recording volume or set the volume level too low to record.

5.3.7.2.3: Is the recording volume muted on the application server?

Check the recording volume control on the application server, or in the application, to see whether the user has muted the recording volume or set the volume level too low to record.

5.3.7.2.4: Has the Windows audio input service been enabled on the SGD server?

By default, the SGD Windows audio input service is disabled for an SGD array.

See Section 5.3.5.3, “How to Enable the SGD Windows Audio Input Service” for details of how to enable the SGD Windows audio input service.

5.3.7.2.5: For Windows applications, is audio recording redirection enabled on the application server?

You can only record audio if audio recording redirection is enabled on the Windows Remote Desktop Session Host. See Section 4.1.3, “Configuring Microsoft Windows Remote Desktop Services for Use With SGD” for details of the Windows platforms that support audio recording redirection.

Audio recording redirection is disabled by default on Windows Remote Desktop Session Hosts.

On Microsoft Windows 7 Enterprise platforms, add the following registry entry to the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp key.

"fDisableAudioCapture"=dword:00000000

5.3.7.2.6: For Windows applications, is there a firewall between the SGD server hosting the user session and the SGD server hosting the application session?

For Windows applications, firewalls between SGD servers can interfere with audio connections, seeSection 1.4.2, “Firewalls Between SGD Servers”.

5.3.7.3. Audio Is Muffled or Distorted

If audio is muffled or distorted, adjust the audio quality and audio compression settings to see if this improves the audio. You can adjust the following:

  • The Sound Quality attribute on the Global Settings → Client Device tab in the Administration Console.

  • The Audio Output Packet Compression or Audio Input Packet Compression attribute on the Protocol Engines → Audio tab for an SGD server in the Administration Console.

    By default, data compression is enabled for slow connections only. To enable data compression for all connections use the Always setting.

5.3.7.4. Not All Users Require Audio

If you enable audio playback on the Windows application server and enable the SGD audio service, all users can play audio in their Windows application sessions.

If you enable audio recording on the Windows application server and enable the SGD Windows audio input service, all users can record audio in their Windows application sessions.

However, playing and recording audio increases the amount of network bandwidth used and so you might want to restrict use of these features. Currently, the only way to do this is to disable audio playback and audio recording for groups of users on the Windows application server. To do this you disable the Allow audio and video playback redirection and Allow audio recording redirection settings for the group policy object at Computer Configuration\Administrative Templates\Windows Components\Remote Desktop\Device and Resource Redirection.

For Windows application servers before Windows Server 2008 R2, the audio playback setting is called Allow audio redirection and the group policy object is at Computer Configuration\Administrative Templates\Windows Components\Terminal Services\Client Server Redirection.

Changes to these settings only apply to new Windows Remote Desktop Services sessions.

5.3.7.5. Enabling UNIX Audio Debug Logging

To enable UNIX audio debug logging, log in as superuser (root) on the application server and edit the /etc/sgdtem.conf file. Change the value of the SGDUNIXAUDIODEBUG environment variable in this file, as follows:

SGDUNIXAUDIODEBUG=1; export SGDUNIXAUDIODEBUG

To obtain debug logging output, the user must start a new instance of the application. Suspending and resuming the application does not generate any output, as this does not start a new instance of the SGD audio daemon.

The debug logging output goes to the /opt/tta_tem/var/log/sgdaudioPID.log file.