summaryrefslogtreecommitdiff
authorerik <erik>2007-02-08 21:33:21 (UTC)
committer erik <erik>2007-02-08 21:33:21 (UTC)
commit63f64a9733d5504bb04d5f06cdf52b42a4b8006c (patch) (unidiff)
tree7101166c3fac37e2ff1fd1ce3b52bb61b9f618c9
parent41dce553a418765d5075fc249c636104a2a82329 (diff)
downloadopie-63f64a9733d5504bb04d5f06cdf52b42a4b8006c.zip
opie-63f64a9733d5504bb04d5f06cdf52b42a4b8006c.tar.gz
opie-63f64a9733d5504bb04d5f06cdf52b42a4b8006c.tar.bz2
Commit of GoXbox Live HTC Universal patch. This should make backlight
work with current kernel versions. It also changes the mixer name to the rightful name for most modern kernels. It is rumored that the mixer in most HTC devices does not work. But at least it points at the right device now. Thanks GoXbox Live!
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_htc.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp
index 4e5200b..a6ade11 100644
--- a/libopie2/opiecore/device/odevice_htc.cpp
+++ b/libopie2/opiecore/device/odevice_htc.cpp
@@ -177,32 +177,32 @@ void HTC::init(const QString& cpu_info)
177 d->m_modelstr = "HTC Magician"; 177 d->m_modelstr = "HTC Magician";
178 } 178 }
179 179
180 180
181 // set path to backlight device 181 // set path to backlight device
182 switch ( d->m_model ) 182 switch ( d->m_model )
183 { 183 {
184 case Model_HTC_Universal: 184 case Model_HTC_Universal:
185 case Model_HTC_Magician: 185 case Model_HTC_Magician:
186 case Model_HTC_Alpine: 186 case Model_HTC_Alpine:
187 case Model_HTC_Beetles: 187 case Model_HTC_Beetles:
188 case Model_HTC_Apache: 188 case Model_HTC_Apache:
189 m_backlightdev = "/sys/class/backlight/pxa2xx-fb/"; 189 m_backlightdev = "/sys/class/backlight/corgi-bl/";
190 break; 190 break;
191 case Model_HTC_Blueangel: 191 case Model_HTC_Blueangel:
192 case Model_HTC_Himalaya: 192 case Model_HTC_Himalaya:
193 m_backlightdev = "/sys/class/backlight/w100fb/"; 193 m_backlightdev = "/sys/class/backlight/w100fb/";
194 break; 194 break;
195 default: 195 default:
196 m_backlightdev = "/sys/class/backlight/pxafb/"; 196 m_backlightdev = "/sys/class/backlight/corgi-bl/";
197 } 197 }
198 198
199 // set initial rotation 199 // set initial rotation
200 switch( d->m_model ) 200 switch( d->m_model )
201 { 201 {
202 case Model_HTC_Universal: 202 case Model_HTC_Universal:
203 initHingeSensor(); 203 initHingeSensor();
204 d->m_rotation = rotation(); 204 d->m_rotation = rotation();
205 d->m_direction = direction(); 205 d->m_direction = direction();
206 break; 206 break;
207 default: 207 default:
208 d->m_rotation = Rot270; 208 d->m_rotation = Rot270;
@@ -291,25 +291,25 @@ void HTC::buzzer( int sound )
291 default: { 291 default: {
292 static Sound alarm_sound("alarm"); 292 static Sound alarm_sound("alarm");
293 snd = &alarm_sound; 293 snd = &alarm_sound;
294 } 294 }
295 break; 295 break;
296 } 296 }
297 } 297 }
298 298
299 // If a soundname is defined, we expect that this device has 299 // If a soundname is defined, we expect that this device has
300 // sound capabilities.. Otherwise we expect to have the buzzer 300 // sound capabilities.. Otherwise we expect to have the buzzer
301 // device.. 301 // device..
302 if ( snd && snd->isFinished() ){ 302 if ( snd && snd->isFinished() ){
303 changeMixerForAlarm( 0, "/dev/sound/mixer", snd ); 303 changeMixerForAlarm( 0, "/dev/mixer", snd );
304 snd->play(); 304 snd->play();
305 } else if( !snd ) { 305 } else if( !snd ) {
306 int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); 306 int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK );
307 307
308 if ( fd >= 0 ) { 308 if ( fd >= 0 ) {
309 ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); 309 ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound );
310 ::close ( fd ); 310 ::close ( fd );
311 } 311 }
312 312
313 } 313 }
314#endif 314#endif
315} 315}