-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayer.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/opierec/device.cpp | 16 | ||||
-rw-r--r-- | noncore/multimedia/opierec/qtrec.cpp | 7 |
3 files changed, 27 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp index 7b4bfd9..e6afbd8 100644 --- a/noncore/multimedia/opieplayer2/mediaplayer.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp | |||
@@ -280,9 +280,13 @@ void MediaPlayer::timerEvent( QTimerEvent * ) { | |||
280 | } | 280 | } |
281 | 281 | ||
282 | 282 | ||
283 | void MediaPlayer::blank( bool b ) { | 283 | void MediaPlayer::blank( bool b ) { |
284 | #ifdef QT_QWS_DEVFS | ||
285 | fd=open("/dev/fb/0",O_RDWR); | ||
286 | #else | ||
284 | fd=open("/dev/fb0",O_RDWR); | 287 | fd=open("/dev/fb0",O_RDWR); |
288 | #endif | ||
285 | #ifdef QT_QWS_SL5XXX | 289 | #ifdef QT_QWS_SL5XXX |
286 | fl= open( "/dev/fl", O_RDWR ); | 290 | fl= open( "/dev/fl", O_RDWR ); |
287 | #endif | 291 | #endif |
288 | if (fd != -1) { | 292 | if (fd != -1) { |
diff --git a/noncore/multimedia/opierec/device.cpp b/noncore/multimedia/opierec/device.cpp index 683f0a5..cb47b77 100644 --- a/noncore/multimedia/opierec/device.cpp +++ b/noncore/multimedia/opierec/device.cpp | |||
@@ -74,9 +74,13 @@ qDebug( "Opening %s",dspstr); | |||
74 | } | 74 | } |
75 | 75 | ||
76 | qDebug( "Opening mixer" ); | 76 | qDebug( "Opening mixer" ); |
77 | int mixerHandle=0; | 77 | int mixerHandle=0; |
78 | #ifdef QT_QWS_DEVFS | ||
79 | if (( mixerHandle = open("/dev/sound/mixer",O_RDWR))<0) { | ||
80 | #else | ||
78 | if (( mixerHandle = open("/dev/mixer",O_RDWR))<0) { | 81 | if (( mixerHandle = open("/dev/mixer",O_RDWR))<0) { |
82 | #endif | ||
79 | perror("open(\"/dev/mixer\")"); | 83 | perror("open(\"/dev/mixer\")"); |
80 | QString errorMsg="Could not open audio device\n /dev/dsp\n" | 84 | QString errorMsg="Could not open audio device\n /dev/dsp\n" |
81 | +(QString)strerror(errno); | 85 | +(QString)strerror(errno); |
82 | qDebug( "XXXXXXXXXXXXXXXXXXXXXX "+errorMsg ); | 86 | qDebug( "XXXXXXXXXXXXXXXXXXXXXX "+errorMsg ); |
@@ -167,9 +171,13 @@ int Device::getInVolume() { | |||
167 | 171 | ||
168 | void Device::changedOutVolume(int vol) { | 172 | void Device::changedOutVolume(int vol) { |
169 | int level = (vol << 8) + vol; | 173 | int level = (vol << 8) + vol; |
170 | int fd = 0; | 174 | int fd = 0; |
175 | #ifdef QT_QWS_DEVFS | ||
176 | if ((fd = open("/dev/sound/mixer", O_RDWR))>=0) { | ||
177 | #else | ||
171 | if ((fd = open("/dev/mixer", O_RDWR))>=0) { | 178 | if ((fd = open("/dev/mixer", O_RDWR))>=0) { |
179 | #endif | ||
172 | if(ioctl(fd, MIXER_WRITE(SOUND_MIXER_VOLUME), &level) == -1) | 180 | if(ioctl(fd, MIXER_WRITE(SOUND_MIXER_VOLUME), &level) == -1) |
173 | perror("ioctl(\"MIXER_IN_WRITE\")"); | 181 | perror("ioctl(\"MIXER_IN_WRITE\")"); |
174 | 182 | ||
175 | Config cfg("qpe"); | 183 | Config cfg("qpe"); |
@@ -183,9 +191,13 @@ void Device::changedOutVolume(int vol) { | |||
183 | 191 | ||
184 | void Device::changedInVolume(int vol ) { | 192 | void Device::changedInVolume(int vol ) { |
185 | int level = (vol << 8) + vol; | 193 | int level = (vol << 8) + vol; |
186 | int fd = 0; | 194 | int fd = 0; |
195 | #ifdef QT_QWS_DEVFS | ||
196 | if ((fd = open("/dev/sound/mixer", O_RDWR))>=0) { | ||
197 | #else | ||
187 | if ((fd = open("/dev/mixer", O_RDWR))>=0) { | 198 | if ((fd = open("/dev/mixer", O_RDWR))>=0) { |
199 | #endif | ||
188 | if(ioctl(fd, MIXER_WRITE(SOUND_MIXER_MIC), &level) == -1) | 200 | if(ioctl(fd, MIXER_WRITE(SOUND_MIXER_MIC), &level) == -1) |
189 | perror("ioctl(\"MIXER_IN_WRITE\")"); | 201 | perror("ioctl(\"MIXER_IN_WRITE\")"); |
190 | Config cfg("qpe"); | 202 | Config cfg("qpe"); |
191 | cfg.setGroup("Volume"); | 203 | cfg.setGroup("Volume"); |
@@ -199,9 +211,13 @@ void Device::changedInVolume(int vol ) { | |||
199 | bool Device::selectMicInput() { | 211 | bool Device::selectMicInput() { |
200 | 212 | ||
201 | int md=0; | 213 | int md=0; |
202 | int info=MIXER_WRITE(SOUND_MIXER_MIC); | 214 | int info=MIXER_WRITE(SOUND_MIXER_MIC); |
215 | #ifdef QT_QWS_DEVFS | ||
216 | md = ::open( "/dev/sound/mixer", O_RDWR ); | ||
217 | #else | ||
203 | md = ::open( "/dev/mixer", O_RDWR ); | 218 | md = ::open( "/dev/mixer", O_RDWR ); |
219 | #endif | ||
204 | if ( md == -1) | 220 | if ( md == -1) |
205 | perror("open(\"/dev/mixer\")"); | 221 | perror("open(\"/dev/mixer\")"); |
206 | else { | 222 | else { |
207 | if( ioctl( md, SOUND_MIXER_WRITE_RECSRC, &info) == -1) | 223 | if( ioctl( md, SOUND_MIXER_WRITE_RECSRC, &info) == -1) |
diff --git a/noncore/multimedia/opierec/qtrec.cpp b/noncore/multimedia/opierec/qtrec.cpp index 1141faa..c237726 100644 --- a/noncore/multimedia/opierec/qtrec.cpp +++ b/noncore/multimedia/opierec/qtrec.cpp | |||
@@ -78,12 +78,19 @@ static int deviceBitRates[] = { 8, 16, -1 }; | |||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #else | 80 | #else |
81 | 81 | ||
82 | #ifdef QT_QWS_DEVFS | ||
83 | #define DSPSTROUT "/dev/sound/dsp" | ||
84 | #define DSPSTRIN "/dev/sound/dsp" | ||
85 | #define DSPSTRMIXERIN "/dev/sound/mixer" | ||
86 | #define DSPSTRMIXEROUT "/dev/sound/mixer" | ||
87 | #else | ||
82 | #define DSPSTROUT "/dev/dsp" | 88 | #define DSPSTROUT "/dev/dsp" |
83 | #define DSPSTRIN "/dev/dsp" | 89 | #define DSPSTRIN "/dev/dsp" |
84 | #define DSPSTRMIXERIN "/dev/mixer" | 90 | #define DSPSTRMIXERIN "/dev/mixer" |
85 | #define DSPSTRMIXEROUT "/dev/mixer" | 91 | #define DSPSTRMIXEROUT "/dev/mixer" |
92 | #endif | ||
86 | 93 | ||
87 | #endif | 94 | #endif |
88 | 95 | ||
89 | //#define ZAURUS 0 | 96 | //#define ZAURUS 0 |