Hello community, here is the log from the commit of package alsa-tools for openSUSE:Factory checked in at 2015-03-01 14:47:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/alsa-tools (Old) and /work/SRC/openSUSE:Factory/.alsa-tools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "alsa-tools" Changes: -------- --- /work/SRC/openSUSE:Factory/alsa-tools/alsa-tools.changes 2014-10-22 16:23:05.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.alsa-tools.new/alsa-tools.changes 2015-03-01 14:47:04.000000000 +0100 @@ -1,0 +2,10 @@ +Thu Feb 26 17:31:15 CET 2015 - [email protected] + +- Update to alsa-tools 1.0.29: + just a version bump including the previous fixes +- Drop obsoleted patches: + 0001-ld10k1-Fix-missing-parentheses-for-functions.patch + 0002-hdajackretask-Add-hints-functionality.patch + 0003-Add-a-small-hdajacksensetest-helper.patch + +------------------------------------------------------------------- Old: ---- 0001-ld10k1-Fix-missing-parentheses-for-functions.patch 0002-hdajackretask-Add-hints-functionality.patch 0003-Add-a-small-hdajacksensetest-helper.patch alsa-tools-1.0.28.tar.bz2 New: ---- alsa-tools-1.0.29.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alsa-tools.spec ++++++ --- /var/tmp/diff_new_pack.sYoJf0/_old 2015-03-01 14:47:05.000000000 +0100 +++ /var/tmp/diff_new_pack.sYoJf0/_new 2015-03-01 14:47:05.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package alsa-tools # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%define package_version 1.0.28 +%define package_version 1.0.29 # %define build_hwdep_loader 0 %define have_fltk 1 @@ -27,7 +27,7 @@ %define have_gtk3 0 %endif Name: alsa-tools -Version: 1.0.28 +Version: 1.0.29 Release: 0 Summary: Various ALSA Tools License: GPL-2.0+ @@ -41,9 +41,6 @@ Source7: rme.png Source8: envy24.png # upstream fixes -Patch1: 0001-ld10k1-Fix-missing-parentheses-for-functions.patch -Patch2: 0002-hdajackretask-Add-hints-functionality.patch -Patch3: 0003-Add-a-small-hdajacksensetest-helper.patch # build fixes Patch100: alsa-tools-desktop-fix.dif Patch101: alsa-tools-no_m4_dir.dif @@ -314,9 +311,6 @@ %setup -q -a 2 -n %{name}-%{package_version} cp %{SOURCE1} . # upstream fixes -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 # build fixes %patch100 -p1 %patch101 -p1 ++++++ alsa-tools-1.0.28.tar.bz2 -> alsa-tools-1.0.29.tar.bz2 ++++++ ++++ 9790 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/Makefile new/alsa-tools-1.0.29/Makefile --- old/alsa-tools-1.0.28/Makefile 2014-06-13 11:30:19.000000000 +0200 +++ new/alsa-tools-1.0.29/Makefile 2015-02-26 13:47:21.000000000 +0100 @@ -1,9 +1,9 @@ -VERSION = 1.0.28 +VERSION = 1.0.29 TOP = . SUBDIRS = as10k1 envy24control hdsploader hdspconf hdspmixer \ mixartloader pcxhrloader rmedigicontrol sb16_csp seq sscape_ctl \ us428control usx2yloader vxloader echomixer ld10k1 qlo10k1 \ - hwmixvolume hdajackretask hda-verb + hwmixvolume hdajackretask hda-verb hdajacksensetest all: @for i in $(SUBDIRS); do \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajackretask/Makefile.am new/alsa-tools-1.0.29/hdajackretask/Makefile.am --- old/alsa-tools-1.0.28/hdajackretask/Makefile.am 2014-06-13 11:28:13.000000000 +0200 +++ new/alsa-tools-1.0.29/hdajackretask/Makefile.am 2015-02-26 13:35:49.000000000 +0100 @@ -1,5 +1,5 @@ EXTRA_DIST = gitcompile README -AM_CFLAGS = @GTK3_CFLAGS@ +AM_CFLAGS = @GTK3_CFLAGS@ -Wno-deprecated-declarations bin_PROGRAMS = hdajackretask man_MANS = hdajackretask_SOURCES = main-gtk.c sysfs-pin-configs.c apply-changes.c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajackretask/README new/alsa-tools-1.0.29/hdajackretask/README --- old/alsa-tools-1.0.28/hdajackretask/README 2014-06-13 11:28:13.000000000 +0200 +++ new/alsa-tools-1.0.29/hdajackretask/README 2015-02-26 13:35:49.000000000 +0100 @@ -1,12 +1,12 @@ -Documentation for hda-jack-retask -================================= +Documentation for hdajackretask +=============================== Most HDA Intel soundcards are to some degree retaskable, i e can be used for more than one thing. This tool is a GUI to make it easy to retask your jacks - e g, turn your Mic jack into an extra Headphone, or why not make them both line outs and connect them to your surround receiver? Quickstart ========== -Start the application "hda-jack-retask" from the command line. +Start the application "hdajackretask" from the command line. Select a codec in the top bar; some people have only one - if you have more than one, one is the "main" one, and the rest are probably HDMI codecs. All jacks (and other inputs/outputs) are shown under "Pin configuration". To override one of your jacks, click the "Override" checkbox for that pin and select the desired function. @@ -44,9 +44,11 @@ Your BIOS is responsible for setting up what pins on the codec that are actually connected to something and which ones are not. Sometimes BIOS is buggy, and will not show all your jacks. If you have a jack your BIOS says you haven't, you can try enabling random pins and see if it works. * Set Model=auto -Some codecs, especially older ones, are hard-coded to use a specific model, and thus will not care about your overrides. In many cases and with a reasonably new kernel, the auto parser now works well for these codecs as well. You can force the auto parser to be used by checking this box. In some cases, though, the explicit model is there for a reason, if so, you're stuck. +Some codecs, especially older ones and on kernels 3.8 and below, are hard-coded to use a specific model, and thus will not care about your overrides. In many cases and with a reasonably new kernel, the auto parser now works well for these codecs as well. You can force the auto parser to be used by checking this box. In some cases, though, the explicit model is there for a reason, if so, you're stuck. * Advanced override This is for the experts only. It makes you select each configuration field individually, instead of just a few predefined values that make sense. Note that most combinations here are invalid in one way or the other, so you should probably not mess with this unless you have read and understood the "Configuration Default" section of the HD Audio specification. (Which, at the time of this writing, is available here: -http://www.intel.com/content/dam/doc/product-specification/high-definition-audio-specification.pdf ) +http://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/high-definition-audio-specification.pdf ) + * Parser hints +This enables you to send special "hints" to the driver that causes parsing to behave differently. Leave them at the "default" setting unless you have read the driver documentation. ( Which, at the time of this writing, is available here: https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt - see the "Hint strings" section. ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajackretask/apply-changes.c new/alsa-tools-1.0.29/hdajackretask/apply-changes.c --- old/alsa-tools-1.0.28/hdajackretask/apply-changes.c 2014-06-13 11:28:13.000000000 +0200 +++ new/alsa-tools-1.0.29/hdajackretask/apply-changes.c 2015-02-26 13:35:49.000000000 +0100 @@ -15,6 +15,11 @@ static gchar* scriptfile = NULL; static gchar* errorfile = NULL; +static GQuark quark() +{ + return g_quark_from_static_string("hda-jack-retask-error"); +} + static gboolean ensure_tempdir(GError** err) { if (!tempdir) { @@ -29,10 +34,10 @@ } static gboolean create_reconfig_script(pin_configs_t* pins, int entries, int card, int device, - const char* model, GError** err) + const char* model, const char* hints, GError** err) { gchar* hwdir = g_strdup_printf("/sys/class/sound/hwC%dD%d", card, device); - gchar destbuf[120*40] = "#!/bin/sh\n"; + gchar destbuf[150*40] = "#!/bin/sh\n"; int bufleft = sizeof(destbuf) - strlen(destbuf); gboolean ok = FALSE; gchar* s = destbuf + strlen(destbuf); @@ -44,9 +49,16 @@ int l = g_snprintf(s, bufleft, "echo \"%s\" | tee %s/modelname 2>>%s\n", model, hwdir, errorfile); bufleft-=l; - s+=l; + s+=l; } - + + if (hints) { + int l = g_snprintf(s, bufleft, "echo \"%s\" | tee %s/hints 2>>%s\n", + hints, hwdir, errorfile); + bufleft-=l; + s+=l; + } + while (entries) { int l = g_snprintf(s, bufleft, "echo \"0x%02x 0x%08x\" | tee %s/user_pin_configs 2>>%s\n", pins->nid, (unsigned int) actual_pin_config(pins), hwdir, errorfile); @@ -57,7 +69,7 @@ } if (bufleft < g_snprintf(s, bufleft, "echo 1 | tee %s/reconfig 2>>%s", hwdir, errorfile)) { - g_set_error(err, 0, 0, "Bug in %s:%d!", __FILE__, __LINE__); + g_set_error(err, quark(), 0, "Bug in %s:%d!", __FILE__, __LINE__); goto cleanup; } @@ -85,7 +97,7 @@ g_chmod(script_name, 0755); g_spawn_command_line_sync(cmdline, NULL, NULL, &exit_status, NULL); if (errorfile && g_file_get_contents(errorfile, &errfilecontents, &errlen, NULL) && errlen) { - g_set_error(err, 0, 0, "%s", errfilecontents); + g_set_error(err, quark(), 0, "%s", errfilecontents); ok = FALSE; } else ok = TRUE; @@ -130,7 +142,7 @@ clientconf = get_pulseaudio_client_conf(); if (!(ok = !g_file_test(clientconf, G_FILE_TEST_EXISTS))) { - g_set_error(err, 0, 0, "Cannot block PulseAudio from respawning:\n" + g_set_error(err, quark(), 0, "Cannot block PulseAudio from respawning:\n" "Please either remove '%s' or kill PulseAudio manually.", clientconf); goto cleanup; } @@ -153,7 +165,7 @@ { gchar* clientconf = get_pulseaudio_client_conf(); if (was_killed && g_unlink(clientconf) != 0) { - g_set_error(err, 0, 0, "%s", g_strerror(errno)); + g_set_error(err, quark(), 0, "%s", g_strerror(errno)); g_free(clientconf); return FALSE; } @@ -162,7 +174,7 @@ } gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int device, - const char* model, GError** err) + const char* model, const char* hints, GError** err) { gboolean result = FALSE; // gchar* script_name = NULL; @@ -172,7 +184,7 @@ if (!kill_pulseaudio(&pa_killed, card, err)) goto cleanup; /* Create script */ - if (!create_reconfig_script(pins, entries, card, device, model, err)) + if (!create_reconfig_script(pins, entries, card, device, model, hints, err)) goto cleanup; /* Run script as root */ if (!run_sudo_script(scriptfile, err)) @@ -187,10 +199,10 @@ } static gboolean create_firmware_file(pin_configs_t* pins, int entries, int card, int device, - const char* model, GError** err) + const char* model, const char* hints, GError** err) { gboolean ok; - gchar destbuf[40*40] = ""; + gchar destbuf[40*40+40*24] = ""; gchar* s = destbuf; gchar* filename = g_strdup_printf("%s/hda-jack-retask.fw", tempdir); unsigned int address, codec_vendorid, codec_ssid; @@ -216,6 +228,12 @@ s+=l; } + if (hints) { + int l = g_snprintf(s, bufleft, "\n[hints]\n%s\n", hints); + bufleft-=l; + s+=l; + } + ok = g_file_set_contents(filename, destbuf, -1, err); g_free(filename); return ok; @@ -238,14 +256,14 @@ "mv %s/hda-jack-retask.conf /etc/modprobe.d/hda-jack-retask.conf 2>>%s\n"; gboolean apply_changes_boot(pin_configs_t* pins, int entries, int card, int device, - const char* model, GError** err) + const char* model, const char* hints, GError** err) { gchar *s; if (!ensure_tempdir(err)) return FALSE; - if (!create_firmware_file(pins, entries, card, device, model, err)) + if (!create_firmware_file(pins, entries, card, device, model, hints, err)) return FALSE; /* Create hda-jack-retask.conf */ @@ -277,7 +295,7 @@ if ((g_file_test("/etc/modprobe.d/hda-jack-retask.conf", G_FILE_TEST_EXISTS) == 0) && (g_file_test("/lib/firmware/hda-jack-retask.fw", G_FILE_TEST_EXISTS) == 0)) { - g_set_error(err, 0, 0, "No boot override is currently installed, nothing to remove."); + g_set_error(err, quark(), 0, "No boot override is currently installed, nothing to remove."); return FALSE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajackretask/apply-changes.h new/alsa-tools-1.0.29/hdajackretask/apply-changes.h --- old/alsa-tools-1.0.28/hdajackretask/apply-changes.h 2014-06-13 11:28:13.000000000 +0200 +++ new/alsa-tools-1.0.29/hdajackretask/apply-changes.h 2015-02-26 13:35:49.000000000 +0100 @@ -5,10 +5,10 @@ #include <glib.h> gboolean apply_changes_reconfig(pin_configs_t* pins, int entries, int card, int device, - const char* model, GError** err); + const char* model, const char* hints, GError** err); gboolean apply_changes_boot(pin_configs_t* pins, int entries, int card, int device, - const char* model, GError** err); + const char* model, const char* hints, GError** err); gboolean reset_changes_boot(); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajackretask/main-gtk.c new/alsa-tools-1.0.29/hdajackretask/main-gtk.c --- old/alsa-tools-1.0.28/hdajackretask/main-gtk.c 2014-06-13 11:28:13.000000000 +0200 +++ new/alsa-tools-1.0.29/hdajackretask/main-gtk.c 2015-02-26 13:35:49.000000000 +0100 @@ -20,6 +20,13 @@ ui_data_t* owner; } pin_ui_data_t; +typedef struct hints_ui_data_t { + gboolean visible; + GtkWidget *frame; + GtkListStore *store; + gchar *values; +} hints_ui_data_t; + struct ui_data_t { GList* pin_ui_data; GtkWidget *main_window; @@ -35,6 +42,8 @@ gboolean trust_codec; gboolean trust_defcfg; gboolean model_auto; + + hints_ui_data_t hints; }; static void update_user_pin_config(ui_data_t* ui, pin_configs_t* cfg); @@ -229,14 +238,44 @@ update_user_pin_config(ui, &ui->sysfs_pins[i]); } +static gboolean update_one_hint(GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer userdata) +{ + gchar *name, *value; + ui_data_t *ui = userdata; + gtk_tree_model_get(GTK_TREE_MODEL(ui->hints.store), iter, 0, &name, 1, &value, -1); + if (g_strcmp0(value, "default")) { + gchar *s = g_strconcat(name, "=", value, "\n", ui->hints.values, NULL); + g_free(ui->hints.values); + ui->hints.values = s; + } + g_free(name); + g_free(value); + return FALSE; +} + +static void update_hints(ui_data_t* ui) +{ + g_free(ui->hints.values); + ui->hints.values = NULL; + if (ui->hints.visible) + gtk_tree_model_foreach(GTK_TREE_MODEL(ui->hints.store), update_one_hint, ui); +} + +static GQuark quark() +{ + return g_quark_from_static_string("hda-jack-retask-error"); +} + static gboolean validate_user_pin_config(ui_data_t* ui, GError** err) { int i; if (!ui->current_codec) { - g_set_error(err, 0, 0, "You must first select a codec!"); + g_set_error(err, quark(), 0, "You must first select a codec!"); return FALSE; } + update_hints(ui); update_all_user_pin_config(ui); if (ui->free_overrides) return TRUE; @@ -249,21 +288,44 @@ if ((v & 0xf0) != 0x10) continue; if (((v & 0xf) != 0) && !find_pin_channel_match(ui->sysfs_pins, ui->sysfs_pincount, v & 0xf0)) { - g_set_error(err, 0, 0, "This surround setup also requires a \"front\" channel override."); + g_set_error(err, quark(), 0, "This surround setup also requires a \"front\" channel override."); return FALSE; } if (((v & 0xf) >= 3) && !find_pin_channel_match(ui->sysfs_pins, ui->sysfs_pincount, 2 + (v & 0xf0))) { - g_set_error(err, 0, 0, "This surround setup also requires a \"back\" channel override."); + g_set_error(err, quark(), 0, "This surround setup also requires a \"back\" channel override."); return FALSE; } if ((v & 0xf) >= 3 && !find_pin_channel_match(ui->sysfs_pins, ui->sysfs_pincount, 1 + (v & 0xf0))) { - g_set_error(err, 0, 0, "This surround setup also requires a \"Center/LFE\" channel override."); + g_set_error(err, quark(), 0, "This surround setup also requires a \"Center/LFE\" channel override."); return FALSE; } } return TRUE; } +static gboolean update_tree_one_hint(GtkTreeModel *model, GtkTreePath *path, + GtkTreeIter *iter, gpointer userdata) +{ + gchar *name; + ui_data_t *ui = userdata; + gtk_tree_model_get(GTK_TREE_MODEL(ui->hints.store), iter, 0, &name, -1); + gchar *s = strstr(ui->hints.values, name); + if (!s) { + g_free(name); + gtk_list_store_set(ui->hints.store, iter, 1, "default", -1); + return FALSE; + } + s += strlen(name); + while (*s == ' ' || *s == '=') s++; + gchar *s2 = s; + while (*s != '\n' && *s != '\0') s++; + s2 = g_strndup(s2, s - s2); + gtk_list_store_set(ui->hints.store, iter, 1, s2, -1); + g_free(s2); + g_free(name); + return FALSE; +} + static void show_action_result(ui_data_t* ui, GError* err, const gchar* ok_msg) { GtkWidget* dialog; @@ -285,7 +347,7 @@ if (ok) apply_changes_reconfig(ui->sysfs_pins, ui->sysfs_pincount, ui->current_codec->card, ui->current_codec->device, - ui->model_auto ? "auto" : NULL, &err); + ui->model_auto ? "auto" : NULL, ui->hints.values, &err); show_action_result(ui, err, "Ok, now go ahead and test to see if it actually worked!\n" "(Remember, this stuff is still experimental.)"); @@ -299,8 +361,8 @@ if (ok) apply_changes_boot(ui->sysfs_pins, ui->sysfs_pincount, ui->current_codec->card, ui->current_codec->device, - ui->model_auto ? "auto" : NULL, &err); - show_action_result(ui, err, + ui->model_auto ? "auto" : NULL, ui->hints.values, &err); + show_action_result(ui, err, "Ok, now reboot to test to see if it actually worked!\n" "(Remember, this stuff is still experimental.)"); } @@ -359,15 +421,24 @@ if (codec_index < 0) return; ui->current_codec = &ui->sysfs_codec_names[codec_index]; - if (codec_change) + if (codec_change) { ui->sysfs_pincount = get_pin_configs_list(ui->sysfs_pins, 32, ui->current_codec->card, ui->current_codec->device); + ui->hints.values = get_hint_overrides(ui->current_codec->card, ui->current_codec->device); + gtk_tree_model_foreach(GTK_TREE_MODEL(ui->hints.store), update_tree_one_hint, ui); + } for (i = 0; i < ui->sysfs_pincount; i++) { GtkWidget *w = create_pin_ui(ui, &ui->sysfs_pins[i]); if (w) gtk_container_add(GTK_CONTAINER(ui->content_inner_box), w); } - + gtk_widget_show_all(GTK_WIDGET(ui->content_inner_box)); + + if (ui->hints.visible) + gtk_widget_show_all(ui->hints.frame); + else + gtk_widget_hide(ui->hints.frame); + resize_main_window(ui); } @@ -394,6 +465,32 @@ update_codec_ui(ui_data, false); } +static void hints_toggled(GtkWidget* sender, ui_data_t* ui_data) +{ + ui_data->hints.visible = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(sender)); + update_codec_ui(ui_data, false); +} + +static void hints_row_activated(GtkTreeView *tree_view, GtkTreePath *path, + GtkTreeViewColumn *column, ui_data_t* ui_data) +{ + GtkTreeIter iter; + gchar *value; + const gchar *newvalue = "default"; + + gtk_tree_model_get_iter(GTK_TREE_MODEL(ui_data->hints.store), &iter, path); + gtk_tree_model_get(GTK_TREE_MODEL(ui_data->hints.store), &iter, 1, &value, -1); + + if (!g_strcmp0(value, "default")) + newvalue = "yes"; + else if (!g_strcmp0(value, "yes")) + newvalue = "no"; + gtk_list_store_set(ui_data->hints.store, &iter, 1, newvalue, -1); + + g_free(value); +} + + static const char* readme_text = #include "README.generated.h" ; @@ -480,6 +577,31 @@ gtk_box_set_child_packing(GTK_BOX(toplevel_2ndbox), frame, TRUE, TRUE, 2, GTK_PACK_START); } + /* Create hints */ + { + GtkWidget* frame = gtk_frame_new("Hints"); + ui->hints.frame = frame; + + GtkListStore *store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); + ui->hints.store = store; + const gchar** names = get_standard_hint_names(); + for (; *names; names++) { + GtkTreeIter iter; + gtk_list_store_append(store, &iter); + gtk_list_store_set(store, &iter, 0, *names, 1, "default", -1); + } + + GtkWidget *tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); + gtk_tree_view_append_column(GTK_TREE_VIEW(tree), gtk_tree_view_column_new_with_attributes + ("Name", gtk_cell_renderer_text_new(), "text", 0, NULL)); + gtk_tree_view_append_column(GTK_TREE_VIEW(tree), gtk_tree_view_column_new_with_attributes + ("Value", gtk_cell_renderer_text_new(), "text", 1, NULL)); + g_signal_connect(tree, "row-activated", G_CALLBACK(hints_row_activated), ui); + + gtk_container_add(GTK_CONTAINER(frame), tree); + gtk_container_add(toplevel_2ndbox, frame); + } + /* Create settings */ { GtkWidget* frame = gtk_frame_new("Options"); @@ -498,6 +620,10 @@ g_signal_connect(check, "toggled", G_CALLBACK(free_override_toggled), ui); gtk_container_add(box, check); + check = gtk_check_button_new_with_label("Parser hints"); + g_signal_connect(check, "toggled", G_CALLBACK(hints_toggled), ui); + gtk_container_add(box, check); + gtk_container_add(GTK_CONTAINER(frame), GTK_WIDGET(box)); gtk_container_add(rightside_box, frame); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajackretask/sysfs-pin-configs.c new/alsa-tools-1.0.29/hdajackretask/sysfs-pin-configs.c --- old/alsa-tools-1.0.28/hdajackretask/sysfs-pin-configs.c 2014-06-13 11:28:13.000000000 +0200 +++ new/alsa-tools-1.0.29/hdajackretask/sysfs-pin-configs.c 2015-02-26 13:35:49.000000000 +0100 @@ -7,6 +7,21 @@ #include "sysfs-pin-configs.h" #include "apply-changes.h" +const gchar *hint_names[25] = { +"jack_detect", "inv_jack_detect", "trigger_sense", "inv_eapd", +"pcm_format_first", "sticky_stream", "spdif_status_reset", +"pin_amp_workaround", "single_adc_amp", "auto_mute", "auto_mic", +"line_in_auto_switch", "auto_mute_via_amp", "need_dac_fix", "primary_hp", +"multi_io", "multi_cap_vol", "inv_dmic_split", "indep_hp", +"add_stereo_mix_input", "add_jack_modes", "power_down_unused", "add_hp_mic", +"hp_mic_detect", NULL }; + +const gchar** get_standard_hint_names() +{ + return hint_names; +} + + int get_codec_name_list(codec_name_t* names, int entries) { GDir* sysdir = g_dir_open("/sys/class/sound", 0, NULL); @@ -117,6 +132,16 @@ g_free(contents); } +gchar *get_hint_overrides(int card, int device) +{ + gchar* filename = g_strdup_printf("/sys/class/sound/hwC%dD%d/hints", card, device); + gchar* contents = NULL; + int ok = g_file_get_contents(filename, &contents, NULL, NULL); + g_free(filename); + if (!ok) + return NULL; + return contents; +} static void read_pin_overrides(pin_configs_t* pins, int entries, int card, int device, gboolean is_user) { @@ -126,7 +151,7 @@ int count = 0; int ok = g_file_get_contents(filename, &contents, NULL, NULL); g_free(filename); - if (!ok) + if (!ok) return; line_iterator = lines = g_strsplit(contents, "\n", entries); while (count < entries && *line_iterator) { @@ -151,6 +176,7 @@ g_strfreev(line); } g_strfreev(lines); + g_free(contents); } int get_pin_configs_list(pin_configs_t* pins, int entries, int card, int device) @@ -263,6 +289,8 @@ #define AC_DEFCFG_DEVICE_SHIFT 20 #define AC_DEFCFG_LOCATION (0x3f<<24) #define AC_DEFCFG_LOCATION_SHIFT 24 +#define AC_DEFCFG_GROSSLOC (0x3<<28) +#define AC_DEFCFG_GROSSLOC_SHIFT 28 #define AC_DEFCFG_PORT_CONN (0x3<<30) #define AC_DEFCFG_PORT_CONN_SHIFT 30 @@ -568,21 +596,27 @@ return TRUE; } +#define DEFAULT_MASK (AC_DEFCFG_PORT_CONN | AC_DEFCFG_GROSSLOC | AC_DEFCFG_DEVICE) + static typical_pins_t simple_typical_pins[] = { - {"Headphone", headphone_caps, 0x0321403f, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE, }, - {"Microphone", extmic_caps, 0x03a19020, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE,}, - {"Line out (Front)", lineout_caps, 0x01014410, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE | AC_DEFCFG_SEQUENCE,}, - {"Line out (Center/LFE)", lineout_caps, 0x01014411, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE | AC_DEFCFG_SEQUENCE,}, - {"Line out (Back)", lineout_caps, 0x01014412, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE | AC_DEFCFG_SEQUENCE,}, - {"Line out (Side)", lineout_caps, 0x01014413, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE | AC_DEFCFG_SEQUENCE,}, - {"Line in", linein_caps, 0x0181344f, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE,}, - {"Internal speaker", lineout_caps, 0x90170150, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE | AC_DEFCFG_SEQUENCE, }, - {"Internal speaker (LFE)", lineout_caps, 0x90170151, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE | AC_DEFCFG_SEQUENCE, }, - {"Internal speaker (Back)", lineout_caps, 0x90170152, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE | AC_DEFCFG_SEQUENCE, }, - {"Internal mic", intmic_caps, 0x90a60160, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE,}, - {"HDMI", hdmi_caps, 0x18560070, AC_DEFCFG_PORT_CONN | AC_DEFCFG_LOCATION,}, + {"Headphone", headphone_caps, 0x0321403f, DEFAULT_MASK, }, + {"Microphone", extmic_caps, 0x03a19020, DEFAULT_MASK,}, + {"Line out (Front)", lineout_caps, 0x01014010, DEFAULT_MASK | AC_DEFCFG_SEQUENCE,}, + {"Line out (Center/LFE)", lineout_caps, 0x01014011, DEFAULT_MASK | AC_DEFCFG_SEQUENCE,}, + {"Line out (Back)", lineout_caps, 0x01014012, DEFAULT_MASK | AC_DEFCFG_SEQUENCE,}, + {"Line out (Side)", lineout_caps, 0x01014013, DEFAULT_MASK | AC_DEFCFG_SEQUENCE,}, + {"Line in", linein_caps, 0x0181304f, DEFAULT_MASK,}, + {"Internal speaker", lineout_caps, 0x90170150, DEFAULT_MASK | AC_DEFCFG_SEQUENCE, }, + {"Internal speaker (LFE)", lineout_caps, 0x90170151, DEFAULT_MASK | AC_DEFCFG_SEQUENCE, }, + {"Internal speaker (Back)", lineout_caps, 0x90170152, DEFAULT_MASK | AC_DEFCFG_SEQUENCE, }, + {"Internal mic", intmic_caps, 0x90a60160, DEFAULT_MASK,}, + {"HDMI / DisplayPort", hdmi_caps, 0x18560070, AC_DEFCFG_PORT_CONN | AC_DEFCFG_LOCATION,}, {"SPDIF out", spdifout_caps, 0x014b1180, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE,}, {"SPDIF in", spdifin_caps, 0x01cb6190, AC_DEFCFG_PORT_CONN | AC_DEFCFG_DEVICE,}, + {"Dock Headphone", headphone_caps, 0x222140af, DEFAULT_MASK, }, + {"Dock Microphone", extmic_caps, 0x22a190a0, DEFAULT_MASK,}, + {"Dock Line out", lineout_caps, 0x220140b0, DEFAULT_MASK | AC_DEFCFG_SEQUENCE,}, + {"Dock Line in", linein_caps, 0x228130bf, DEFAULT_MASK,}, {"Not connected", disabled_caps, 0x40f000f0, AC_DEFCFG_PORT_CONN,}, {} }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajackretask/sysfs-pin-configs.h new/alsa-tools-1.0.29/hdajackretask/sysfs-pin-configs.h --- old/alsa-tools-1.0.28/hdajackretask/sysfs-pin-configs.h 2014-06-13 11:28:13.000000000 +0200 +++ new/alsa-tools-1.0.29/hdajackretask/sysfs-pin-configs.h 2015-02-26 13:35:49.000000000 +0100 @@ -48,6 +48,10 @@ gchar* get_caps_description(unsigned long pin_caps); +const gchar** get_standard_hint_names(); +gchar *get_hint_overrides(int card, int device); + + /* 0 = Jack, 1 = N/A, 2 = Internal, 3 = Both (?!) */ int get_port_conn(unsigned long config); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajacksensetest/Makefile.am new/alsa-tools-1.0.29/hdajacksensetest/Makefile.am --- old/alsa-tools-1.0.28/hdajacksensetest/Makefile.am 1970-01-01 01:00:00.000000000 +0100 +++ new/alsa-tools-1.0.29/hdajacksensetest/Makefile.am 2015-02-26 13:35:49.000000000 +0100 @@ -0,0 +1,12 @@ +MYNAME = hdajacksensetest +AUTOMAKE_OPTIONS = foreign +bin_PROGRAMS = hdajacksensetest +AM_CFLAGS = @GLIB_CFLAGS@ -I "../hdajackretask/" -I "../hda-verb/" +hdajacksensetest_SOURCES = hdajacksensetest.c ../hdajackretask/sysfs-pin-configs.c +hdajacksensetest_LDADD = @GLIB_LIBS@ + +alsa-dist: distdir + @rm -rf ../distdir/$(MYNAME) + @mkdir -p ../distdir/$(MYNAME) + @cp -RLpv $(distdir)/* ../distdir/$(MYNAME) + @rm -rf $(distdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajacksensetest/configure.ac new/alsa-tools-1.0.29/hdajacksensetest/configure.ac --- old/alsa-tools-1.0.28/hdajacksensetest/configure.ac 1970-01-01 01:00:00.000000000 +0100 +++ new/alsa-tools-1.0.29/hdajacksensetest/configure.ac 2015-02-26 13:35:49.000000000 +0100 @@ -0,0 +1,10 @@ +AC_INIT(hdajacksensetest, 0.20141006) +AM_INIT_AUTOMAKE(subdir-objects) +AM_MAINTAINER_MODE([enable]) +AC_PROG_CC +AC_PROG_INSTALL +AC_HEADER_STDC + +PKG_CHECK_MODULES([GLIB], [glib-2.0]) + +AC_OUTPUT(Makefile) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajacksensetest/hdajacksensetest.c new/alsa-tools-1.0.29/hdajacksensetest/hdajacksensetest.c --- old/alsa-tools-1.0.28/hdajacksensetest/hdajacksensetest.c 1970-01-01 01:00:00.000000000 +0100 +++ new/alsa-tools-1.0.29/hdajacksensetest/hdajacksensetest.c 2015-02-26 13:35:49.000000000 +0100 @@ -0,0 +1,146 @@ +/* + * Checks the current pin/jack status of the codec + * + * Copyright (c) 2014 David Henningsson, Canonical Ltd. <[email protected]> + * (With some minor pieces copy-pasted from hda-verb by Takashi Iwai) + * + * Licensed under GPL v2 or later. + */ + + +#include <stdlib.h> +#include <stdio.h> +#include <fcntl.h> +#include <unistd.h> +#include <glib.h> +#include <errno.h> +#include "sysfs-pin-configs.h" + +#include <sys/ioctl.h> +#include <stdint.h> +typedef uint8_t u8; +typedef uint16_t u16; +typedef uint32_t u32; +typedef uint64_t u64; +#include "hda_hwdep.h" + +gint card_index, codec_index; +gboolean try_all_pins, set_pin_sense; + +static GOptionEntry arg_entries[] = +{ + { "card", 'c', 0, G_OPTION_ARG_INT, &card_index, "card index (as can be seen in /proc/asound/cards)", "X" }, + { "codec", 'd', 0, G_OPTION_ARG_INT, &codec_index, "codec device index (as can be seen in /proc/asound/cardX/codecY)", "Y" }, + { "allpins", 'a', 0, G_OPTION_ARG_NONE, &try_all_pins, "try all pins, even those who (probably) does not have a physical jack", NULL }, + { "setpinsense", 's', 0, G_OPTION_ARG_NONE, &set_pin_sense, "execute 'Set pin sense' before the pin sense is measured", NULL }, + { NULL } +}; + +static void parse_command_line(int argc, char **argv) +{ + GError *error = NULL; + GOptionContext *context = g_option_context_new("- check current jack/pin sense"); + g_option_context_add_main_entries(context, arg_entries, NULL); + if (!g_option_context_parse (context, &argc, &argv, &error)) { + fprintf(stderr, "Option parsing failed: %s\n", error->message); + exit(1); + } + g_option_context_free(context); +} + + +static gboolean should_check_pin(pin_configs_t *pin) +{ + unsigned long defcfg = actual_pin_config(pin); + if (try_all_pins) + return TRUE; + if (get_port_conn(defcfg) != 0) + return FALSE; // Not a jack + if (defcfg & (1 << 8)) // Jack has NO_PRESENCE set + return FALSE; + return TRUE; +} + +int fd; + +static void codec_open() +{ + char filename[64]; + int version = 0; + + snprintf(filename, 64, "/dev/snd/hwC%dD%d", card_index, codec_index); + fd = open(filename, O_RDWR); + if (fd < 0) { + if (errno == EACCES) + fprintf(stderr, "Permission error (hint: this program usually requires root)\n"); + else + fprintf(stderr, "Ioctl call failed with error %d\n", errno); + exit(1); + } + + if (ioctl(fd, HDA_IOCTL_PVERSION, &version) < 0) { + fprintf(stderr, "Ioctl call failed with error %d\n", errno); + fprintf(stderr, "Looks like an invalid hwdep device...\n"); + close(fd); + exit(1); + } + if (version < HDA_HWDEP_VERSION) { + fprintf(stderr, "Invalid version number 0x%x\n", version); + fprintf(stderr, "Looks like an invalid hwdep device...\n"); + close(fd); + exit(1); + } +} + +static unsigned long codec_rw(int nid, int verb, int param) +{ + struct hda_verb_ioctl val; + + val.verb = HDA_VERB(nid, verb, param); + if (ioctl(fd, HDA_IOCTL_VERB_WRITE, &val) < 0) { + fprintf(stderr, "Ioctl call failed with error %d\n", errno); + close(fd); + exit(1); + } + return val.res; +} + +#define AC_VERB_GET_PIN_SENSE 0x0f09 +#define AC_VERB_SET_PIN_SENSE 0x709 + +#define MAX_PINS 32 + +pin_configs_t pin_configs[MAX_PINS]; + +int main(int argc, char **argv) +{ + int pin_count, i; + + parse_command_line(argc, argv); + pin_count = get_pin_configs_list(pin_configs, MAX_PINS, card_index, codec_index); + if (pin_count == 0) { + fprintf(stderr, "No pins found for card %d codec %d, did you pick the right one?\n", card_index, codec_index); + exit(1); + } + + codec_open(); + + if (set_pin_sense) { + for (i = 0; i < pin_count; i++) + if (should_check_pin(&pin_configs[i])) { + codec_rw(pin_configs[i].nid, AC_VERB_SET_PIN_SENSE, 0); + } + sleep(1); + } + + for (i = 0; i < pin_count; i++) + if (should_check_pin(&pin_configs[i])) { + gchar *desc = get_config_description(actual_pin_config(&pin_configs[i])); + unsigned long present = codec_rw(pin_configs[i].nid, AC_VERB_GET_PIN_SENSE, 0); + printf("Pin 0x%.2x (%s): present = %s\n", pin_configs[i].nid, desc, present & 0x80000000 ? "Yes" : "No"); + g_free(desc); + } + + close(fd); + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/hdajacksensetest/missing new/alsa-tools-1.0.29/hdajacksensetest/missing --- old/alsa-tools-1.0.28/hdajacksensetest/missing 1970-01-01 01:00:00.000000000 +0100 +++ new/alsa-tools-1.0.29/hdajacksensetest/missing 2012-09-26 16:03:18.000000000 +0200 @@ -0,0 +1,330 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2012-01-06.18; # UTC + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Originally by Fran,cois Pinard <[email protected]>, 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +run=: +sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' +sed_minuso='s/.* -o \([^ ]*\).*/\1/p' + +# In the cases where this matters, 'missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case $1 in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file 'aclocal.m4' + autoconf touch file 'configure' + autoheader touch file 'config.h.in' + autom4te touch the output file, or create a stub one + automake touch all 'Makefile.in' files + bison create 'y.tab.[ch]', if possible, from existing .[ch] + flex create 'lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create 'lex.yy.c', if possible, from existing .c + makeinfo touch the output file + yacc create 'y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to <[email protected]>." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: Unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# normalize program name to check for. +program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + +# Now exit if we have it, but it failed. Also exit now if we +# don't have it and --version was passed (most likely to detect +# the program). This is about non-GNU programs, so use $1 not +# $program. +case $1 in + lex*|yacc*) + # Not GNU programs, they don't have --version. + ;; + + *) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + elif test "x$2" = "x--version" || test "x$2" = "x--help"; then + # Could not run --version or --help. This is probably someone + # running '$TOOL --version' or '$TOOL --help' to check whether + # $TOOL exists and not knowing $TOOL uses missing. + exit 1 + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case $program in + aclocal*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified 'acinclude.m4' or '${configure_ac}'. You might want + to install the Automake and Perl packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified '${configure_ac}'. You might want to install the + Autoconf and GNU m4 packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified 'acconfig.h' or '${configure_ac}'. You might want + to install the Autoconf and GNU m4 packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case $f in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. + You might want to install the Automake and Perl packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te*) + echo 1>&2 "\ +WARNING: '$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get '$1' as part of Autoconf from any GNU + archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison*|yacc*) + echo 1>&2 "\ +WARNING: '$1' $msg. You should only need it if + you modified a '.y' file. You may need the Bison package + in order for those modifications to take effect. You can get + Bison from any GNU archive site." + rm -f y.tab.c y.tab.h + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if test ! -f y.tab.h; then + echo >y.tab.h + fi + if test ! -f y.tab.c; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex*|flex*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified a '.l' file. You may need the Flex package + in order for those modifications to take effect. You can get + Flex from any GNU archive site." + rm -f lex.yy.c + if test $# -ne 1; then + eval LASTARG=\${$#} + case $LASTARG in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if test -f "$SRCFILE"; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if test ! -f lex.yy.c; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + Help2man package in order for those modifications to take + effect. You can get Help2man from any GNU archive site." + + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit $? + fi + ;; + + makeinfo*) + echo 1>&2 "\ +WARNING: '$1' is $msg. You should only need it if + you modified a '.texi' or '.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy 'make' (AIX, + DU, IRIX). You might want to install the Texinfo package or + the GNU make package. Grab either from any GNU archive site." + # The file to touch is that specified with -o ... + file=`echo "$*" | sed -n "$sed_output"` + test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` + if test -z "$file"; then + # ... or it is the one specified with @setfilename ... + infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n ' + /^@setfilename/{ + s/.* \([^ ]*\) *$/\1/ + p + q + }' $infile` + # ... or it is derived from the source name (dir/f.texi becomes f.info) + test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info + fi + # If the file does not exist, the user really needs makeinfo; + # let's fail without touching anything. + test -f $file || exit 1 + touch $file + ;; + + *) + echo 1>&2 "\ +WARNING: '$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the 'README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing '$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-tools-1.0.28/ld10k1/setup/init_live.in new/alsa-tools-1.0.29/ld10k1/setup/init_live.in --- old/alsa-tools-1.0.28/ld10k1/setup/init_live.in 2014-06-13 11:28:13.000000000 +0200 +++ new/alsa-tools-1.0.29/ld10k1/setup/init_live.in 2015-02-26 13:35:49.000000000 +0100 @@ -46,7 +46,7 @@ std_capture=capture #std_capture=capture_noswitch -log +log () { local level=$1 @@ -57,7 +57,7 @@ fi } -runlo10k1 +runlo10k1 () { log 2 $LO10K1 "$@" @@ -71,7 +71,7 @@ fi } -rename +rename () { port=$1 name=$2 @@ -81,7 +81,7 @@ runlo10k1 --renam "$port=$name" } -connect +connect () { from=$1 op=$2 @@ -92,7 +92,7 @@ runlo10k1 --conadd "$from$op$to" } -copy +copy () { local name=$1 local port=$2 @@ -105,7 +105,7 @@ connect "PIN($name Copy)" '=' "$port" } -volume +volume () { local name=$1 local port=$2 @@ -120,7 +120,7 @@ connect "PIN($name Volume)" '=' "$port" } -master_volume +master_volume () { local name=$1 local port=$2 @@ -135,7 +135,7 @@ connect "$port" '=' "PIN($name Volume)" } -switch +switch () { local name=$1 local port=$2 @@ -150,7 +150,7 @@ connect "PIN($name Switch)" '>' "$port" } -switch_2x2 +switch_2x2 () { local name=$1 local port1=$2 @@ -166,7 +166,7 @@ connect "PIN($name Switch,2,3)" '>' "$port2" } -switch_5x2 +switch_5x2 () { local name=$1 local port1=$2 @@ -182,7 +182,7 @@ connect "PIN($name Switch,5,6,7,8,9)" '>' "$port2" } -master_switch +master_switch () { local name=$1 local port=$2 @@ -197,7 +197,7 @@ connect "PIN($name Switch)" '=' "$port" } -playback +playback () { name=$1 port=$2 @@ -211,7 +211,7 @@ add_output "POUT($name Playback Volume)" } -playback_noswitch +playback_noswitch () { name=$1 port=$2 @@ -224,7 +224,7 @@ add_output "POUT($name Playback Volume)" } -capture +capture () { name=$1 port=$2 @@ -238,7 +238,7 @@ connect "POUT($name Capture Volume)" '>' "OUT(OUT_PCM_Capture_Left,OUT_PCM_Capture_Right)" } -capture_noswitch +capture_noswitch () { name=$1 port=$2 @@ -251,7 +251,7 @@ connect "POUT($name Capture Volume)" '>' "OUT(OUT_PCM_Capture_Left,OUT_PCM_Capture_Right)" } -master +master () { local name=$1 local port=$2 @@ -264,7 +264,7 @@ master_switch "$name Playback" "POUT($name Playback Volume)" 1 $index } -dump_patches +dump_patches () { max=$(( ${1} - 1 )) line=$(seq -s ' ' 0 $max) @@ -277,35 +277,35 @@ exit } -add_output +add_output () { local port=$1 $add_output_func "$port" } -add_output_tone_2 +add_output_tone_2 () { local port=$1 connect "$port" '>' "PIN(Tone Control,0,1)" } -add_output_simple_2 +add_output_simple_2 () { local port=$1 connect "$port" '>' "PIN(Wave Simple Stereo To 51,0,1)" } -add_output_prologic_2 +add_output_prologic_2 () { local port=$1 connect "$port" '>' "PIN(Wave Prologic,0,1)" } -add_output_switched_2 +add_output_switched_2 () { local port=$1 @@ -314,7 +314,7 @@ } -simple_stereo_to_51 +simple_stereo_to_51 () { local name=$1 local control=$2 @@ -330,7 +330,7 @@ fi } -prologic +prologic () { local name=$1 local control=$2 @@ -351,7 +351,7 @@ connect "POUT($name Prologic)" '=' "PIN($name Multi Volume,0,1,2,3,4,5)" } -tone +tone () { local name=$1 local port=$2 @@ -364,7 +364,7 @@ runlo10k1 -n --ctrl "c-bass0,bass1,bass2,bass3,bass4:$name - Bass,t-$name - Bass:2,v-$name - Bass:1,c-treble0,treble1,treble2,treble3,treble4:$name - Treble,t-$name - Treble:3,v-$name - Treble:1,c-toneonoff:$name - Switch,t-$name - Switch:4" --patch_name "${name}" -a tone.emu10k1 } -multi_playback +multi_playback () { local name=$1 local port=$2 @@ -383,7 +383,7 @@ connect "POUT($name Multi Volume)" '>' "PIN(Tone Control)" } -fxbus +fxbus () { local name=$1 local enable_pcm_fx89=$2 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
