# Zoom Linux SDK 5.15.12 audio recording not working

**URL:** <https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899>\
**Category:** Meeting SDK\
**Created:** [September 12, 2023, 6:57am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899 "2023-09-12T06:57:11Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![sucharitha](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sucharitha/32/49048_2.png) [@sucharitha](https://devforum.zoom.us/u/sucharitha)\
**Post date:** [September 12, 2023, 6:57am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/1 "2023-09-12T06:57:11Z")

</div>

### Format Your New Topic as Follows:

**Meeting SDK Type and Version**  
Zoom Meeting SDK Linux- version 5.15.12

**Description**  
Hi Team, we are working on integrating our app with linux sdk and running into issues with accessing the zoom audio raw data

As per documentation, we have followed the below sequence of steps  
1.Pre init- set the auth token,  
2. implement an instance of the audio raw data callback ZoomSDKAudioRawDataDelegate  
3. After recording privilege changed -\>startRawRecording, getAudioRawDataHelperfor managing subscription and call subscribe event

Even though all the calls mentioned in the steps above result in ZoomSDKError\_Success, the audio stream callbacks functions are never called. Log statements written within the functions onMixedAudioRawDataReceived and onOneWayAudioRawDataReceived never appear on the terminal.  
Meanwhile the app works, we can interact with it, and perform all operations like join, leave, however the audio stream data is not there.

A few interesting logs we observed were  
ALSA lib control.c:1379:(snd\_ctl\_open\_noupdate) Invalid CTL  
ALSA lib pcm.c:2642:(snd\_pcm\_open\_noupdate) Unknown PCM

We are running the following experiment on linux centos amazon ec2 vm instance with latest linux SDK 5.15.12 . Note:this instance does not have any physical hardware sound drivers.We have installed the pulse audio setup on machine.

**Error?**  
ALSA lib control.c:1529:(snd\_ctl\_open\_noupdate) Invalid CTL  
ALSA lib pcm.c:2666:(snd\_pcm\_open\_noupdate) Unknown PCM

**Troubleshooting Routes**  
Installed also-utils, pulseaudio, also-base

**How To Reproduce**  
N/A

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [September 13, 2023, 8:45am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/2 "2023-09-13T08:45:17Z")

</div>

@sucharitha ,

Could you share how you are setting up your docker container, and the configurations done on pulseaudio?

---

<div class="post-metadata">

**Author:** ![pramodb](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pramodb](https://devforum.zoom.us/u/pramodb)\
**Post date:** [September 13, 2023, 9:10am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/3 "2023-09-13T09:10:49Z")

</div>

@chunsiong.zoom  
This started working after adding below in ~/.config/zoomus.conf

```auto
[General]
system.audio.type=default

```

Is there any way we can set which output device to use in SDK?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [September 13, 2023, 12:45pm UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/4 "2023-09-13T12:45:36Z")

</div>

@pramodb ,

Curious, where did you managed to find the fix by using `zoomus.conf` file?

For switching of output device, you can try to set it using the IAudioSettingContext

```auto
	ZOOM_SDK_NAMESPACE::IAudioSettingContext* pAudioContext = m_pSettingService->GetAudioSettings();
	if (pAudioContext)
	{

	
		if (pAudioContext->GetSpeakerList()->GetCount() >= 1) {
			std::cout << "Number of speaker(s) : " << pAudioContext->GetSpeakerList()->GetCount() << std::endl;
			ISpeakerInfo* sInfo = pAudioContext->GetSpeakerList()->GetItem(0);
			const zchar_t* deviceName = sInfo->GetDeviceName();
			if (deviceName != nullptr && deviceName[0] != '\0') {
				std::cout << "Speaker(0) name : " << sInfo->GetDeviceName() << std::endl;
				std::cout << "Speaker(0) id : " << sInfo->GetDeviceId() << std::endl;

				pAudioContext->SelectSpeaker(sInfo->GetDeviceId(), sInfo->GetDeviceName());
				std::cout << "Is selected speaker? : " << pAudioContext->GetSpeakerList()->GetItem(0)->IsSelectedDevice() << std::endl;
			}
			else {
				std::cout << "Speaker(0) name is empty or null." << std::endl;
				std::cout << "Speaker(0) id is empty or null." << std::endl;
			}
}

```

---

<div class="post-metadata">

**Author:** ![rakkakeren](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rakkakeren/32/52128_2.png) [@rakkakeren](https://devforum.zoom.us/u/rakkakeren)\
**Post date:** [September 17, 2023, 1:44am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/5 "2023-09-17T01:44:24Z")

</div>

@chunsiong.zoom

It is mentioned here:

[https://aur.archlinux.org/packages/zoom](https://aur.archlinux.org/packages/zoom)

Before, I thought that it was the alsa problem. After hours and hours finding the solutions, the virtual audio is actually created and start to think that it must be zoom that didn’t recognize the device because it can auto join with audio before.

---

<div class="post-metadata">

**Author:** ![dhruv1778](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dhruv1778/32/52123_2.png) [@dhruv1778](https://devforum.zoom.us/u/dhruv1778)\
**Post date:** [September 17, 2023, 8:18am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/6 "2023-09-17T08:18:25Z")

</div>

@sucharitha

We are also using the linux meeting sdk 5.15.12 but are running into issues , the auth callback never returns back. Could you please share how did you configured the auth to work ?

---

<div class="post-metadata">

**Author:** ![sucharitha](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sucharitha/32/49048_2.png) [@sucharitha](https://devforum.zoom.us/u/sucharitha)\
**Post date:** [September 22, 2023, 8:46am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/8 "2023-09-22T08:46:03Z")

</div>

We set up Zoom client on our CentOS Linux EC2 instance to examine its input and output recognition. Interestingly, this led to the Linux SDK audio streaming to work seamlessly.  
We subsequently retraced our actions to identify the specific Zoom.conf settings responsible for this change. @chunsiong.zoom any insights on when we might anticipate the necessary SDK update or documentation revision for the same?

---

<div class="post-metadata">

**Author:** ![sucharitha](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/sucharitha/32/49048_2.png) [@sucharitha](https://devforum.zoom.us/u/sucharitha)\
**Post date:** [September 22, 2023, 8:53am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/9 "2023-09-22T08:53:19Z")

</div>

@dhruv1778, I have a faint recollection of facing a similar issue in the past. It seems that the problem might be tied to incorrect authorization scopes.

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [September 22, 2023, 9:11am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/10 "2023-09-22T09:11:33Z")

</div>

@sucharitha

We are intending to release an update in the Linux SDK which will create the zoomus.conf file

---

<div class="post-metadata">

**Author:** ![alextsi](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@alextsi](https://devforum.zoom.us/u/alextsi)\
**Post date:** [October 5, 2023, 11:50pm UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/11 "2023-10-05T23:50:41Z")

</div>

Hi all,

I am getting the same issues when starting the app with Zoom Linux SDK v5.16.1.8573 integrated within a Docker container based on Ubuntu 22.04.  
These are errors I am getting:

```auto
ALSA lib control.c:1528:(snd_ctl_open_noupdate) Invalid CTL 
2023-10-05T22:51:57.393166526Z ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM

```

> [@pramodb](#):
>
> ```auto
> [General]
> system.audio.type=default
> 
> ```

I applied the fix referenced above (~/.config/zoomus.conf) but this did not work.

Then I tried to set up PulseAudio sinks explicitly by this entrypoint.sh script:

```auto
#!/bin/bash

# Check if running as root
if ["$(id -u)" = "0"]; then
    # Cleanup to be "stateless" on startup, otherwise pulseaudio daemon can't start
    rm -rf /var/run/pulse /var/lib/pulse /root/.config/pulse
fi
# Start pulseaudio as system wide daemon; for debugging it helps to start in non-daemon mode
pulseaudio -D --verbose --exit-idle-time=-1 --disallow-exit
# Sleep to ensure pulseaudio is fully initialized
pactl load-module module-virtual-source master=auto_null.monitor format=s16le source_name=VirtualMic
# Set VirtualMic as default input source;
echo "Setting default source: ";
pactl set-default-source VirtualMic;
pactl load-module module-null-sink sink_name=Dummy
# Sleep to ensure the sink is ready
pactl set-default-sink Dummy;
./zoom-bot

```

That didn’t help.

`aplay -l` outputs with:

```auto
aplay: device_list:274: no soundcards found...

```

I guess these errors are because there is no soundcard existing within the Docker container and PulseAudio doesn’t seem to pick up the Dummy sink.

@chunsiong.zoom have you encountered this issue before?

Thanks!

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [October 6, 2023, 4:28am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/12 "2023-10-06T04:28:32Z")

</div>

@alextsi ,

Those error messages does not affect the ability to get raw audio data. Do you have issues getting the callback to fire?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [October 6, 2023, 7:12am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/13 "2023-10-06T07:12:51Z")

</div>

@alextsi , I’m sharing some of my code / script samples here

dockerfile for Ubuntu 22

```auto
# Use the official Ubuntu image as the base image
FROM ubuntu:22.04

# Install necessary dependencies
RUN apt-get update && \
    apt-get install -y build-essential cmake

RUN apt-get install -y pkgconf

RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests \
    libx11-xcb1 \
    libxcb-xfixes0 \
    libxcb-shape0 \
    libxcb-shm0 \
    libxcb-randr0 \
    libxcb-image0 \
    libxcb-keysyms1 \
    libxcb-xtest0 \
    libdbus-1-3 \
    libglib2.0-0 \
    libgbm1 \
    libxfixes3 \
    libgl1 \
    libdrm2 \
    libgssapi-krb5-2 \
    openssl \
    ca-certificates \
    pkg-config \
    libegl-mesa0 \
    libsdl2-dev \
    g++-multilib 

# Install CURL related libs
RUN apt-get install -y libcurl4-openssl-dev

# Install ALSA
RUN apt-get install -y libasound2 libasound2-plugins alsa alsa-utils alsa-oss

# Install Pulseaudio
RUN apt-get install -y pulseaudio pulseaudio-utils

# Set the working directory
WORKDIR /app

# Copy your application files to the container
COPY demo/ /app/demo/

# Execute additional commands
RUN cd /app/demo && rm -rf bin && rm -rf build && cmake -B build && cd build && make

# Set the working directory to the source folder
WORKDIR /app/demo

# Make the run script executable
RUN chmod +x /app/demo/setup-pulseaudio.sh

# Set the working directory to the binary folder
WORKDIR /app/demo/bin

# Define a shell script to run multiple commands
RUN echo '#!/bin/bash' > /app/demo/run.sh \
    && echo '/app/demo/setup-pulseaudio.sh' >> /app/demo/run.sh \
    && echo './meetingSDKDemo' >> /app/demo/run.sh

# Make the run script executable
RUN chmod +x /app/demo/run.sh

# Specify the run script as the CMD
CMD ["/app/demo/run.sh"]
#CMD ["/bin/bash"]
#CMD ["./meetingSDKDemo"]

```

Setup script for pulse audio and config file (setup-pulseaudio.sh)

```auto
#!/bin/bash
# enable dbus
mkdir -p /var/run/dbus
dbus-uuidgen > /var/lib/dbus/machine-id
dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address

# add root

adduser root pulse-access

adduser root audio

# Cleanup to be "stateless" on startup, otherwise pulseaudio daemon can't start

rm -rf /var/run/pulse /var/lib/pulse /root/.config/pulse
cp /etc/pulse/* ~/.config/pulse/
pulseaudio -D --exit-idle-time=-1

# Create a virtual speaker output
pactl load-module module-null-sink sink_name=SpeakerOutput
pactl set-default-sink SpeakerOutput
pactl set-default-source SpeakerOutput.monitor

#make config file
mkdir ~/.config
echo -e "[General]\nsystem.audio.type=default" > ~/.config/zoomus.conf

```

---

<div class="post-metadata">

**Author:** ![alextsi](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@alextsi](https://devforum.zoom.us/u/alextsi)\
**Post date:** [October 6, 2023, 10:43pm UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/14 "2023-10-06T22:43:20Z")

</div>

Thank you so much, @chunsiong.zoom. I overlooked a few steps, such as initializing dbus and adding root to the pulse-access and audio groups in my run shell script. However, after updating the script, those errors were resolved.

You’re correct; I noticed another error when I tried to subscribe to audio events. I initially thought it was caused by the “Invalid CTL/Unknown PCM” issues. I’ll create a separate post to keep this topic focused.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [October 7, 2023, 2:48am UTC](https://devforum.zoom.us/t/zoom-linux-sdk-5-15-12-audio-recording-not-working/94899/15 "2023-10-07T02:48:41Z")

</div>

@alextsi ,  
I am glad that @chunsiong.zoom was able to provide assistance and I would like to express my gratitude for your contribution to the Zoom Developer community. I am looking forward to your future posts. Please don’t forget to tag us in your new post so that we can be notified.
