Rebased winepulse-Pulseaudio_Support patches to latest version from http://repo.or.cz/w/wine/multimedia.git.

This commit is contained in:
Sebastian Lackner 2015-01-08 18:34:58 +01:00
parent d4fa1d1816
commit f2b6e399d4
35 changed files with 78 additions and 94 deletions

1
debian/changelog vendored
View File

@ -35,6 +35,7 @@ wine-staging (1.7.34) UNRELEASED; urgency=low
* Added patch to fix NULL dereference in ICSeqCompressFrameStart.
* Added patch to implement support for CUDA GPU video decoding.
* Added patch to fix color key regression causing pink rectangles around text.
* Rebased winepulse-Pulseaudio_Support patches to latest version from http://repo.or.cz/w/wine/multimedia.git.
* Removed patch to emulate write to CR4 register (accepted upstream).
* Removed patch with stub for KeSetSystemAffinityThread (accepted upstream).
* Removed patch to implement combase HSTRING objects (accepted upstream).

View File

@ -3173,44 +3173,48 @@ fi
# |
# | Modified files:
# | * configure.ac, dlls/mmdevapi/main.c, dlls/mmdevapi/tests/render.c, dlls/winepulse.drv/Makefile.in,
# | dlls/winepulse.drv/mmdevdrv.c, dlls/winepulse.drv/winepulse.drv.spec, dlls/winmm/lolvldrv.c
# | dlls/winepulse.drv/mmdevdrv.c, dlls/winepulse.drv/winepulse.drv.spec
# |
if [ "$enable_winepulse_PulseAudio_Support" -eq 1 ]; then
patch_apply winepulse-PulseAudio_Support/0001-winmm-Load-winealsa-if-winepulse-is-found.patch
patch_apply winepulse-PulseAudio_Support/0002-winepulse-Add-initial-stub-for-pulseaudio-support.patch
patch_apply winepulse-PulseAudio_Support/0003-winepulse-Add-format-and-period-probing.patch
patch_apply winepulse-PulseAudio_Support/0004-winepulse-Add-audioclient.patch
patch_apply winepulse-PulseAudio_Support/0005-winepulse-Add-IAudioRenderClient-and-IAudioCaptureCl.patch
patch_apply winepulse-PulseAudio_Support/0006-winepulse-Add-IAudioClock-and-IAudioClock2.patch
patch_apply winepulse-PulseAudio_Support/0007-winepulse-Add-audiostreamvolume.patch
patch_apply winepulse-PulseAudio_Support/0008-winepulse-Add-session-support.patch
patch_apply winepulse-PulseAudio_Support/0009-fix-fdels-trailing-whitespaces.patch
patch_apply winepulse-PulseAudio_Support/0010-winepulse-v12.patch
patch_apply winepulse-PulseAudio_Support/0011-winepulse-v15-Add-support-for-missing-formats-and-si.patch
patch_apply winepulse-PulseAudio_Support/0012-winepulse-v16-Add-official-warning-wine-doesn-t-want.patch
patch_apply winepulse-PulseAudio_Support/0013-winepulse-v17-Fix-winmm-tests.patch
patch_apply winepulse-PulseAudio_Support/0014-winepulse-v18-Latency-and-compilation-improvements.patch
patch_apply winepulse-PulseAudio_Support/0015-winepulse-API-Compatibility-with-1.5.2-onward-v2.patch
patch_apply winepulse-PulseAudio_Support/0016-winepulse-Fix-low-latency-support.patch
patch_apply winepulse-PulseAudio_Support/0017-winepulse-drop-realtime-priority-before-thread-destr.patch
patch_apply winepulse-PulseAudio_Support/0018-winepulse-remove-bogus-SetEvent-from-pulse_started_c.patch
patch_apply winepulse-PulseAudio_Support/0019-winepulse-disable-the-setevent-part-of-the-latency-h.patch
patch_apply winepulse-PulseAudio_Support/0020-winepulse-v20-fix-the-checks-in-IsFormatSupported.patch
patch_apply winepulse-PulseAudio_Support/0021-winepulse-fixup-IsFormatSupported-calls.patch
patch_apply winepulse-PulseAudio_Support/0022-winepulse-v21-return-early-if-padding-didn-t-update.patch
patch_apply winepulse-PulseAudio_Support/0023-winepulse-fix-unneeded-free-in-write.patch
patch_apply winepulse-PulseAudio_Support/0024-winepulse-v23-fixup-a-invalid-free-in-mmdevapi.patch
patch_apply winepulse-PulseAudio_Support/0025-winepulse-use-a-pi-mutex-for-serialization.patch
patch_apply winepulse-PulseAudio_Support/0026-winepulse-add-support-for-IMarshal.patch
patch_apply winepulse-PulseAudio_Support/0027-winepulse-handle-stream-create-failing-correctly.patch
patch_apply winepulse-PulseAudio_Support/0028-winepulse-expose-audio-devices-directly-to-programs.patch
patch_apply winepulse-PulseAudio_Support/0029-winepulse-implement-exclusive-mode.patch
patch_apply winepulse-PulseAudio_Support/0030-winepulse-fix-segfault-in-pulse_rd_loop.patch
patch_apply winepulse-PulseAudio_Support/0031-winepulse-implement-GetPropValue.patch
patch_apply winepulse-PulseAudio_Support/0032-winepulse-fetch-actual-program-name-if-possible.patch
patch_apply winepulse-PulseAudio_Support/0033-winepulse-return-PKEY_AudioEndpoint_PhysicalSpeakers.patch
patch_apply winepulse-PulseAudio_Support/0001-winepulse-Add-initial-stub-for-pulseaudio-support.patch
patch_apply winepulse-PulseAudio_Support/0002-winepulse-Add-format-and-period-probing.patch
patch_apply winepulse-PulseAudio_Support/0003-winepulse-Add-audioclient.patch
patch_apply winepulse-PulseAudio_Support/0004-winepulse-Add-IAudioRenderClient-and-IAudioCaptureCl.patch
patch_apply winepulse-PulseAudio_Support/0005-winepulse-Add-IAudioClock-and-IAudioClock2.patch
patch_apply winepulse-PulseAudio_Support/0006-winepulse-Add-audiostreamvolume.patch
patch_apply winepulse-PulseAudio_Support/0007-winepulse-Add-session-support.patch
patch_apply winepulse-PulseAudio_Support/0008-fix-fdels-trailing-whitespaces.patch
patch_apply winepulse-PulseAudio_Support/0009-winepulse-v12.patch
patch_apply winepulse-PulseAudio_Support/0010-winepulse-v15-Add-support-for-missing-formats-and-si.patch
patch_apply winepulse-PulseAudio_Support/0011-winepulse-v16-Add-official-warning-wine-doesn-t-want.patch
patch_apply winepulse-PulseAudio_Support/0012-winepulse-v17-Fix-winmm-tests.patch
patch_apply winepulse-PulseAudio_Support/0013-winepulse-v18-Latency-and-compilation-improvements.patch
patch_apply winepulse-PulseAudio_Support/0014-winepulse-API-Compatibility-with-1.5.2-onward-v2.patch
patch_apply winepulse-PulseAudio_Support/0015-winepulse-Fix-low-latency-support.patch
patch_apply winepulse-PulseAudio_Support/0016-winepulse-drop-realtime-priority-before-thread-destr.patch
patch_apply winepulse-PulseAudio_Support/0017-winepulse-remove-bogus-SetEvent-from-pulse_started_c.patch
patch_apply winepulse-PulseAudio_Support/0018-winepulse-disable-the-setevent-part-of-the-latency-h.patch
patch_apply winepulse-PulseAudio_Support/0019-winepulse-v20-fix-the-checks-in-IsFormatSupported.patch
patch_apply winepulse-PulseAudio_Support/0020-winepulse-fixup-IsFormatSupported-calls.patch
patch_apply winepulse-PulseAudio_Support/0021-winepulse-v21-return-early-if-padding-didn-t-update.patch
patch_apply winepulse-PulseAudio_Support/0022-winepulse-fix-unneeded-free-in-write.patch
patch_apply winepulse-PulseAudio_Support/0023-winepulse-v23-fixup-a-invalid-free-in-mmdevapi.patch
patch_apply winepulse-PulseAudio_Support/0024-winepulse-use-a-pi-mutex-for-serialization.patch
patch_apply winepulse-PulseAudio_Support/0025-winepulse-add-support-for-IMarshal.patch
patch_apply winepulse-PulseAudio_Support/0026-winepulse-handle-stream-create-failing-correctly.patch
patch_apply winepulse-PulseAudio_Support/0027-winepulse-Trivial-cleanups-and-changes-for-consisten.patch
patch_apply winepulse-PulseAudio_Support/0028-winepulse-Sync-default-channel-masks-with-other-driv.patch
patch_apply winepulse-PulseAudio_Support/0029-winepulse-In-Shared-mode-track-device-position-in-by.patch
patch_apply winepulse-PulseAudio_Support/0030-winepulse-Always-mute-buffer.patch
patch_apply winepulse-PulseAudio_Support/0031-winepulse-Remove-volume-support.patch
patch_apply winepulse-PulseAudio_Support/0032-winepulse-Forward-winmm-functions-to-winealsa.patch
patch_apply winepulse-PulseAudio_Support/0033-winepulse-expose-audio-devices-directly-to-programs.patch
patch_apply winepulse-PulseAudio_Support/0034-winepulse-implement-exclusive-mode.patch
patch_apply winepulse-PulseAudio_Support/0035-winepulse-fix-segfault-in-pulse_rd_loop.patch
patch_apply winepulse-PulseAudio_Support/0036-winepulse-implement-GetPropValue.patch
patch_apply winepulse-PulseAudio_Support/0037-winepulse-fetch-actual-program-name-if-possible.patch
patch_apply winepulse-PulseAudio_Support/0038-winepulse-return-PKEY_AudioEndpoint_PhysicalSpeakers.patch
(
echo '+ { "Maarten Lankhorst", "winmm: Load winealsa if winepulse is found.", 1 },';
echo '+ { "Maarten Lankhorst", "winepulse: Add initial stub for pulseaudio support.", 1 },';
echo '+ { "Maarten Lankhorst", "winepulse: Add format and period probing.", 1 },';
echo '+ { "Maarten Lankhorst", "winepulse: Add audioclient.", 1 },';
@ -3237,6 +3241,12 @@ if [ "$enable_winepulse_PulseAudio_Support" -eq 1 ]; then
echo '+ { "Maarten Lankhorst", "winepulse: use a pi-mutex for serialization.", 1 },';
echo '+ { "Maarten Lankhorst", "winepulse: add support for IMarshal.", 1 },';
echo '+ { "Mark Harmstone", "winepulse: handle stream create failing correctly.", 1 },';
echo '+ { "Andrew Eikum", "winepulse: Trivial cleanups and changes for consistency with other drivers.", 1 },';
echo '+ { "Andrew Eikum", "winepulse: Sync default channel masks with other drivers.", 1 },';
echo '+ { "Andrew Eikum", "winepulse: In Shared mode, track device position in bytes.", 1 },';
echo '+ { "Andrew Eikum", "winepulse: Always mute buffer.", 1 },';
echo '+ { "Andrew Eikum", "winepulse: Remove volume support.", 1 },';
echo '+ { "Maarten Lankhorst", "winepulse: Forward winmm functions to winealsa.", 1 },';
echo '+ { "Mark Harmstone", "winepulse: expose audio devices directly to programs.", 1 },';
echo '+ { "Mark Harmstone", "winepulse: implement exclusive mode.", 1 },';
echo '+ { "Mark Harmstone", "winepulse: fix segfault in pulse_rd_loop.", 1 },';

View File

@ -1,29 +0,0 @@
From 170413df2bcce9416f55c1fd6feeeb49794ef530 Mon Sep 17 00:00:00 2001
From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date: Mon, 14 Jul 2014 09:50:02 +0200
Subject: [PATCH 08/42] winmm: Load winealsa if winepulse is found
Fixes midi on winepulse
---
dlls/winmm/lolvldrv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/winmm/lolvldrv.c b/dlls/winmm/lolvldrv.c
index c3b3674..56cfe35 100644
--- a/dlls/winmm/lolvldrv.c
+++ b/dlls/winmm/lolvldrv.c
@@ -544,7 +544,10 @@ static void MMDRV_Init(void)
drvA = HeapAlloc(GetProcessHeap(), 0, size);
WideCharToMultiByte(CP_ACP, 0, pv.u.pwszVal, -1, drvA, size, NULL, NULL);
- MMDRV_Install(drvA, drvA, FALSE);
+ if (!strcasecmp(drvA, "winepulse.drv"))
+ MMDRV_Install("winealsa.drv", "winealsa.drv", 0);
+ else
+ MMDRV_Install(drvA, drvA, FALSE);
HeapFree(GetProcessHeap(), 0, drvA);
PropVariantClear(&pv);
--
2.0.0

View File

@ -1,4 +1,4 @@
From 195910962f9d93ee1cad8278ed0ba31d4efc5d34 Mon Sep 17 00:00:00 2001
From c70a0c4b7242ae062876ee1a6b74f03f7e60c0d6 Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Mon, 3 Nov 2014 02:06:40 +0000
Subject: winepulse: expose audio devices directly to programs
@ -19,12 +19,12 @@ Changes by Sebastian Lackner <sebastian@fds-team.de>:
1 file changed, 226 insertions(+), 7 deletions(-)
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
index e755e8a..d29fa06 100644
index 063b1db..8a75f0e 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -85,6 +85,11 @@ const WCHAR pulse_keyW[] = {'S','o','f','t','w','a','r','e','\\',
'W','i','n','e','\\','P','u','l','s','e',0};
const WCHAR pulse_streamW[] = { 'S','t','r','e','a','m','V','o','l',0 };
@@ -84,6 +84,11 @@ static struct list g_sessions = LIST_INIT(g_sessions);
static WAVEFORMATEXTENSIBLE pulse_fmt[2];
static REFERENCE_TIME pulse_min_period[2], pulse_def_period[2];
+static const WCHAR drv_key_devicesW[] = {'S','o','f','t','w','a','r','e','\\',
+ 'W','i','n','e','\\','D','r','i','v','e','r','s','\\',
@ -34,7 +34,7 @@ index e755e8a..d29fa06 100644
static GUID pulse_render_guid =
{ 0xfd47d9cc, 0x4218, 0x4135, { 0x9c, 0xe2, 0x0c, 0x19, 0x5c, 0x87, 0x40, 0x5b } };
static GUID pulse_capture_guid =
@@ -173,6 +178,7 @@ struct ACImpl {
@@ -161,6 +166,7 @@ struct ACImpl {
IMMDevice *parent;
struct list entry;
float vol[PA_CHANNELS_MAX];
@ -42,7 +42,7 @@ index e755e8a..d29fa06 100644
LONG ref;
EDataFlow dataflow;
@@ -692,6 +698,9 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
@@ -679,6 +685,9 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
char buffer[64];
static LONG number;
pa_buffer_attr attr;
@ -52,7 +52,7 @@ index e755e8a..d29fa06 100644
if (This->stream) {
pa_stream_disconnect(This->stream);
while (pa_stream_get_state(This->stream) == PA_STREAM_READY)
@@ -716,12 +725,21 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
@@ -703,12 +712,21 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
attr.maxlength = attr.tlength = This->bufsize_bytes;
attr.prebuf = pa_frame_size(&This->ss);
dump_attr(&attr);
@ -78,7 +78,7 @@ index e755e8a..d29fa06 100644
if (ret < 0) {
WARN("Returns %i\n", ret);
return AUDCLNT_E_ENDPOINT_CREATE_FAILED;
@@ -740,11 +758,131 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
@@ -727,11 +745,131 @@ static HRESULT pulse_stream_connect(ACImpl *This, UINT32 period_bytes) {
return S_OK;
}
@ -211,7 +211,7 @@ index e755e8a..d29fa06 100644
TRACE("%d %p %p %p\n", flow, ids, num, def_index);
@@ -778,6 +916,27 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, const WCHAR ***ids, GUID **
@@ -765,6 +903,27 @@ HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, const WCHAR ***ids, GUID **
else
(*keys)[0] = pulse_capture_guid;
@ -239,8 +239,8 @@ index e755e8a..d29fa06 100644
return S_OK;
}
@@ -794,8 +953,66 @@ int WINAPI AUDDRV_GetPriority(void)
return SUCCEEDED(hr) ? 3 : 0;
@@ -777,20 +936,79 @@ int WINAPI AUDDRV_GetPriority(void)
return SUCCEEDED(hr) ? Priority_Preferred : Priority_Unavailable;
}
+static BOOL get_pulse_name_by_guid(const GUID *guid, char *name, DWORD name_size, EDataFlow *flow)
@ -306,8 +306,7 @@ index e755e8a..d29fa06 100644
HRESULT hr;
ACImpl *This;
int i;
@@ -813,12 +1030,13 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
}
EDataFlow dataflow;
TRACE("%s %p %p\n", debugstr_guid(guid), dev, out);
+
@ -322,7 +321,7 @@ index e755e8a..d29fa06 100644
*out = NULL;
pthread_mutex_lock(&pulse_lock);
@@ -841,6 +1059,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
@@ -813,6 +1031,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
This->parent = dev;
for (i = 0; i < PA_CHANNELS_MAX; ++i)
This->vol[i] = 1.f;
@ -331,5 +330,5 @@ index e755e8a..d29fa06 100644
hr = CoCreateFreeThreadedMarshaler((IUnknown*)This, &This->marshal);
if (hr) {
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From 0329e30fe4fe51ec5c7923d11987aa6c28cbd773 Mon Sep 17 00:00:00 2001
From 3510a611556452d32624578cd9d5d658f53844fa Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Thu, 4 Dec 2014 21:36:42 +0000
Subject: winepulse: implement GetPropValue
@ -9,10 +9,10 @@ Subject: winepulse: implement GetPropValue
2 files changed, 156 insertions(+)
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
index ea20c2b..986584c 100644
index 3be56fa..63b9786 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -52,6 +52,7 @@
@@ -50,6 +50,7 @@
#include "initguid.h"
#include "ks.h"
#include "ksmedia.h"
@ -20,7 +20,7 @@ index ea20c2b..986584c 100644
#include "mmdeviceapi.h"
#include "audioclient.h"
#include "endpointvolume.h"
@@ -3437,3 +3438,157 @@ HRESULT WINAPI AUDDRV_GetAudioSessionManager(IMMDevice *device,
@@ -3341,3 +3342,157 @@ HRESULT WINAPI AUDDRV_GetAudioSessionManager(IMMDevice *device,
*out = &This->IAudioSessionManager2_iface;
return S_OK;
}
@ -179,14 +179,17 @@ index ea20c2b..986584c 100644
+ return userdata.hr;
+}
diff --git a/dlls/winepulse.drv/winepulse.drv.spec b/dlls/winepulse.drv/winepulse.drv.spec
index 612bf46..adda949 100644
index 288de87..7aeb175 100644
--- a/dlls/winepulse.drv/winepulse.drv.spec
+++ b/dlls/winepulse.drv/winepulse.drv.spec
@@ -3,3 +3,4 @@
@@ -3,6 +3,7 @@
@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
@ stdcall -private GetAudioEndpoint(ptr ptr ptr) AUDDRV_GetAudioEndpoint
@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager
+@ stdcall -private GetPropValue(ptr ptr ptr) AUDDRV_GetPropValue
# WinMM driver functions
@ stdcall -private DriverProc(long long long long long) winealsa.drv.DriverProc
--
2.1.3
2.2.1

View File

@ -1,4 +1,4 @@
From bbc71c263d2fe256f4f68a33810f037cc47bf13a Mon Sep 17 00:00:00 2001
From 4882a21ae315e9372d4d21a653a4ec7ce2d64896 Mon Sep 17 00:00:00 2001
From: Mark Harmstone <mark@harmstone.com>
Date: Sun, 21 Dec 2014 23:49:41 +0000
Subject: winepulse: fetch actual program name if possible
@ -14,21 +14,21 @@ Changes by Sebastian Lackner <sebastian@fds-team.de>:
2 files changed, 116 insertions(+), 9 deletions(-)
diff --git a/dlls/winepulse.drv/Makefile.in b/dlls/winepulse.drv/Makefile.in
index 158bbc0..27af076 100644
index 3428329..1112575 100644
--- a/dlls/winepulse.drv/Makefile.in
+++ b/dlls/winepulse.drv/Makefile.in
@@ -1,5 +1,5 @@
MODULE = winepulse.drv
-IMPORTS = dxguid uuid winmm user32 advapi32 ole32
+IMPORTS = dxguid uuid winmm user32 advapi32 ole32 version
DELAYIMPORTS = winealsa.drv
EXTRALIBS = @PULSELIBS@ $(PTHREAD_LIBS)
EXTRAINCL = @PULSEINCL@
diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
index 986584c..445c242 100644
index 63b9786..356677c 100644
--- a/dlls/winepulse.drv/mmdevdrv.c
+++ b/dlls/winepulse.drv/mmdevdrv.c
@@ -45,6 +45,7 @@
@@ -43,6 +43,7 @@
#include "wine/list.h"
#include "ole2.h"
@ -36,7 +36,7 @@ index 986584c..445c242 100644
#include "dshow.h"
#include "dsound.h"
#include "propsys.h"
@@ -414,6 +415,109 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
@@ -402,6 +403,109 @@ static void pulse_probe_settings(int render, WAVEFORMATEXTENSIBLE *fmt) {
}
}
@ -146,7 +146,7 @@ index 986584c..445c242 100644
static HRESULT pulse_connect(void)
{
int len;
@@ -437,14 +541,17 @@ static HRESULT pulse_connect(void)
@@ -425,14 +529,17 @@ static HRESULT pulse_connect(void)
pa_context_unref(pulse_ctx);
GetModuleFileNameW(NULL, path, sizeof(path)/sizeof(*path));