summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Beierlein <tomjbe@gentoo.org>2010-02-09 13:59:00 +0000
committerThomas Beierlein <tomjbe@gentoo.org>2010-02-09 13:59:00 +0000
commite07663ce41bece8484caf405dd0919f4f30af00b (patch)
treea30349cd172a7ca0ea3d748ea26c9f94d7f48453 /media-radio
parentmedia-radio/drm: Added gcc4.4 compatibility patch (diff)
downloadsunrise-reviewed-e07663ce41bece8484caf405dd0919f4f30af00b.tar.gz
sunrise-reviewed-e07663ce41bece8484caf405dd0919f4f30af00b.tar.bz2
sunrise-reviewed-e07663ce41bece8484caf405dd0919f4f30af00b.zip
media-radio/unixcw: Fix some audio problems: sometimes alsa oss emulation handles mixer settings wrong and restoration of original audio volume level after finish of cw, cwcp and xcwcp
svn path=/sunrise/; revision=10012
Diffstat (limited to 'media-radio')
-rw-r--r--media-radio/unixcw/ChangeLog7
-rw-r--r--media-radio/unixcw/Manifest5
-rw-r--r--media-radio/unixcw/files/unixcw-2.3-audio.patch147
-rw-r--r--media-radio/unixcw/unixcw-2.3-r5.ebuild (renamed from media-radio/unixcw/unixcw-2.3-r4.ebuild)0
4 files changed, 157 insertions, 2 deletions
diff --git a/media-radio/unixcw/ChangeLog b/media-radio/unixcw/ChangeLog
index aec3ab1ba..71a6fb101 100644
--- a/media-radio/unixcw/ChangeLog
+++ b/media-radio/unixcw/ChangeLog
@@ -2,6 +2,13 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 09 Feb 2010; Thomas Beierlein (TomJBE) <tb@forth-ev.de>
+ -unixcw-2.3-r4.ebuild, +unixcw-2.3-r5.ebuild,
+ +files/unixcw-2.3-audio.patch:
+ Fix some audio problems: sometimes alsa oss emulation handles mixer settings
+ wrong and restoration of original audio volume level after finish of cw,
+ cwcp and xcwcp
+
28 Jan 2010; Thomas Beierlein (TomJBE) <tb@forth-ev.de>
files/unixcw-2.3-config.patch:
fix a small problem if qt3 is still installed
diff --git a/media-radio/unixcw/Manifest b/media-radio/unixcw/Manifest
index 24f1711ff..6051a2761 100644
--- a/media-radio/unixcw/Manifest
+++ b/media-radio/unixcw/Manifest
@@ -1,4 +1,5 @@
AUX unixcw-2.3--as-needed.patch 527 RMD160 47d2b22e6c8b211abae913e32576408a6a2c8a69 SHA1 ffae50431bc25e4b4b9f9264c0aef44300a82316 SHA256 b72add7559a0a9df10adc0efa885377ac02ccc2fa840366c1185cbb2485c35e8
+AUX unixcw-2.3-audio.patch 5083 RMD160 178b53cafb61c8c0d6888b6e35e00b358e249ef5 SHA1 81c30aadf69aba3c7d2d6e666288b1babde295aa SHA256 ef07fd4fb3dddfe4f350b770996c8f612a804fbf0b0156c9fe7bef9e1c04209f
AUX unixcw-2.3-config.patch 3761 RMD160 3c768f236b28840bfadba4865cc9c67eaef97695 SHA1 6fb542cd888fdae76e12f80946dacc30298e46c3 SHA256 aeb49365292721894afc7a4df61abff0e0b053e8d934951e200ec70dc8abf150
AUX unixcw-2.3-destdir.patch 480 RMD160 40579e2f3ff874cfd98ca18f2956451e4a197e5a SHA1 926ff70e9067f74c14919b7519b7b99579d51534 SHA256 ba6c84abcaebe9c16cdac636626bbd3c74a7afc6d115985767377878c13ca64c
AUX unixcw-2.3-fPIC.patch 1866 RMD160 fd3dcaa906a308d15baa738dca5f01e3767cd6dd SHA1 c5ad38457125086d56526de28022ca68c9350dbd SHA256 2cd8aa8759df1c40742c57f5e65c2a9093c587e83345e01a26ac8f46c5953053
@@ -6,6 +7,6 @@ AUX unixcw-2.3-ldflags.patch 1440 RMD160 d198c5325152b93822a0a3d59516b48c7b6d53f
AUX unixcw-2.3-parallel-make.patch 1200 RMD160 302a1947d21a3b1013d124edc380fcaddbbb7272 SHA1 a15e1bc58c64421b93a73c9ff46dfdbeb2d3a6f6 SHA256 53b8c6e12de88ed2c915617206220350c3e08eebd83d748469bc23c801ed108c
DIST unixcw-2.3-qt3to4.patch 22763 RMD160 b5fd5e856cc80a82d62a39be7da44f3858c7174b SHA1 14e99dc334121287bb994fe19cdc30325d09a191 SHA256 e5cafb629c563d2eae23ceba2119e78138c5e3a619ac981ded9fc0286200ac26
DIST unixcw-2.3.tgz 202048 RMD160 1ba7944d7a7fc92adf7ed1a83d706546e9eaa8be SHA1 2aece1e4b0660618537a94561344dd97026b7924 SHA256 124c60c6c7ef596a7c96c94a0e76204c7d986373564121155f0f206ad71f30a0
-EBUILD unixcw-2.3-r4.ebuild 2032 RMD160 17d1a50e7b69bd1055bcc411e4298d21c6f83891 SHA1 52c3ccc3a952101d881dd22dbd519574fe5582b7 SHA256 8f1d18621c2df6c6c8b107a2983b98a9826a649a9628111f1361bbfd23c11667
-MISC ChangeLog 1963 RMD160 75a6991bb3f4828a1e65991adedcb4610d654be9 SHA1 0e6297cd478044a06f79a207ba20921c83750ace SHA256 5030fecf070fd2098c6ba1452375ba40659737ccc7dcdad3c28a074af9440ad5
+EBUILD unixcw-2.3-r5.ebuild 2032 RMD160 17d1a50e7b69bd1055bcc411e4298d21c6f83891 SHA1 52c3ccc3a952101d881dd22dbd519574fe5582b7 SHA256 8f1d18621c2df6c6c8b107a2983b98a9826a649a9628111f1361bbfd23c11667
+MISC ChangeLog 2274 RMD160 ca3a2546b88321880de573c1e2b7e758cbf842fb SHA1 3c10bedb59633e8e2b19796d0dfafa098ccf5578 SHA256 ab2017f8a8d085574068db67a4948c04860c62c4c7c1f92ea9252fb5bc84e6bc
MISC metadata.xml 721 RMD160 358f506631160eb1ce60de0dcd5f664d7228a3d3 SHA1 4c1b6c2008868b71faa1a033e1d72b2598854cdf SHA256 d847debc753001714fab7b3df756ada41b7fed920b9afd10851d646c0fb00770
diff --git a/media-radio/unixcw/files/unixcw-2.3-audio.patch b/media-radio/unixcw/files/unixcw-2.3-audio.patch
new file mode 100644
index 000000000..944cd91cc
--- /dev/null
+++ b/media-radio/unixcw/files/unixcw-2.3-audio.patch
@@ -0,0 +1,147 @@
+diff -ur unixcw-2.3.orig/src/cw/cw.c unixcw-2.3/src/cw/cw.c
+--- unixcw-2.3.orig/src/cw/cw.c 2006-06-18 23:58:46.000000000 +0200
++++ unixcw-2.3/src/cw/cw.c 2010-02-03 14:46:58.000000000 +0100
+@@ -922,5 +922,9 @@
+
+ /* Await final tone completion before exiting. */
+ cw_wait_for_tone_queue ();
++
++ /* Reset to ensure that the mixer volume gets restored. */
++ cw_complete_reset();
++
+ return EXIT_SUCCESS;
+ }
+Only in unixcw-2.3/src/cw: cw.o
+Only in unixcw-2.3/src/cwcp: cwcp
+diff -ur unixcw-2.3.orig/src/cwcp/cwcp.c unixcw-2.3/src/cwcp/cwcp.c
+--- unixcw-2.3.orig/src/cwcp/cwcp.c 2006-06-22 05:50:05.000000000 +0200
++++ unixcw-2.3/src/cwcp/cwcp.c 2010-02-03 14:48:31.000000000 +0100
+@@ -1625,6 +1625,9 @@
+ /* Attempt to wrestle the screen back from curses. */
+ interface_destroy ();
+
++ /* Reset to ensure that the mixer volumes gets restored */
++ cw_complete_reset();
++
+ /* Show the signal caught, and exit. */
+ fprintf (stderr, _("\nCaught signal %d, exiting...\n"), signal_number);
+ exit (EXIT_SUCCESS);
+@@ -1685,5 +1688,9 @@
+ /* Clean up and return. */
+ interface_destroy ();
+ cw_wait_for_tone_queue ();
++
++ /* Reset to ensure that the mixer volumes gets restored */
++ cw_complete_reset();
++
+ return EXIT_SUCCESS;
+ }
+diff -ur unixcw-2.3.orig/src/cwlib/cwlib.c unixcw-2.3/src/cwlib/cwlib.c
+--- unixcw-2.3.orig/src/cwlib/cwlib.c 2006-06-23 03:54:01.000000000 +0200
++++ unixcw-2.3/src/cwlib/cwlib.c 2010-02-04 19:36:32.000000000 +0100
+@@ -2138,12 +2138,33 @@
+ {
+ int read_volume, mixer, device_mask;
+
+- /* Try to use the main /dev/audio device for ioctls first. */
+- if (ioctl (cw_sound_descriptor,
+- MIXER_READ (SOUND_MIXER_PCM), &read_volume) == 0)
++ /* Try to use the main /dev/audio device for ioctls first.
++ * Check the available mixer channels for the audio file.
++ */
++ if (ioctl (cw_sound_descriptor, SOUND_MIXER_READ_DEVMASK, &device_mask) != -1)
+ {
+- *volume = read_volume;
+- return RC_SUCCESS;
++ /* Could read device_mask, so check availabel channels */
++ if (device_mask & SOUND_MASK_PCM)
++ /* First try PCM channel, ... */
++ {
++ if (ioctl (cw_sound_descriptor,
++ MIXER_READ (SOUND_MIXER_PCM), &read_volume) == 0)
++ {
++ *volume = read_volume;
++ return RC_SUCCESS;
++ }
++ }
++
++ if (device_mask & SOUND_MASK_VOLUME)
++ /* then master volume */
++ {
++ if (ioctl (cw_sound_descriptor,
++ MIXER_READ (SOUND_MIXER_VOLUME), &read_volume) == 0)
++ {
++ *volume = read_volume;
++ return RC_SUCCESS;
++ }
++ }
+ }
+
+ /* Volume not found; try the mixer PCM channel volume instead. */
+@@ -2215,13 +2236,35 @@
+ cw_set_sound_pcm_volume_internal (int volume)
+ {
+ int mixer, device_mask;
++ /* Try the mixer PCM channel volume instead. */
++ /* Try to use the main /dev/audio device for ioctls first.
++ * Check the available mixer channels for the audio file.
++ */
++ if (ioctl (cw_sound_descriptor, SOUND_MIXER_READ_DEVMASK, &device_mask) != -1)
++ {
++ /* Could read device_mask, so check availabel channels */
++ if (device_mask & SOUND_MASK_PCM)
++ /* First try PCM channel, ... */
++ {
++ if (ioctl (cw_sound_descriptor,
++ MIXER_WRITE (SOUND_MIXER_PCM), &volume) == 0)
++ {
++ return RC_SUCCESS;
++ }
++ }
++
++ if (device_mask & SOUND_MASK_VOLUME)
++ /* then master volume */
++ {
++ if (ioctl (cw_sound_descriptor,
++ MIXER_WRITE (SOUND_MIXER_VOLUME), &volume) == 0)
++ {
++ return RC_SUCCESS;
++ }
++ }
++ }
+
+- /* Try to use the main /dev/audio device for ioctls first. */
+- if (ioctl (cw_sound_descriptor,
+- MIXER_WRITE (SOUND_MIXER_PCM), &volume) == 0)
+- return RC_SUCCESS;
+
+- /* Try the mixer PCM channel volume instead. */
+ mixer = open (cw_mixer_device, O_RDWR | O_NONBLOCK);
+ if (mixer == -1)
+ {
+diff -ur unixcw-2.3.orig/src/xcwcp/application.cc unixcw-2.3/src/xcwcp/application.cc
+--- unixcw-2.3.orig/src/xcwcp/application.cc 2006-06-22 08:22:36.000000000 +0200
++++ unixcw-2.3/src/xcwcp/application.cc 2010-02-09 14:12:24.000000000 +0100
+@@ -498,6 +498,9 @@
+
+ // Done with the CW library sender for now.
+ cwlib_user_application_instance = NULL;
++
++ /* Reset to ensure that the mixer volumes gets restored */
++ cw_complete_reset();
+
+ file_menu_->setItemEnabled (file_start_id_, true);
+ file_menu_->setItemEnabled (file_stop_id_, false);
+diff -ur unixcw-2.3.orig/src/xcwcp/main.cc unixcw-2.3/src/xcwcp/main.cc
+--- unixcw-2.3.orig/src/xcwcp/main.cc 2006-06-18 23:39:34.000000000 +0200
++++ unixcw-2.3/src/xcwcp/main.cc 2010-02-09 14:06:17.000000000 +0100
+@@ -370,6 +370,9 @@
+ void
+ signal_handler (int signal_number)
+ {
++ /* Reset to ensure that the mixer volumes gets restored */
++ cw_complete_reset();
++
+ std::clog << _("Caught signal ") << signal_number
+ << _(", exiting...") << std::endl;
+ exit (EXIT_SUCCESS);
diff --git a/media-radio/unixcw/unixcw-2.3-r4.ebuild b/media-radio/unixcw/unixcw-2.3-r5.ebuild
index 53f0d7576..53f0d7576 100644
--- a/media-radio/unixcw/unixcw-2.3-r4.ebuild
+++ b/media-radio/unixcw/unixcw-2.3-r5.ebuild