summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/device/odevice_zaurus.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/device/odevice_zaurus.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp
index 9d2ebbb..f978355 100644
--- a/libopie2/opiecore/device/odevice_zaurus.cpp
+++ b/libopie2/opiecore/device/odevice_zaurus.cpp
@@ -351,65 +351,67 @@ void Zaurus::buzzer( int sound )
&& d->m_model != Model_Zaurus_SL5500 ) {
switch ( sound ){
case SHARP_BUZ_TOUCHSOUND: {
static Sound touch_sound("touchsound");
snd = &touch_sound;
}
break;
case SHARP_BUZ_KEYSOUND: {
static Sound key_sound( "keysound" );
snd = &key_sound;
}
break;
case SHARP_BUZ_SCHEDULE_ALARM:
default: {
static Sound alarm_sound("alarm");
snd = &alarm_sound;
}
break;
}
}
// If a soundname is defined, we expect that this device has
// sound capabilities.. Otherwise we expect to have the buzzer
// device..
if ( snd && snd->isFinished() ){
changeMixerForAlarm( 0, "/dev/sound/mixer", snd );
snd->play();
} else if( !snd ) {
int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK );
if ( fd >= 0 ) {
- ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound );
+ if (::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ) == -1)
+ qWarning( "HTC::buzzer() - Couldn't make the buzzer buzz (%s)",
+ strerror( errno ) );
::close ( fd );
}
}
#endif
}
void Zaurus::playAlarmSound()
{
buzzer( SHARP_BUZ_SCHEDULE_ALARM );
}
void Zaurus::playTouchSound()
{
buzzer( SHARP_BUZ_TOUCHSOUND );
}
void Zaurus::playKeySound()
{
buzzer( SHARP_BUZ_KEYSOUND );
}
QValueList <OLed> Zaurus::ledList() const
{
QValueList <OLed> vl;
vl << Led_Mail;
return vl;
}
QValueList <OLedState> Zaurus::ledStateList( OLed l ) const