summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_htc.cpp
Unidiff
Diffstat (limited to 'libopie2/opiecore/device/odevice_htc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_htc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_htc.cpp b/libopie2/opiecore/device/odevice_htc.cpp
index 44b33c0..7f82369 100644
--- a/libopie2/opiecore/device/odevice_htc.cpp
+++ b/libopie2/opiecore/device/odevice_htc.cpp
@@ -297,25 +297,27 @@ void HTC::buzzer( int sound )
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/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 if (::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ) == -1)
310 qWarning( "HTC::buzzer() - Couldn't make the buzzer buzz (%s)",
311 strerror( errno ) );
310 ::close ( fd ); 312 ::close ( fd );
311 } 313 }
312 314
313 } 315 }
314#endif 316#endif
315} 317}
316 318
317 319
318void HTC::playAlarmSound() 320void HTC::playAlarmSound()
319{ 321{
320 buzzer( SHARP_BUZ_SCHEDULE_ALARM ); 322 buzzer( SHARP_BUZ_SCHEDULE_ALARM );
321} 323}