# Can&#39;t open PsychPortAudio in mode 8 (&#39;master mode&#39;)

**URL:** <https://psychtoolbox.discourse.group/t/can-39-t-open-psychportaudio-in-mode-8-39-master-mode-39/99>\
**Category:** Uncategorized\
**Created:** [March 27, 2018, 12:20pm UTC](https://psychtoolbox.discourse.group/t/can-39-t-open-psychportaudio-in-mode-8-39-master-mode-39/99 "2018-03-27T12:20:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![l.c.m.bruurmijn](https://avatars.discourse-cdn.com/v4/letter/l/d9b06d/32.png) [@l.c.m.bruurmijn](https://psychtoolbox.discourse.group/u/l.c.m.bruurmijn)\
**Post date:** [March 27, 2018, 12:20pm UTC](https://psychtoolbox.discourse.group/t/can-39-t-open-psychportaudio-in-mode-8-39-master-mode-39/99/1 "2018-03-27T12:20:06Z")

</div>

Hi fellow PTB-users,  
  
I am trying to open an audio port in mode 8, which is the master mode so that I can start using 'OpenSlave'. I tried the following:  
  

\>\> InitializePsychSound;  
\>\> hAudioMaster = PsychPortAudio( 'Open', [], 8, 0, 44100, 2 );  

This gives the following error:

PTB-INFO: Using specially modified PortAudio engine, based on offical version: PortAudio V19-devel  
PTB-ERROR: Desired audio parameters for device -1 unsupported by audio device. PortAudio reports this error: Invalid device   
PTB-ERROR: This could be, e.g., due to an unsupported combination of audio sample rate, audio channel allocation, or audio sample format.  
PTB-ERROR: On Linux you may be able to use ALSA audio converter plugins to make this work.  
INTERNAL PSYCHTOOLBOX ERROR  
&nbsp;&nbsp;&nbsp; error:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PsychError\_system  
&nbsp;&nbsp;&nbsp; general description:&nbsp; Error reported by a system call  
&nbsp;&nbsp;&nbsp; specific description: Failed to open PortAudio audio device due to unsupported combination of audio parameters.  
&nbsp;&nbsp;&nbsp; module name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PsychPortAudio  
&nbsp;&nbsp;&nbsp; subfunction call:&nbsp;&nbsp;&nbsp;&nbsp; Open  
&nbsp;&nbsp;&nbsp; file name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Common/PsychPortAudio/PsychPortAudio.c  
&nbsp;&nbsp;&nbsp; function name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PSYCHPORTAUDIOOpen  
&nbsp;&nbsp;&nbsp; line number:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2420

I tried changing the deviceID (the [] in the above function call), and different values for sampling frequency and number of channels. Opening an audio port in modes other than 8 (1, 2, etc.) does work.

I see the suggestion "may be able to use ALSA audio converter plugins to make this work", but I don't know what is meant by this.

Has anyone experienced the same problem? Thanks in advance for your help!

Best,

Mark

My system: Ubuntu 16.04 LTS, MATLAB R2017b, PsychToolboxVersion: "3.0.14 - Flavor:&nbsp; - Corresponds to SVN Revision"
