FreeBSD Bugzilla – Attachment 205706 Details for
Bug 233301
emulators/virtualbox-ose - multimedia issues on 13-current
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Reverting upstream revs r73370 r73529 r73689 r73695 r73696 r73838 and r76553
patch-src-VBox-Devices-Audio-DrvHostOSSAudio.cpp (text/plain), 5.70 KB, created by
Sergey A. Osokin
on 2019-07-11 22:52:49 UTC
(
hide
)
Description:
Reverting upstream revs r73370 r73529 r73689 r73695 r73696 r73838 and r76553
Filename:
MIME Type:
Creator:
Sergey A. Osokin
Created:
2019-07-11 22:52:49 UTC
Size:
5.70 KB
patch
obsolete
>--- src/VBox/Devices/Audio/DrvHostOSSAudio.cpp.orig 2019-07-11 18:40:20.749068000 -0400 >+++ src/VBox/Devices/Audio/DrvHostOSSAudio.cpp 2019-07-11 18:41:50.838422000 -0400 >@@ -1,10 +1,10 @@ >-/* $Id: DrvHostOSSAudio.cpp 76553 2019-01-01 01:45:53Z vboxsync $ */ >+/* $Id: DrvHostOSSAudio.cpp 73370 2018-07-26 13:52:12Z vboxsync $ */ > /** @file > * OSS (Open Sound System) host audio backend. > */ > > /* >- * Copyright (C) 2014-2019 Oracle Corporation >+ * Copyright (C) 2014-2017 Oracle Corporation > * > * This file is part of VirtualBox Open Source Edition (OSE), as > * available from http://www.virtualbox.org. This file is free software; >@@ -157,27 +157,27 @@ > switch (fmt) > { > case AFMT_S8: >- pProps->cBytes = 1; >+ pProps->cBits = 8; > pProps->fSigned = true; > break; > > case AFMT_U8: >- pProps->cBytes = 1; >+ pProps->cBits = 8; > pProps->fSigned = false; > break; > > case AFMT_S16_LE: >- pProps->cBytes = 2; >+ pProps->cBits = 16; > pProps->fSigned = true; > break; > > case AFMT_U16_LE: >- pProps->cBytes = 2; >+ pProps->cBits = 16; > pProps->fSigned = false; > break; > > case AFMT_S16_BE: >- pProps->cBytes = 2; >+ pProps->cBits = 16; > pProps->fSigned = true; > #ifdef RT_LITTLE_ENDIAN > pProps->fSwapEndian = true; >@@ -185,7 +185,7 @@ > break; > > case AFMT_U16_BE: >- pProps->cBytes = 2; >+ pProps->cBits = 16; > pProps->fSigned = false; > #ifdef RT_LITTLE_ENDIAN > pProps->fSwapEndian = true; >@@ -224,7 +224,7 @@ > > static int ossStreamOpen(const char *pszDev, int fOpen, POSSAUDIOSTREAMCFG pOSSReq, POSSAUDIOSTREAMCFG pOSSAcq, int *phFile) > { >- int rc = VERR_AUDIO_STREAM_COULD_NOT_CREATE; >+ int rc = VINF_SUCCESS; > > int hFile = -1; > do >@@ -233,22 +233,23 @@ > if (hFile == -1) > { > LogRel(("OSS: Failed to open %s: %s (%d)\n", pszDev, strerror(errno), errno)); >+ rc = RTErrConvertFromErrno(errno); > break; > } > > int iFormat; >- switch (pOSSReq->Props.cBytes) >+ switch (pOSSReq->Props.cBits) > { >- case 1: >+ case 8: > iFormat = pOSSReq->Props.fSigned ? AFMT_S8 : AFMT_U8; > break; > >- case 2: >+ case 16: > iFormat = pOSSReq->Props.fSigned ? AFMT_S16_LE : AFMT_U16_LE; > break; > > default: >- rc = VERR_AUDIO_STREAM_COULD_NOT_CREATE; >+ rc = VERR_NOT_SUPPORTED; > break; > } > >@@ -258,6 +259,7 @@ > if (ioctl(hFile, SNDCTL_DSP_SAMPLESIZE, &iFormat)) > { > LogRel(("OSS: Failed to set audio format to %ld: %s (%d)\n", iFormat, strerror(errno), errno)); >+ rc = RTErrConvertFromErrno(errno); > break; > } > >@@ -266,6 +268,7 @@ > { > LogRel(("OSS: Failed to set number of audio channels (%RU8): %s (%d)\n", > pOSSReq->Props.cChannels, strerror(errno), errno)); >+ rc = RTErrConvertFromErrno(errno); > break; > } > >@@ -273,6 +276,7 @@ > if (ioctl(hFile, SNDCTL_DSP_SPEED, &freq)) > { > LogRel(("OSS: Failed to set audio frequency (%dHZ): %s (%d)\n", pOSSReq->Props.uHz, strerror(errno), errno)); >+ rc = RTErrConvertFromErrno(errno); > break; > } > >@@ -281,6 +285,7 @@ > if (ioctl(hFile, SNDCTL_DSP_NONBLOCK)) > { > LogRel(("OSS: Failed to set non-blocking mode: %s (%d)\n", strerror(errno), errno)); >+ rc = RTErrConvertFromErrno(errno); > break; > } > #endif >@@ -296,6 +301,7 @@ > { > LogRel(("OSS: Failed to set %RU16 fragments to %RU32 bytes each: %s (%d)\n", > pOSSReq->cFragments, pOSSReq->cbFragmentSize, strerror(errno), errno)); >+ rc = RTErrConvertFromErrno(errno); > break; > } > >@@ -303,6 +309,7 @@ > if (ioctl(hFile, fIn ? SNDCTL_DSP_GETISPACE : SNDCTL_DSP_GETOSPACE, &abinfo)) > { > LogRel(("OSS: Failed to retrieve %s buffer length: %s (%d)\n", fIn ? "input" : "output", strerror(errno), errno)); >+ rc = RTErrConvertFromErrno(errno); > break; > } > >@@ -311,7 +318,7 @@ > { > pOSSAcq->Props.cChannels = cChannels; > pOSSAcq->Props.uHz = freq; >- pOSSAcq->Props.cShift = PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pOSSAcq->Props.cBytes, pOSSAcq->Props.cChannels); >+ pOSSAcq->Props.cShift = PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pOSSAcq->Props.cBits, pOSSAcq->Props.cChannels); > > pOSSAcq->cFragments = abinfo.fragstotal; > pOSSAcq->cbFragmentSize = abinfo.fragsize; >@@ -552,8 +559,6 @@ > { > RT_NOREF(pInterface); > >- RTStrPrintf2(pBackendCfg->szName, sizeof(pBackendCfg->szName), "OSS audio driver"); >- > pBackendCfg->cbStreamIn = sizeof(OSSAUDIOSTREAM); > pBackendCfg->cbStreamOut = sizeof(OSSAUDIOSTREAM); > >@@ -631,7 +636,6 @@ > ossReq.cbFragmentSize = s_OSSConf.fragsize; > > OSSAUDIOSTREAMCFG ossAcq; >- RT_ZERO(ossAcq); > > rc = ossStreamOpen(s_OSSConf.devpath_in, O_RDONLY | O_NONBLOCK, &ossReq, &ossAcq, &hFile); > if (RT_SUCCESS(rc)) >@@ -681,11 +685,7 @@ > > do > { >- OSSAUDIOSTREAMCFG reqStream; >- RT_ZERO(reqStream); >- >- OSSAUDIOSTREAMCFG obtStream; >- RT_ZERO(obtStream); >+ OSSAUDIOSTREAMCFG reqStream, obtStream; > > memcpy(&reqStream.Props, &pCfgReq->Props, sizeof(PDMAUDIOPCMPROPS)); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233301
:
203632
|
203633
|
205654
|
205683
| 205706 |
214798
|
216400