Coder Social home page Coder Social logo

psvrframework's Introduction

PSVR Framework

This is my little framework for the PS VR made from a recopilation of info I found over Internet and my own findings.

This framework allows you to control the PS VR set states, turn it on/off, enter/exit VR mode, recenter theater, control box power and read the headset sensors.

This is an experimental work, expect fails ;)

Information sources:

Any code taken from these sources are property of their creators.

Additional resources:

  • VLC library
  • GLEW
  • GLFW
  • GLM

I promise I will add all the required licenses ;)

This code is published under Affero GPL license.

You need the .net Framework 4.5.2 or newer installed to make it work and also need to follow the instructions on the HowTo.txt file on this repository.

UPDATES

V0.4.5

  • LED control interface
  • Device information pane
  • UDP remote control interface
  • Command line interface
  • Debug tools

V0.4.0

  • Unified driver
  • Driver and app installers
  • Linux support

V0.2.0

  • Added VR Player

V0.1.1

  • Added cinematic mode settings
  • Changed recenter cinematic routine

V0.1.0

  • The program will start minimized and stay on a tray icon, to open it double click the icon.
  • The program can now start with Windows
  • Enabled device removal detection
  • Added the possibility to create global shortcuts to the VR functions
  • Added UDP broadcast server with sensor data

To configure the new options click the gear icon.

Download binaries now available in the Releases section

psvrframework's People

Contributors

gusmanb avatar juanjosalvador avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

psvrframework's Issues

Sensor fusion data

I'm having a really bad time trying to get a fusion algorithm to work, I've found the sensor datasheet and I belive I got the correct settings through experimentation (everything is on the wiki) but it always drifts a ton, so there must be something wrong.

There is this player: https://github.com/Swordfish90/PSVRVideoPlayer

It has implemented the fusion code, i would like to check it and see if it drifts or not, but it doesn't works on my computer.

@mungewell could you try it please? If it works, can you sample raw sensor data (with the headset steady having the visor flat) and parsed sensor data before being sent to the fusion algorithm? With that I can compare with my data and see what's wrong.

Barrel/Pin-Cushion Distortion and Colour Seperation

Seen it written (other) several places that for VR mode you don't need to distort, that is wrong. See attached images.

When view in headset the blue box appears true and the red is distorted inwards, the same as is seen on the social screen. So when the distortion of your output looks true on the social screen, you are about correct.

One thing that does confuse me is why a primary colour of red, green and blue is being split into other colours. Does this mean that the PSVR is not showing RGB pixels?

img-20161108-00162
psvr_distorted
psvr_distortion.svg.zip

Report 0x11

So, this report does a lot more than we thought.

Byte 1 and 3 control the led settings. Byte 1 is a two nibble value, first nibble turns on/off the front leds, second nibble rear leds. Byte 2 is a two nibble mask, nibble 1 indicates if to apply the byte 1 front led setting and nibble 2 indicates if to apply the byte 1 back led settings.

Now, byte 0 and 2 have me puzzled, byte 2 seems to be a mask, when bit 1 is set byte 0 starts to work, and byte 0 seems to do something with screen mode, whenever it's value changes the screen resets but the HMD doesn't show again the screen after that reset, it keeps the loader on screen.

The other four bytes left seem to do nothing.

HMD recognition and vr mode sensors

First of all hi absolutely fantastic work I'm already fooling around with this and it is so exciting to see people making this much work already :D

I was wondering if in this version of your project you can look around in vr mode or not (perhaps in 360 videos) or is it just a still image for now?
Second I was wondering if there is already a way to have games like elite dangerous or even just steam vr recognize the ps vr as an hmd

Option to translate tracking into mouse movements

Excellent work gusmanb.
Would it be possible to enhance the PSVRFramework to allow tracking to be translated into mouse movements?
I know there are alternative apps that claim to do this but they don't work for me, probably because I am using Microsoft's WinUSB drivers.
Your app is looking like it will be the all-in-one solution.

Toolbox Linux compat

I'm testing the toolbox on linux. It works itself but the commands doesn't works.

It finds the device, opens it, but when I send the set config, try to claim an interface or send data it fails miserably.

Any help with this would be highly apreciated as I never worked with libusb and Linux.

SteamVR Support

Hey, excellent job on the project so far. I was just curious if you plan on doing anything like connecting this up to SteamVR, in a manner similar to the way VRidge does it with phones?

Also, any idea on what camera may eventually be needed for positional tracking? I do have a PlayStation Eye (PS3) still on me that I might be able to hook up, but it can only manage 240p120 or 480p60. In comparison, the PlayStation 4 Camera can manage 800p60 or 400p120 (16:10).

Looking forward to future updates with this project!

Compilation of C++ projects fail in VS2015

Has anyone been successful in running git clone and compiling in Visual Studio? Can they provide a basic walkthrough? Eg VS version? Include --recursive when retrieving? Any other tricks?
Issues I encounter:
C# projects compile fine but C++ all fail.
References to include/headers in external folder are not found. You can fix by resolving path in quotes rather than angular brackets. Then it starts complaining about lib files and some cannot all be found at all.
Migration of PSVRToolboxSetup proj fails as incompatible.
On a positive note the mouse emulation in service dependent version of PSVRToolkit works great. Happy to downgrade VS if necessary. Basic walkthrough (with versions) would be ideal.

Release 0.4.5 - no window shown on Linux

Attempting to run 0.4.5 portable on Linux with Mono.

Un-RAR'ed to a directory and run as:

xubuntu@xubuntu:~/psvr$ mono PSVRToolbox.exe
Could not set X locale modifiers
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB

I see a brief flash of a window, and then nothing. :-(

Thought might be running minimized, so copied 'settings.json' from previous Windows install - with no joy. It does appear to still be running (according to 'ps ax'), I just can't see it.

Are there any command line options to prevent 'run minimized'?

EDID - why has it changed?

Bizarrely the EDID that my PSVR seems to have changed slightly. This PSVR has never been plugged into PS4 so it's not something that Sony could have actioned.

From Sat, Oct 29th:

00000000 00 ff ff ff ff ff ff 00 4d d9 03 b4 01 01 01 01 |........M.......|
00000010 30 18 01 03 80 10 09 78 0a 3d a5 a9 56 3d b6 22 |0......x.=..V=."|
00000020 0c 50 54 20 00 00 d1 c0 01 01 01 01 01 01 01 01 |.PT ............|
00000030 01 01 01 01 01 01 02 3a 80 18 71 38 2d 40 58 2c |.......:..q8-@x,|
00000040 45 00 a0 5a 00 00 00 1e d6 09 80 a0 20 e0 2d 10 |E..Z........ .-.|
00000050 10 60 a2 00 a0 5a 00 00 00 18 00 00 00 fc 00 53 |.`...Z.........S|
00000060 43 45 49 20 48 4d 44 20 2a 30 38 0a 00 00 00 fd |CEI HMD *08.....|
00000070 00 17 3d 1a 44 0f 00 0a 20 20 20 20 20 20 01 d0 |..=.D... ..|
00000080 02 03 25 f0 4c 90 1f 05 14 20 04 13 02 03 11 12 |..%.L.... ......|
00000090 01 23 09 07 07 83 01 00 00 68 03 0c 00 11 00 00 |.#.......h......|
000000a0 1e 0f e2 00 6a 00 00 00 00 00 00 00 00 00 00 00 |....j...........|
000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 b3 |................|

From Tue, Nov 1st:

00000000 00 ff ff ff ff ff ff 00 4d d9 03 b4 01 01 01 01 |........M.......|
00000010 30 18 01 03 81 46 27 78 0a 3d a5 a9 56 3d b6 22 |0....F'x.=..V=."|
00000020 0c 50 54 20 00 00 d1 c0 01 01 01 01 01 01 01 01 |.PT ............|
00000030 01 01 01 01 01 01 02 3a 80 18 71 38 2d 40 58 2c |.......:..q8-@x,|
00000040 45 00 a0 5a 00 00 00 1e d6 09 80 a0 20 e0 2d 10 |E..Z........ .-.|
00000050 10 60 a2 00 a0 5a 00 00 00 18 00 00 00 fc 00 53 |.`...Z.........S|
00000060 43 45 49 20 48 4d 44 20 2a 30 38 0a 00 00 00 fd |CEI HMD *08.....|
00000070 00 38 3d 20 44 0f 00 0a 20 20 20 20 20 20 01 54 |.8= D... .T|
00000080 02 03 23 70 4a 90 1f 05 14 20 04 13 03 12 01 26 |..#pJ.... .....&|
00000090 15 07 50 09 07 01 83 01 00 00 68 03 0c 00 21 00 |..P.......h...!.|
000000a0 00 1e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
000000b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000000f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2c |...............,|
00000100

The difference is in the audio section, it now supports AC3 audio... strange.
bus7_poweron_1080p_decode.txt
edid_psvr_decode.txt

Cinemode with GamePad Icon

Messing around with Cmd 0x11, and the following causes a switch into VR mode and then to Cinemod - but without the circles logo.
And then, when you look away from virtual screen it renders a game pad icon with an arrow implying you should push the options button... wtf?

            ep.write('\x11\x00\xaa\x08\x00\x11\x03\x11\xff\xff\xff\xff')
            time.sleep(5)
            ep.write('\x11\x00\xaa\x08\x02\x00\x03\x11\xff\xff\xff\xff')

NVidia drivers

I've updated the nVidia drivers to the latest version and now I can't get the HMD to use 90 or 120Hz, when I try to set it it reverts automatically to the previous one and the tests doesn't allow me to even check them, it says it's incompatible and that's all, it seems they've enforced the parameters exposed by the HDMI info.

Anyone knows a way to circumvent this?

Cinematic - Screen Lock

We now know how to scale the screen however don't know how to get screen to lock into position.

It was suggested that a zoom of value '0x1a' would lock screen, I can not get it to consistently lock position.
It seems that if I run the following with headset off and after it blanks the screen (due to proximity) then the screen is locked, and will not unlock with writes.
If I remove the HMD, let it blank, but wake it before I run script it will unlock (regardless of screen 'distance').... something strange is going on.

   ep.write('\x23\x00\xaa\x04\x00\x00\x00\x00')
   ep.write('\x21\x00\xaa\x10\xc0\x32\x23\x20\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')
   time.sleep(5)
   ep.write('\x21\x00\xaa\x10\xc0\x1a\x23\x20\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')

This may be something to do with having the HMD stationary (ie on the desk) before the screen position is set. Seems like there may be some time to self calibrate required.

   time.sleep(5)
   ep.write('\x21\x00\xaa\x10\xC0\x32\x23\x20\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')

Simply GUI for better User Experience

Obviously you and I are both techy geeks.... and love complicated interfaces ;-)
toolbox

Unfortunately the rest of the populous is not the same. Put simply the interface is 'too much' and we should look to simplify as much as possible. Anything other than the basic functions should be hidden or under different sub-windows/menus.

Basic functions:
1). Enable VR mode, with streaming of UDP data (raw or processed)
2). Enable Cinematic mode, with setting of screen size/distance/brightness and recenter screen.
3). Power On/Off/Shutdown.

Simon

Feature request - Double Tap Recenter

While in Cinematic mode, finding the key/using the mouse to re-center the screen is a pain.

Can the toolbox sense a double tap on the accelerometers to recenter the screen?
Simon

Setup Diagram

Hey guys! Want to say again that you are doing a great job! Thanks! Could ou post a diagram with all the connection we must have to make the psvr working with the pc? To be sure that everybody are testing in the same way.

How to use the VR Mode?

Hi,

the cinematic mode works perfectly, but I couldn't get the VR mode to work.
Everytime I press the "enable VR" button, the screen just goes black after a short loading screen.
Can you help me?

Direction of our efforts

After watching the impressive progress of the PSMoveService guys and having nearly arrived to an agreement to make our toolbox and the move service compatibles I belive we can stop fighting with the sensor data and concentrate on the USB and HDMI protocol, let our efforts go to control the system and the team at PSMoveService concentrate on controlling the input data.

Does this sound right to you?

Any opinion is welcome.

Driver Problems

hi there

when i try to install the winusb drivers i get error message

a problem was encountered while trying to add the drivers to the store

and when i try to use libusb 32 bit as in how to it tells me to use 64 bit and then when i do that they install but i have usb composite device in device manager with a little yellow triangle on it

then when i load toolbox it is always waiting for psvr

VRPlayer - Problems with media

All the clips that I have tried resulted in no audio, for example:
pearl_no_audio

This clip does not play at all (gives blank screen):
canyon_no_video

Both downloaded from YouTube, and play fine in VLC.

Cmd Fuzzing - 'Bad R-ID' and 'Bad Length'

Seems the ASCII errors will tell you even more...

ep.write('\x19\x00\xaa\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
a000aa3c190142616420522d49442031
39000000000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000000
$ echo -n a000aa3c190142616420522d49442031 | xxd -r -p| hexdump -c
0000000   �  \0   �   < 031 001   B   a   d       R   -   I   D       1

ep.write('\x23\x00\xaa\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')
a000aa3c2303522d494420307832333a
20426164206c656e6774682031365b34
5d000000000000000000000000000000
00000000000000000000000000000000
$ echo -n 20426164206c656e6774682031365b34 | xxd -r -p| hexdump -c
0000000       B   a   d       l   e   n   g   t   h       1   6   [   4

Singleton Implementation

It is just a small issue, but you can start the application 2 times and then it does not work correctly anymore!

How about implementation of a Singleton, that checks if Prog is already started

something like that

static class Program
{
static Mutex mutex = new Mutex(true, "PSVRToolbox");
[STAThread]
static void Main() {
if(mutex.WaitOne(TimeSpan.Zero, true)) {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
mutex.ReleaseMutex();
} else {
MessageBox.Show("only one instance at a time");
}
}
}

Test app with LibUSB and Linux

@mungewell One doubt, are you using the toolbox under linux? If yes, does it works fine?

As I'm re-enabling LibUSB support would be great if the tool is portable between Linux and Windows, the library I use claims to be compatible, but there are some special classes for mono, so I'm not sure if the high level classes already choose which underliying classes to use correctly or I must add some code to enable it's support.

VR Mode - cmd 0x21, mystery byte 14.

Noticed that byte 14 causes screen/social screen to reset VR mode, but we don't know what it is actually doing.

ep.write('\x21\x00\xaa\x10\xC0\x32\x23\x20\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00')
time.sleep(10)
ep.write('\x21\x00\xaa\x10\xC0\x32\x23\x20\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x01\x00')
time.sleep(10)

Unknown bytes in report 0x21

I'm looking at the capture posted on #17 and there is a very interesting thing on the 0x21 reports.

byte b4 which for us is still unknown and b7 what we suppose is IPD have values on the report, 0x80 and 0xC0 for b4 and 0x14 on b7, b7 matches exactly our thoughts, I mean, 63mm of IPD is the default value, but for asian people, usually european/american males tend to have values near 67mm, and 0x14 matches that, 67mm.

And b4, we need to test that byte, it looks to me like a mask of some type, 0x80 is 10000 0000 and 0xC0 is 1100 0000, so it's like something got activated.

@mungewell we know you can't achieve a lock on the screen when you change the size to small, on your reports you were sending that byte as 0xFF (at least on the posted ones) but I send 0x00, maybe this is related?

EDIT: the IPD value matches if 0x00=48mm, 0x0F = 63mm and 0x1E = 78mm

Black screen with circle when "enable tracking and vr"

First,i like to say thanks for this amazing project !!!

ok , my problem is , all other settings work very good , only when i set to "enable tracking and vr" i only get a black screen with a white circle turning, but if i set again cinematic or only vr it change fine.

i'm using the 0.4.6 portable and DriverPackages.zip 0.4.0 under win 10 x64

here is the log:

Received report, ID: F0, Response code: 00 --Raw data-- F000AA100732000000FF00030200000000000000 Report> Received report, ID: A0, Response code: 00 --Raw data-- A000AA3C110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Report> Received report, ID: A0, Response code: 00 --Raw data-- A000AA3C150000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Report> Received report, ID: F0, Response code: 00 --Raw data-- F000AA100332000000FF00030200000000000000 Report>

Config change - 0xF0 report

It has been suggested that a response '0xF0' indicates a configuration change. This can be seen in the attached log, and also sees related to command '0x21' in that the 5th byte changes between '0x80' and '0xC0'.
config_change

how to donate

Hi

Please open crowdfunding or PayPal account....

I like to donate

Test package with new drivers

I've created an installer for the app and installers for the LibUSB and WinUSB drivers. Also I need some tests under Linux, this package has the hotkeys disabled to avoid crashes.

Anybody testing the new installers please report on this issue:

  • OS version
  • Previously installed versions if any
  • PSVRTool installation results
  • WinUSB installation results
  • LibUSB installation results

Steps to install drivers:

1-Uncompress the DriverPackages ZIP file
2-Choose which driver to install, LibUSB or WinUSB and enter in it's folder
3-Enter to PS_VR_Control_Interface_5 and execute InstallDriver
4-Repeat the same process for folder PS_VR_Sensor_Interface_4

PSRToolboxSetup.zip
DriverPackages.zip

Data through HDMI-CEC

It seems the PS4 is sending data through HDMI to the headset, maybe using HDMI 2.0 network channels or with CEC 2.0

We need more info about this as it seems to control the screen locking and audio output.

Needed testers for new system

I've finished the new system with the service apart from the toolbox and the reduced interface, so I need people to test it.

This is a test build, is in debug mode so it will output any exception. Also, please, DON'T ASK ABOUT HEAD TRACKING, it works but there's nothing to consume it, so no, this doesn't works with steam nor the VR player.

The toolbox can work in two modes, standalone or service dependant.
Standalone mode does that, work standalone without the need of the service, this mode is planned for people which wants only to use the cinematic mode and maybe the vr player (still no input broadcast, but may be I will add it on a future).
Service dependant uses the new (preferred) mode where it connects to the service.

The service is a Windows service, it will boot with your computer automatically so the PS VR headset will be always ready to be used by any program implementing the client. The client code is included on the PSVRFramework library, if any one wants to create a program which controls the device just needs to link to the library, create a new instance of the client and call the exposed functions like HeadsetOn or EnterCinematicMode. Also, as I'm programming the OpenVR driver I got the client on C++, I will post it when I get the driver working.

The service is self-managed, you can install it from the command line, just call "PSVRService /I" and it will be installed, /U uninstalls it, and also you can control it's state with /S /P and /R. Run "PSVRService /H" for more info.

The service should be compatible with Linux, instead of starting with "mono (executable)" it must be started with "mono-service PSVRService.exe". It will return immediately as it will start a daemon, it's execution can be controlled with kill to send signals, more info here.

So, if anyone wants to test the new packages just uncompress them each one on a folder. I would need these tests:

1-Install the service, it will boot automatically (on Linux run it with mono-service).
2-Start the toolbox and try it, report any problem.
3-Go to settings on the toolbox and enable standalone mode.
4-Exit from the toolbox.
5-Uninstall service (on Linux use kill (service-proc-id)).
6-Boot up the toolbox, it will now control the device without the service, try it and report any problem.

PSVRService.zip
PSVRToolbox.zip

H.264

I've been thinking a bit about the H.264 interface.

I'm not an expert in H.264 but I have used it a bit with streaming cameras, these used RTP encapsulation to send the frames, and a tipical packet size was 1024.

The OUT report of this interface is 1024 bytes length, which fits with these packet size, so may be worth it to try to send RTP encapsulated H264 data, it may accept it.

When I get some spare time I will create a WinUSB driver and installer and try to feed the device with RTP packets and see what happens.

If someone has any other thoughs all are welcome.

Cmd 0x1B - Not in non-VR Mode?

Try to work out why it errors... does 'VR mode' mean 'VR Audio mode'?

a000aa3c
1b64522d494420307831423a204e6f74 =1BdR-ID 0x1B: Not
20696e206e6f6e2d5652206d6f64652e  in non-VR mode.
00000000000000000000000000000000 =00=00=00=00=00=00=00=00=00=00=00=00=00=00=00=00
000000000000000000000000 =00=00=00=00=00=00=00=00=00=00=00=00

Command 0x21 - Bad Side Tone Value

Interesting, that it spews ASCII..

ep.write('\x21\x00\xaa\x10\xC0\x32\x23\x20\x00\x00\x00\x00\x00\x00\x20\x22\x22\x22\x01\x00')

responds

00000000  a0 00 aa 3c 21 04 52 2d  49 44 20 30 78 32 31 3a  |...<!.R-ID 0x21:|
00000010  20 42 61 64 20 73 69 64  65 74 6f 6e 65 20 76 61  | Bad sidetone va|
00000020  6c 75 65 20 5b 33 34 5d  00 00 00 00 00 00 00 00  |lue [34]........|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

Unity 3d axis control

Hey guys I absolutely love that your helping to get this thing working for PC. I was able to go to VR mode successfully but when i click vr with head tracking it just endlessly displays the buffering symbol. Do I need to plug in the camera? How would I go about assigning controls to the axis of the headset in order to have it control and in game camera. Do the axis have names or are they replacing the mouse axis?

USB Audio - Linux/Alsa -> illegal device name

The PSVR presents a legitimate USB audio device, which has PCM for playback and capture. I think this is supposed to be the chat portal.

Unfortunately Sony put unicode in the device name 'PlayStation®VR' which freaks out Alsa... D'Oh! The mixer can be controlled with 'alsamixer -c 1', but playback fails with 'aplay -D "hw:CARD=PlayStation�VR,DEV=0" ...'.

ALSA lib pcm_hw.c:1700:(_snd_pcm_hw_open) Invalid value for card
aplay: main:722: audio open error: No such device

Fortunately you can re-map the device name as described here:
http://www.alsa-project.org/main/index.php/Changing_card_IDs_with_udev
85-psvr-audio.rules.txt

And now we get playback... not that we can actually hear it though, need to find that flag.

$ aplay -D "dmix:CARD=PSVR,DEV=0" --dump-hw-params -V stereo -c 2 -f S16_LE -r 48000 test.raw 
Playing raw data 'test.raw' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
HW Params of device "dmix:CARD=PSVR,DEV=0":
--------------------
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (21333 21334)
PERIOD_SIZE: 1024
PERIOD_BYTES: 4096
PERIODS: [2 16]
BUFFER_TIME: (42666 341334)
BUFFER_SIZE: [2048 16384]
BUFFER_BYTES: [8192 65536]
TICK_TIME: ALL
--------------------
                 +################ 51%|57%###################+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.