Hello community, here is the log from the commit of package alsa checked in at Wed Oct 22 17:31:19 CEST 2008. -------- --- alsa/alsa.changes 2008-09-10 17:57:29.000000000 +0200 +++ /mounts/work_src_done/STABLE/alsa/alsa.changes 2008-10-20 11:31:40.000000000 +0200 @@ -1,0 +2,13 @@ +Mon Oct 20 11:29:49 CEST 2008 - tiwai@suse.de + +- add missing iec958 PCM definition for PS3 (bnc#436845) +- fix the bug in device listing (don't show non-existing devices) +- fix some typos in API document +- remove dangerous assert() calls in card control routines + +------------------------------------------------------------------- +Wed Oct 15 09:03:01 CEST 2008 - tiwai@suse.de + +- added missing semicolons in init scripts (bnc#435504, bnc#435515) + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- alsa-lib-git-fixes.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alsa.spec ++++++ --- /var/tmp/diff_new_pack.Q19380/_old 2008-10-22 17:30:52.000000000 +0200 +++ /var/tmp/diff_new_pack.Q19380/_new 2008-10-22 17:30:52.000000000 +0200 @@ -29,7 +29,7 @@ AutoReqProv: on Summary: Advanced Linux Sound Architecture Version: 1.0.18 -Release: 1 +Release: 4 Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2 Source8: 40-alsa.rules Source11: alsasound @@ -45,7 +45,7 @@ Source32: all_notes_off.mid Source33: alsa-info.sh Source34: alsa-init.sh -# Patch: alsa-lib-git-fixes.diff +Patch: alsa-lib-git-fixes.diff Url: http://www.alsa-project.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -117,7 +117,7 @@ %prep %setup -q -n alsa-lib-%{package_version} -# %patch -p1 +%patch -p1 %build # build alsa-lib @@ -239,6 +239,13 @@ %{_datadir}/alsa %changelog +* Mon Oct 20 2008 tiwai@suse.de +- add missing iec958 PCM definition for PS3 (bnc#436845) +- fix the bug in device listing (don't show non-existing devices) +- fix some typos in API document +- remove dangerous assert() calls in card control routines +* Wed Oct 15 2008 tiwai@suse.de +- added missing semicolons in init scripts (bnc#435504, bnc#435515) * Wed Sep 10 2008 tiwai@suse.de - updated to version 1.0.18rc3: * fix the access type handling in softvol plugin ++++++ alsa-lib-git-fixes.diff ++++++ diff --git a/include/sound/asound.h b/include/sound/asound.h index e5fbea4..977b2d6 100644 --- a/include/sound/asound.h +++ b/include/sound/asound.h @@ -725,7 +725,7 @@ struct sndrv_timer_tread { * * ****************************************************************************/ -#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 5) +#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6) struct sndrv_ctl_card_info { int card; /* card number */ @@ -736,8 +736,7 @@ struct sndrv_ctl_card_info { unsigned char longname[80]; /* name + info text about soundcard */ unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */ unsigned char mixername[80]; /* visual mixer identification */ - unsigned char components[80]; /* card components / fine identification, delimited with one space (AC97 etc..) */ - unsigned char reserved[48]; /* reserved for future */ + unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */ }; enum sndrv_ctl_elem_type { diff --git a/src/conf/cards/PS3.conf b/src/conf/cards/PS3.conf index b7e30ff..b642f0d 100644 --- a/src/conf/cards/PS3.conf +++ b/src/conf/cards/PS3.conf @@ -44,3 +44,42 @@ PS3.pcm.default { } } } + +confdir:pcm/iec958.conf + +PS3.pcm.iec958.0 { + @args [ CARD AES0 AES1 AES2 AES3 ] + @args.CARD { + type string + } + @args.AES0 { + type integer + } + @args.AES1 { + type integer + } + @args.AES2 { + type integer + } + @args.AES3 { + type integer + } + type hooks + slave.pcm { + type hw + card $CARD + } + hooks.0 { + type ctl_elems + hook_args [ + { + interface PCM + name "IEC958 Playback Default" + lock true + preserve true + optional true + value [ $AES0 $AES1 $AES2 $AES3 ] + } + ] + } +} diff --git a/src/control/control_hw.c b/src/control/control_hw.c index 7180ead..aeb2c23 100644 --- a/src/control/control_hw.c +++ b/src/control/control_hw.c @@ -116,7 +116,7 @@ static int snd_ctl_hw_subscribe_events(snd_ctl_t *handle, int subscribe) SYSERR("SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS failed"); return -errno; } - return subscribe; + return 0; } static int snd_ctl_hw_card_info(snd_ctl_t *handle, snd_ctl_card_info_t *info) @@ -324,7 +324,11 @@ static int snd_ctl_hw_read(snd_ctl_t *handle, snd_ctl_event_t *event) ssize_t res = read(hw->fd, event, sizeof(*event)); if (res <= 0) return -errno; - assert(res == sizeof(*event)); + if (CHECK_SANITY(res != sizeof(*event))) { + SNDMSG("snd_ctl_hw_read: read size error (req:%d, got:%d)\n", + sizeof(*event), res); + return -EINVAL; + } return 1; } @@ -368,7 +372,10 @@ int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode) *handle = NULL; - assert(card >= 0 && card < 32); + if (CHECK_SANITY(card < 0 || card >= 32)) { + SNDMSG("Invalid card index %d", card); + return -EINVAL; + } sprintf(filename, SNDRV_FILE_CONTROL, card); if (mode & SND_CTL_READONLY) fmode = O_RDONLY; diff --git a/src/control/namehint.c b/src/control/namehint.c index b526ad5..8bf739b 100644 --- a/src/control/namehint.c +++ b/src/control/namehint.c @@ -84,10 +84,11 @@ static void zero_handler(const char *file ATTRIBUTE_UNUSED, { } -static int get_dev_name1(struct hint_list *list, char **res) +static int get_dev_name1(struct hint_list *list, char **res, int device, + int stream) { *res = NULL; - if (list->device < 0) + if (device < 0) return 0; switch (list->iface) { #ifdef BUILD_HWDEP @@ -95,7 +96,7 @@ static int get_dev_name1(struct hint_list *list, char **res) { snd_hwdep_info_t *info; snd_hwdep_info_alloca(&info); - snd_hwdep_info_set_device(info, list->device); + snd_hwdep_info_set_device(info, device); if (snd_ctl_hwdep_info(list->ctl, info) < 0) return 0; *res = strdup(snd_hwdep_info_get_name(info)); @@ -107,8 +108,8 @@ static int get_dev_name1(struct hint_list *list, char **res) { snd_pcm_info_t *info; snd_pcm_info_alloca(&info); - snd_pcm_info_set_device(info, list->device); - snd_pcm_info_set_stream(info, list->stream ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK); + snd_pcm_info_set_device(info, device); + snd_pcm_info_set_stream(info, stream ? SND_PCM_STREAM_CAPTURE : SND_PCM_STREAM_PLAYBACK); if (snd_ctl_pcm_info(list->ctl, info) < 0) return 0; switch (snd_pcm_info_get_class(info)) { @@ -127,8 +128,8 @@ static int get_dev_name1(struct hint_list *list, char **res) { snd_rawmidi_info_t *info; snd_rawmidi_info_alloca(&info); - snd_rawmidi_info_set_device(info, list->device); - snd_rawmidi_info_set_stream(info, list->stream ? SND_RAWMIDI_STREAM_INPUT : SND_RAWMIDI_STREAM_OUTPUT); + snd_rawmidi_info_set_device(info, device); + snd_rawmidi_info_set_stream(info, stream ? SND_RAWMIDI_STREAM_INPUT : SND_RAWMIDI_STREAM_OUTPUT); if (snd_ctl_rawmidi_info(list->ctl, info) < 0) return 0; *res = strdup(snd_rawmidi_info_get_name(info)); @@ -143,14 +144,13 @@ static int get_dev_name1(struct hint_list *list, char **res) static char *get_dev_name(struct hint_list *list) { char *str1, *str2, *res; + int device; - list->device = list->device_input >= 0 ? list->device_input : list->device; - list->stream = 1; - if (get_dev_name1(list, &str1) < 0) + device = list->device_input >= 0 ? list->device_input : list->device; + if (get_dev_name1(list, &str1, device, 1) < 0) return NULL; - list->device = list->device_output >= 0 ? list->device_input : list->device; - list->stream = 0; - if (get_dev_name1(list, &str2) < 0) { + device = list->device_output >= 0 ? list->device_output : list->device; + if (get_dev_name1(list, &str2, device, 0) < 0) { if (str1) free(str1); return NULL; @@ -199,7 +199,7 @@ static char *get_dev_name(struct hint_list *list) } } /* if the specified device doesn't exist, skip this entry */ - if (list->device_input >= 0 || list->device_output >= 0) + if (list->device >= 0 || list->device_input >= 0 || list->device_output >= 0) return NULL; return strdup(list->cardname); } diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c index a0cc2e0..59e433f 100644 --- a/src/pcm/pcm.c +++ b/src/pcm/pcm.c @@ -1279,7 +1279,7 @@ snd_pcm_sframes_t snd_pcm_writen(snd_pcm_t *pcm, void **bufs, snd_pcm_uframes_t * \brief Read interleaved frames from a PCM * \param pcm PCM handle * \param buffer frames containing buffer - * \param size frames to be written + * \param size frames to be read * \return a positive number of frames actually read otherwise a * negative error code * \retval -EBADFD PCM is not in the right state (#SND_PCM_STATE_PREPARED or #SND_PCM_STATE_RUNNING) @@ -1311,7 +1311,7 @@ snd_pcm_sframes_t snd_pcm_readi(snd_pcm_t *pcm, void *buffer, snd_pcm_uframes_t * \brief Read non interleaved frames to a PCM * \param pcm PCM handle * \param bufs frames containing buffers (one for each channel) - * \param size frames to be written + * \param size frames to be read * \return a positive number of frames actually read otherwise a * negative error code * \retval -EBADFD PCM is not in the right state (#SND_PCM_STATE_PREPARED or #SND_PCM_STATE_RUNNING) diff --git a/test/pcm.c b/test/pcm.c index ecd0afa..ee27422 100644 --- a/test/pcm.c +++ b/test/pcm.c @@ -385,11 +385,11 @@ static void async_callback(snd_async_handler_t *ahandler) generate_sine(areas, 0, period_size, &data->phase); err = snd_pcm_writei(handle, samples, period_size); if (err < 0) { - printf("Initial write error: %s\n", snd_strerror(err)); + printf("Write error: %s\n", snd_strerror(err)); exit(EXIT_FAILURE); } if (err != period_size) { - printf("Initial write error: written %i expected %li\n", err, period_size); + printf("Write error: written %i expected %li\n", err, period_size); exit(EXIT_FAILURE); } avail = snd_pcm_avail_update(handle); @@ -424,10 +424,12 @@ static int async_loop(snd_pcm_t *handle, exit(EXIT_FAILURE); } } - err = snd_pcm_start(handle); - if (err < 0) { - printf("Start error: %s\n", snd_strerror(err)); - exit(EXIT_FAILURE); + if (snd_pcm_state(handle) == SND_PCM_STATE_PREPARED) { + err = snd_pcm_start(handle); + if (err < 0) { + printf("Start error: %s\n", snd_strerror(err)); + exit(EXIT_FAILURE); + } } /* because all other work is done in the signal handler, ++++++ alsasound ++++++ --- alsa/alsasound 2008-06-18 14:34:07.000000000 +0200 +++ /mounts/work_src_done/STABLE/alsa/alsasound 2008-10-20 11:29:11.000000000 +0200 @@ -216,6 +216,7 @@ *) echo "Usage: $0 {start|stop|restart|reload|unload|status}" exit 1 + ;; esac rc_exit ++++++ joystick ++++++ --- alsa/joystick 2008-08-18 16:37:42.000000000 +0200 +++ /mounts/work_src_done/STABLE/alsa/joystick 2008-10-20 11:29:11.000000000 +0200 @@ -106,6 +106,7 @@ *) echo "Usage: $0 {start|stop|try-restart|restart|force-reload|reload|status}" exit 1 + ;; esac rc_exit ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org