SOURCES: FusionSound-git.patch (NEW) - DirectFB -> libdirect updates from git
qboosh
qboosh at pld-linux.org
Wed Sep 3 23:39:22 CEST 2008
Author: qboosh Date: Wed Sep 3 21:39:22 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- DirectFB -> libdirect updates from git
---- Files affected:
SOURCES:
FusionSound-git.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/FusionSound-git.patch
diff -u /dev/null SOURCES/FusionSound-git.patch:1.1
--- /dev/null Wed Sep 3 23:39:23 2008
+++ SOURCES/FusionSound-git.patch Wed Sep 3 23:39:17 2008
@@ -0,0 +1,11024 @@
+From: Denis Oliver Kropp <dok at shizo.directfb.home>
+Date: Thu, 28 Feb 2008 13:56:34 +0000 (+0100)
+Subject: [fusionsound] Follow API changes, removing remaining dependencies on <directfb.h>.
+X-Git-Url: http://git.directfb.org/?p=core%2FFusionSound.git;a=commitdiff_plain;h=3195b24014b5678b934db021a6958fcae9c09bb9
+
+[fusionsound] Follow API changes, removing remaining dependencies on <directfb.h>.
+---
+
+diff --git a/drivers/alsa.c b/drivers/alsa.c
+index 6b685d7..53c35a8 100644
+--- a/drivers/alsa.c
++++ b/drivers/alsa.c
+@@ -108,7 +108,7 @@ alsa_device_get_devname( const CoreSoundDeviceConfig *config )
+ return "default";
+ }
+
+-static DFBResult
++static DirectResult
+ alsa_device_set_configuration( snd_pcm_t *handle,
+ CoreSoundDeviceConfig *config )
+ {
+@@ -124,7 +124,7 @@ alsa_device_set_configuration( snd_pcm_t *handle,
+
+ if (snd_pcm_hw_params_any( handle, params ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't get hw params!\n" );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+
+ if (snd_pcm_hw_params_set_access( handle, params,
+@@ -133,19 +133,19 @@ alsa_device_set_configuration( snd_pcm_t *handle,
+ : SND_PCM_ACCESS_RW_INTERLEAVED ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't set interleaved %saccess!\n",
+ fs_config->dma ? "DMA " : "" );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+
+ if (snd_pcm_hw_params_set_format( handle, params,
+ fs2alsa_format( config->format ) ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't set format!\n" );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ if (snd_pcm_hw_params_set_channels( handle, params,
+ FS_CHANNELS_FOR_MODE(config->mode) ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't set channels mode!\n" );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ #if SND_LIB_VERSION >= 0x010009
+@@ -157,14 +157,14 @@ alsa_device_set_configuration( snd_pcm_t *handle,
+ if (snd_pcm_hw_params_set_rate_near( handle, params,
+ &config->rate, &dir ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't set rate!\n" );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ dir = 0;
+ if (snd_pcm_hw_params_set_buffer_time_near( handle, params,
+ &buffertime, &dir ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't set buffertime!\n" );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ dir = 1;
+@@ -172,12 +172,12 @@ alsa_device_set_configuration( snd_pcm_t *handle,
+ if (snd_pcm_hw_params_set_periods_near( handle, params,
+ &periods, &dir ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't set period count!\n" );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ if (snd_pcm_hw_params( handle, params ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't set hw params!\n" );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ /* Workaround for ALSA >= 1.0.9 always returning the maximum supported buffersize. */
+@@ -191,37 +191,37 @@ alsa_device_set_configuration( snd_pcm_t *handle,
+
+ if (snd_pcm_prepare( handle ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't prepare stream!\n" );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+-static DFBResult
++static DirectResult
+ alsa_device_getset_volume( float *get, float *set )
+ {
+- DFBResult ret = DFB_OK;
++ DirectResult ret = DR_OK;
+ snd_mixer_t *mixer;
+ snd_mixer_selem_id_t *sid;
+ snd_mixer_elem_t *elem;
+ long vol, min, max;
+
+ if (snd_mixer_open( &mixer, 0 ) < 0)
+- return DFB_IO;
++ return DR_IO;
+
+ if (snd_mixer_attach( mixer, fs_config->device ? : "default" ) < 0) {
+ snd_mixer_close( mixer );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+
+ if (snd_mixer_selem_register( mixer, NULL, NULL ) < 0) {
+ snd_mixer_close( mixer );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+
+ if (snd_mixer_load( mixer ) < 0) {
+ snd_mixer_close( mixer );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+
+ snd_mixer_selem_id_malloc( &sid );
+@@ -230,7 +230,7 @@ alsa_device_getset_volume( float *get, float *set )
+ elem = snd_mixer_find_selem( mixer, sid );
+ if (!elem) {
+ snd_mixer_close( mixer );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ snd_mixer_selem_get_playback_volume_range( elem, &min, &max );
+@@ -239,12 +239,12 @@ alsa_device_getset_volume( float *get, float *set )
+ vol = *set * (float)(max - min) + min;
+
+ if (snd_mixer_selem_set_playback_volume_all( elem, vol ) < 0)
+- ret = DFB_UNSUPPORTED;
++ ret = DR_UNSUPPORTED;
+ }
+ else {
+ /* Assume equal level for all channels */
+ if (snd_mixer_selem_get_playback_volume( elem, 0, &vol ) < 0)
+- ret = DFB_UNSUPPORTED;
++ ret = DR_UNSUPPORTED;
+ else
+ *get = (float)(vol - min) / (float)(max - min);
+ }
+@@ -257,7 +257,7 @@ alsa_device_getset_volume( float *get, float *set )
+ /******************************************************************************/
+
+
+-static DFBResult
++static DirectResult
+ device_probe( void )
+ {
+ snd_pcm_t *handle;
+@@ -265,10 +265,10 @@ device_probe( void )
+ if (snd_pcm_open( &handle, fs_config->device ? : "default",
+ SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK ) == 0) {
+ snd_pcm_close( handle );
+- return DFB_OK;
++ return DR_OK;
+ }
+
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ static void
+@@ -296,7 +296,7 @@ device_get_driver_info( SoundDriverInfo *info )
+ info->device_data_size = sizeof(AlsaDeviceData);
+ }
+
+-static DFBResult
++static DirectResult
+ device_open( void *device_data,
+ SoundDeviceInfo *device_info,
+ CoreSoundDeviceConfig *config )
+@@ -305,18 +305,18 @@ device_open( void *device_data,
+ const char *dev;
+ snd_ctl_t *ctl;
+ snd_ctl_card_info_t *info;
+- DFBResult ret;
++ DirectResult ret;
+
+ dev = fs_config->device ? : alsa_device_get_devname( config );
+
+ if (snd_pcm_open( &data->handle, dev, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't open pcm device '%s'!\n", dev );
+- return DFB_IO;
++ return DR_IO;
+ }
+
+ if (snd_pcm_nonblock( data->handle, 0 ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't disable non-blocking mode!\n" );
+- return DFB_IO;
++ return DR_IO;
+ }
+
+ /* device name */
+@@ -357,7 +357,7 @@ device_open( void *device_data,
+ D_INFO( "FusionSound/Device/ALSA: DMA enabled.\n" );
+ }
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+ static int
+@@ -382,7 +382,7 @@ try_recover( snd_pcm_t *handle, int err )
+ return err;
+ }
+
+-static DFBResult
++static DirectResult
+ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail )
+ {
+ AlsaDeviceData *data = device_data;
+@@ -403,7 +403,7 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail )
+ if (r < 0) {
+ D_ERROR( "FusionSound/Device/ALSA: snd_pcm_avail_update() failed: %s\n",
+ snd_strerror( r ) );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+ continue;
+ }
+@@ -417,7 +417,7 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail )
+ if (r < 0) {
+ D_ERROR( "FusionSound/Device/ALSA: snd_pcm_avail_update() failed: %s\n",
+ snd_strerror( r ) );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+ continue;
+ }
+@@ -429,7 +429,7 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail )
+ if (r < 0) {
+ D_ERROR( "FusionSound/Device/ALSA: snd_pcm_mmap_begin() failed: %s\n",
+ snd_strerror( r ) );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+ continue;
+ }
+@@ -441,10 +441,10 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail )
+ }
+ }
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+-static DFBResult
++static DirectResult
+ device_commit_buffer( void *device_data, unsigned int frames )
+ {
+ AlsaDeviceData *data = device_data;
+@@ -460,7 +460,7 @@ device_commit_buffer( void *device_data, unsigned int frames )
+ if (r < 0) {
+ D_ERROR( "FusionSound/Device/ALSA: snd_pcm_writei() failed: %s\n",
+ snd_strerror( r ) );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+ }
+ frames -= r;
+@@ -475,7 +475,7 @@ device_commit_buffer( void *device_data, unsigned int frames )
+ if (r < 0) {
+ D_ERROR( "FusionSound/Device/ALSA: snd_pcm_mmap_commit() failed: %s\n",
+ snd_strerror( r ) );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+ continue;
+ }
+@@ -483,7 +483,7 @@ device_commit_buffer( void *device_data, unsigned int frames )
+ }
+ }
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+ static void
+@@ -496,19 +496,19 @@ device_get_output_delay( void *device_data, int *delay )
+ *delay = odelay;
+ }
+
+-static DFBResult
++static DirectResult
+ device_get_volume( void *device_data, float *level )
+ {
+ return alsa_device_getset_volume( level, NULL );
+ }
+
+-static DFBResult
++static DirectResult
+ device_set_volume( void *device_data, float level )
+ {
+ return alsa_device_getset_volume( NULL, &level );
+ }
+
+-static DFBResult
++static DirectResult
+ device_suspend( void *device_data )
+ {
+ AlsaDeviceData *data = device_data;
+@@ -517,21 +517,21 @@ device_suspend( void *device_data )
+ snd_pcm_close( data->handle );
+ data->handle = NULL;
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+-static DFBResult
++static DirectResult
+ device_resume( void *device_data )
+ {
+ AlsaDeviceData *data = device_data;
+ const char *dev;
+- DFBResult ret;
++ DirectResult ret;
+
+ dev = fs_config->device ? : alsa_device_get_devname( data->config );
+
+ if (snd_pcm_open( &data->handle, dev, SND_PCM_STREAM_PLAYBACK, 0 ) < 0) {
+ D_ERROR( "FusionSound/Device/Alsa: couldn't reopen pcm device '%s'!\n", dev );
+- return DFB_IO;
++ return DR_IO;
+ }
+
+ ret = alsa_device_set_configuration( data->handle, data->config );
+diff --git a/drivers/oss.c b/drivers/oss.c
+index 9e9ce8d..9b3b16e 100644
+--- a/drivers/oss.c
++++ b/drivers/oss.c
+@@ -124,7 +124,7 @@ oss2fs_format( int format )
+ return -1;
+ }
+
+-static DFBResult
++static DirectResult
+ oss_device_set_configuration( int fd, CoreSoundDeviceConfig *config )
+ {
+ int fmt;
+@@ -137,7 +137,7 @@ oss_device_set_configuration( int fd, CoreSoundDeviceConfig *config )
+
+ fmt = fs2oss_format( config->format );
+ if (fmt == -1)
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+
+ /* set application profile */
+ #if defined(SNDCTL_DSP_PROFILE) && defined(APF_NORMAL)
+@@ -149,20 +149,20 @@ oss_device_set_configuration( int fd, CoreSoundDeviceConfig *config )
+ if (ioctl( fd, SNDCTL_DSP_SETFMT, &fmt ) < 0 ||
+ oss2fs_format( fmt ) != config->format) {
+ D_ERROR( "FusionSound/Device/OSS: unsupported format!\n" );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ /* set number of channels */
+ if (ioctl( fd, SNDCTL_DSP_CHANNELS, &channels ) < 0 ||
+ channels != FS_CHANNELS_FOR_MODE(config->mode)) {
+ D_ERROR( "FusionSound/Device/OSS: unsupported channels mode!\n" );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ /* set sample rate */
+ if (ioctl( fd, SNDCTL_DSP_SPEED, &rate ) < 0) {
+ D_ERROR( "FusionSound/Device/OSS: unable to set rate to '%d'!\n", config->rate );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ /* query block size */
+@@ -170,18 +170,18 @@ oss_device_set_configuration( int fd, CoreSoundDeviceConfig *config )
+ buffersize /= channels * FS_BYTES_PER_SAMPLE(config->format);
+ if (buffersize < 1) {
+ D_ERROR( "FusionSound/Device/OSS: unable to query block size!\n" );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ config->rate = rate;
+ config->buffersize = buffersize;
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+ /******************************************************************************/
+
+-static DFBResult
++static DirectResult
+ device_probe( void )
+ {
+ int fd, fmt;
+@@ -195,17 +195,17 @@ device_probe( void )
+ }
+
+ if (fd < 0)
+- return DFB_IO;
++ return DR_IO;
+
+ /* issue a generic ioctl to test the device */
+ if (ioctl( fd, SNDCTL_DSP_GETFMTS, &fmt ) < 0) {
+ close( fd );
+- return DFB_UNSUPPORTED;
++ return DR_UNSUPPORTED;
+ }
+
+ close( fd );
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+ static void
+@@ -233,7 +233,7 @@ device_get_driver_info( SoundDriverInfo *info )
+ info->device_data_size = sizeof(OSSDeviceData);
+ }
+
+-static DFBResult
++static DirectResult
+ device_open( void *device_data,
+ SoundDeviceInfo *device_info,
+ CoreSoundDeviceConfig *config )
+@@ -241,7 +241,7 @@ device_open( void *device_data,
+ OSSDeviceData *data = device_data;
+ int mixer_fd;
+ audio_buf_info info;
+- DFBResult ret;
++ DirectResult ret;
+
+ /* open sound device in non-blocking mode */
+ if (fs_config->device) {
+@@ -254,7 +254,7 @@ device_open( void *device_data,
+
+ if (data->fd < 0) {
+ D_ERROR( "FusionSound/Device/OSS: Couldn't open output device!\n" );
+- return DFB_IO;
++ return DR_IO;
+ }
+
+ /* reset to blocking mode */
+@@ -303,10 +303,10 @@ device_open( void *device_data,
+ close( mixer_fd );
+ }
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+-static DFBResult
++static DirectResult
+ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail )
+ {
+ OSSDeviceData *data = device_data;
+@@ -314,21 +314,21 @@ device_get_buffer( void *device_data, u8 **addr, unsigned int *avail )
+ *addr = data->buffer;
+ *avail = data->config->buffersize;
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+-static DFBResult
++static DirectResult
+ device_commit_buffer( void *device_data, unsigned int frames )
+ {
+ OSSDeviceData *data = device_data;
+
+ if (write( data->fd, data->buffer, frames*data->bytes_per_frame ) < 0) {
+- DFBResult ret = errno2result( errno );
++ DirectResult ret = errno2result( errno );
+ D_DERROR( ret, "FusionSound/Device/OSS: couldn't write %d frames!\n", frames );
+ return ret;
+ }
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+ static void
+@@ -346,7 +346,7 @@ device_get_output_delay( void *device_data, int *delay )
+ *delay = (info.fragsize * info.fragstotal - info.bytes) / data->bytes_per_frame;
+ }
+
+-static DFBResult
++static DirectResult
+ device_get_volume( void *device_data, float *level )
+ {
+ int fd;
+@@ -354,22 +354,22 @@ device_get_volume( void *device_data, float *level )
+
+ fd = direct_try_open( "/dev/mixer", "/dev/sound/mixer", O_RDONLY, false );
+ if (fd < 0)
+- return DFB_IO;
++ return DR_IO;
+
+ if (ioctl( fd, SOUND_MIXER_READ_PCM, &vol ) < 0) {
+ D_PERROR( "FusionSound/Device/OSS: couldn't get volume level!\n" );
+ close( fd );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+
+ close( fd );
+
+ *level = (float)((vol & 0xff) + ((vol >> 8) & 0xff)) / 200.0f;
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+-static DFBResult
++static DirectResult
+ device_set_volume( void *device_data, float level )
+ {
+ int fd;
+@@ -377,22 +377,22 @@ device_set_volume( void *device_data, float level )
+
+ fd = direct_try_open( "/dev/mixer", "/dev/sound/mixer", O_RDONLY, false );
+ if (fd < 0)
+- return DFB_IO;
++ return DR_IO;
+
+ vol = level * 100.0f;
+ vol |= vol << 8;
+ if (ioctl( fd, SOUND_MIXER_WRITE_PCM, &vol ) < 0) {
+ D_PERROR( "FusionSound/Device/OSS: couldn't set volume level!\n" );
+ close( fd );
+- return DFB_FAILURE;
++ return DR_FAILURE;
+ }
+
+ close( fd );
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+-static DFBResult
++static DirectResult
+ device_suspend( void *device_data )
+ {
+ OSSDeviceData *data = device_data;
+@@ -401,21 +401,21 @@ device_suspend( void *device_data )
+ close( data->fd );
+ data->fd = -1;
+
+- return DFB_OK;
++ return DR_OK;
+ }
+
+-static DFBResult
++static DirectResult
+ device_resume( void *device_data )
+ {
+ OSSDeviceData *data = device_data;
+- DFBResult ret;
++ DirectResult ret;
+
+ data->fd = (fs_config->device)
+ ? open( fs_config->device, O_WRONLY )
+ : direct_try_open( "/dev/dsp", "/dev/sound/dsp", O_WRONLY, false );
+ if (data->fd < 0) {
+ D_ERROR( "FusionSound/Device/OSS: Couldn't reopen output device!\n" );
+- return DFB_IO;
++ return DR_IO;
+ }
+
+ ret = oss_device_set_configuration( data->fd, data->config );
+@@ -427,7 +427,7 @@ device_resume( void *device_data )
+
+ fcntl( data->fd, F_SETFD, FD_CLOEXEC );
+
+- return DFB_OK;
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list