diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-07-24 17:57:24 +0100 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-07-30 02:35:12 +0100 |
commit | e9b45ff67d32fdc27950a51135b6dabada8334e7 (patch) | |
tree | de99cd760c8292ee1dd334e23e1e5cc43e90dfbd /recipes-qt/qte/qte-2.3.10/ipaq_sound_fix.patch | |
download | meta-opie-e9b45ff67d32fdc27950a51135b6dabada8334e7.tar.gz |
initial commit of meta-opie
Populate the repository with files from OpenEmbedded at revision
45edf621296daf150c72b876d720861235e5762e - no changes, only rearranged
the directory structure to match the new oe-core style and added
COPYING.MIT and README.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'recipes-qt/qte/qte-2.3.10/ipaq_sound_fix.patch')
-rw-r--r-- | recipes-qt/qte/qte-2.3.10/ipaq_sound_fix.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/recipes-qt/qte/qte-2.3.10/ipaq_sound_fix.patch b/recipes-qt/qte/qte-2.3.10/ipaq_sound_fix.patch new file mode 100644 index 0000000..af72362 --- /dev/null +++ b/recipes-qt/qte/qte-2.3.10/ipaq_sound_fix.patch @@ -0,0 +1,60 @@ +Attention HACK ahead: + The OpenSoundSystem is just scary this is a special hack + for supporting iPAQ(s) at least h3870. + + Features: + -It does not crash when playing a 'null' file + -Change sound fragment size to 12 + -Force stereo on!!! (hardcoded at least uda1341 needs it) + + + +Index: qt-2.3.10/src/kernel/qsoundqss_qws.cpp +=================================================================== +--- qt-2.3.10.orig/src/kernel/qsoundqss_qws.cpp 2005-03-20 17:11:29.000000000 +0100 ++++ qt-2.3.10/src/kernel/qsoundqss_qws.cpp 2005-03-20 23:53:46.403129133 +0100 +@@ -73,7 +73,7 @@ + }; + + #if defined(QT_QWS_IPAQ) +-static const int sound_fragment_size = 12; ++static const int sound_fragment_size = 14; + #else + static const int sound_fragment_size = 12; + #endif +@@ -451,8 +451,14 @@ + + int devSamples() + { +- int possible = (((max1+max2-out) / ((chunkdata.wBitsPerSample>>3)*chunkdata.channels)) +- *sound_speed)/chunkdata.samplesPerSec; ++ if ( !(chunkdata.wBitsPerSample>>3) || ++ !chunkdata.channels || ++ !sound_speed || ++ !chunkdata.samplesPerSec ) ++ return 0; ++ ++ int possible = (((max1+max2-out) / ((chunkdata.wBitsPerSample>>3 )*chunkdata.channels)) ++ *sound_speed)/chunkdata.samplesPerSec; + + return possible; + } +@@ -1116,12 +1127,14 @@ + if ( AFMT_U8 != v ) + qDebug("Want format %d got %d", AFMT_U8, v); + #endif +- v=sound_stereo; if ( ioctl(fd, SNDCTL_DSP_STEREO, &v) ) ++ v=1; if ( ioctl(fd, SNDCTL_DSP_STEREO, &v) ) + qWarning("Could not set stereo %d",v); + if ( sound_stereo != v ) +- qDebug("Want stereo %d got %d", sound_stereo, v); +-#ifdef QT_QWS_SOUND_STEREO +- sound_stereo=v; ++ qDebug("Want stereo %d got %d", sound_stereo, v); ++#if defined(QT_QWS_IPAQ) ++ sound_stereo=1; ++#elif QT_QWS_SOUND_STEREO ++ sound_stereo=v; + #endif + v=sound_speed; if ( ioctl(fd, SNDCTL_DSP_SPEED, &sound_speed) ) + qWarning("Could not set speed %d",v); |