diff -Nru alsa-utils-1.2.2/ABOUT-NLS alsa-utils-1.2.6/ABOUT-NLS --- alsa-utils-1.2.2/ABOUT-NLS 2020-02-19 12:07:10.000000000 +0000 +++ alsa-utils-1.2.6/ABOUT-NLS 2021-12-06 11:44:41.000000000 +0000 @@ -1,1379 +1 @@ -1 Notes on the Free Translation Project -*************************************** - -Free software is going international! The Free Translation Project is a -way to get maintainers of free software, translators, and users all -together, so that free software will gradually become able to speak many -languages. A few packages already provide translations for their -messages. - - If you found this 'ABOUT-NLS' file inside a distribution, you may -assume that the distributed package does use GNU 'gettext' internally, -itself available at your nearest GNU archive site. But you do _not_ -need to install GNU 'gettext' prior to configuring, installing or using -this package with messages translated. - - Installers will find here some useful hints. These notes also -explain how users should proceed for getting the programs to use the -available translations. They tell how people wanting to contribute and -work on translations can contact the appropriate team. - -1.1 INSTALL Matters -=================== - -Some packages are "localizable" when properly installed; the programs -they contain can be made to speak your own native language. Most such -packages use GNU 'gettext'. Other packages have their own ways to -internationalization, predating GNU 'gettext'. - - By default, this package will be installed to allow translation of -messages. It will automatically detect whether the system already -provides the GNU 'gettext' functions. Installers may use special -options at configuration time for changing the default behaviour. The -command: - - ./configure --disable-nls - -will _totally_ disable translation of messages. - - When you already have GNU 'gettext' installed on your system and run -configure without an option for your new package, 'configure' will -probably detect the previously built and installed 'libintl' library and -will decide to use it. If not, you may have to to use the -'--with-libintl-prefix' option to tell 'configure' where to look for it. - - Internationalized packages usually have many 'po/LL.po' files, where -LL gives an ISO 639 two-letter code identifying the language. Unless -translations have been forbidden at 'configure' time by using the -'--disable-nls' switch, all available translations are installed -together with the package. However, the environment variable 'LINGUAS' -may be set, prior to configuration, to limit the installed set. -'LINGUAS' should then contain a space separated list of two-letter -codes, stating which languages are allowed. - -1.2 Using This Package -====================== - -As a user, if your language has been installed for this package, you -only have to set the 'LANG' environment variable to the appropriate -'LL_CC' combination. If you happen to have the 'LC_ALL' or some other -'LC_xxx' environment variables set, you should unset them before setting -'LANG', otherwise the setting of 'LANG' will not have the desired -effect. Here 'LL' is an ISO 639 two-letter language code, and 'CC' is -an ISO 3166 two-letter country code. For example, let's suppose that -you speak German and live in Germany. At the shell prompt, merely -execute 'setenv LANG de_DE' (in 'csh'), 'export LANG; LANG=de_DE' (in -'sh') or 'export LANG=de_DE' (in 'bash'). This can be done from your -'.login' or '.profile' file, once and for all. - - You might think that the country code specification is redundant. -But in fact, some languages have dialects in different countries. For -example, 'de_AT' is used for Austria, and 'pt_BR' for Brazil. The -country code serves to distinguish the dialects. - - The locale naming convention of 'LL_CC', with 'LL' denoting the -language and 'CC' denoting the country, is the one use on systems based -on GNU libc. On other systems, some variations of this scheme are used, -such as 'LL' or 'LL_CC.ENCODING'. You can get the list of locales -supported by your system for your language by running the command -'locale -a | grep '^LL''. - - Not all programs have translations for all languages. By default, an -English message is shown in place of a nonexistent translation. If you -understand other languages, you can set up a priority list of languages. -This is done through a different environment variable, called -'LANGUAGE'. GNU 'gettext' gives preference to 'LANGUAGE' over 'LANG' -for the purpose of message handling, but you still need to have 'LANG' -set to the primary language; this is required by other parts of the -system libraries. For example, some Swedish users who would rather read -translations in German than English for when Swedish is not available, -set 'LANGUAGE' to 'sv:de' while leaving 'LANG' to 'sv_SE'. - - Special advice for Norwegian users: The language code for Norwegian -bokma*l changed from 'no' to 'nb' recently (in 2003). During the -transition period, while some message catalogs for this language are -installed under 'nb' and some older ones under 'no', it's recommended -for Norwegian users to set 'LANGUAGE' to 'nb:no' so that both newer and -older translations are used. - - In the 'LANGUAGE' environment variable, but not in the 'LANG' -environment variable, 'LL_CC' combinations can be abbreviated as 'LL' to -denote the language's main dialect. For example, 'de' is equivalent to -'de_DE' (German as spoken in Germany), and 'pt' to 'pt_PT' (Portuguese -as spoken in Portugal) in this context. - -1.3 Translating Teams -===================== - -For the Free Translation Project to be a success, we need interested -people who like their own language and write it well, and who are also -able to synergize with other translators speaking the same language. -Each translation team has its own mailing list. The up-to-date list of -teams can be found at the Free Translation Project's homepage, -'http://translationproject.org/', in the "Teams" area. - - If you'd like to volunteer to _work_ at translating messages, you -should become a member of the translating team for your own language. -The subscribing address is _not_ the same as the list itself, it has -'-request' appended. For example, speakers of Swedish can send a -message to 'sv-request@li.org', having this message body: - - subscribe - - Keep in mind that team members are expected to participate _actively_ -in translations, or at solving translational difficulties, rather than -merely lurking around. If your team does not exist yet and you want to -start one, or if you are unsure about what to do or how to get started, -please write to 'coordinator@translationproject.org' to reach the -coordinator for all translator teams. - - The English team is special. It works at improving and uniformizing -the terminology in use. Proven linguistic skills are praised more than -programming skills, here. - -1.4 Available Packages -====================== - -Languages are not equally supported in all packages. The following -matrix shows the current state of internationalization, as of Jun 2014. -The matrix shows, in regard of each package, for which languages PO -files have been submitted to translation coordination, with a -translation percentage of at least 50%. - - Ready PO files af am an ar as ast az be bg bn bn_IN bs ca crh cs - +---------------------------------------------------+ - a2ps | [] [] [] | - aegis | | - anubis | | - aspell | [] [] [] | - bash | [] [] [] | - bfd | | - binutils | [] | - bison | | - bison-runtime | [] | - buzztrax | [] | - ccd2cue | | - ccide | | - cflow | | - clisp | | - coreutils | [] [] | - cpio | | - cppi | | - cpplib | [] | - cryptsetup | [] | - datamash | | - denemo | [] [] | - dfarc | [] | - dialog | [] [] [] | - dico | | - diffutils | [] | - dink | [] | - direvent | | - doodle | [] | - dos2unix | | - dos2unix-man | | - e2fsprogs | [] [] | - enscript | [] | - exif | [] | - fetchmail | [] [] | - findutils | [] | - flex | [] | - freedink | [] [] | - fusionforge | | - gas | | - gawk | [] | - gcal | [] | - gcc | | - gdbm | | - gettext-examples | [] [] [] [] [] | - gettext-runtime | [] [] [] | - gettext-tools | [] [] | - gjay | | - glunarclock | [] [] [] | - gnubiff | [] | - gnubik | [] | - gnucash | () () [] | - gnuchess | | - gnulib | [] | - gnunet | | - gnunet-gtk | | - gold | | - gphoto2 | [] | - gprof | [] | - gramadoir | | - grep | [] [] [] | - grub | [] | - gsasl | | - gss | | - gst-plugins-bad | [] [] | - gst-plugins-base | [] [] [] | - gst-plugins-good | [] [] [] | - gst-plugins-ugly | [] [] [] | - gstreamer | [] [] [] [] | - gtick | [] | - gtkam | [] [] | - gtkspell | [] [] [] [] [] | - guix | | - guix-packages | | - gutenprint | [] | - hello | [] | - help2man | | - help2man-texi | | - hylafax | | - idutils | | - iso_15924 | [] | - iso_3166 | [] [] [] [] [] [] [] [] [] [] | - iso_3166_2 | | - iso_4217 | [] | - iso_639 | [] [] [] [] [] [] [] [] [] | - iso_639_3 | [] [] | - iso_639_5 | | - jwhois | | - kbd | [] | - klavaro | [] [] [] [] [] | - ld | [] | - leafpad | [] [] [] [] | - libc | [] [] [] | - libexif | () | - libextractor | | - libgnutls | [] | - libgphoto2 | [] | - libgphoto2_port | [] | - libgsasl | | - libiconv | [] [] | - libidn | [] | - liferea | [] [] [] [] | - lilypond | [] [] | - lordsawar | [] | - lprng | | - lynx | [] [] | - m4 | [] | - mailfromd | | - mailutils | | - make | [] | - man-db | [] [] | - man-db-manpages | | - midi-instruments | [] [] [] | - minicom | [] | - mkisofs | [] | - myserver | [] | - nano | [] [] [] | - opcodes | | - parted | [] | - pies | | - pnmixer | | - popt | [] | - procps-ng | | - procps-ng-man | | - psmisc | [] | - pspp | [] | - pushover | [] | - pwdutils | | - pyspread | | - radius | [] | - recode | [] [] [] | - recutils | | - rpm | | - rush | | - sarg | | - sed | [] [] [] [] | - sharutils | [] | - shishi | | - skribilo | | - solfege | [] [] | - solfege-manual | | - spotmachine | | - sudo | [] [] | - sudoers | [] [] | - sysstat | [] | - tar | [] [] [] | - texinfo | [] [] | - texinfo_document | [] [] | - tigervnc | [] | - tin | | - tin-man | | - tracgoogleappsa... | | - trader | | - util-linux | [] | - ve | | - vice | | - vmm | | - vorbis-tools | [] | - wastesedge | | - wcd | | - wcd-man | | - wdiff | [] [] | - wget | [] | - wyslij-po | | - xboard | | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] | - +---------------------------------------------------+ - af am an ar as ast az be bg bn bn_IN bs ca crh cs - 4 0 2 5 3 11 0 8 25 3 3 1 55 4 74 - - da de el en en_GB en_ZA eo es et eu fa fi fr - +--------------------------------------------------+ - a2ps | [] [] [] [] [] [] [] [] [] | - aegis | [] [] [] [] | - anubis | [] [] [] [] [] | - aspell | [] [] [] [] [] [] [] | - bash | [] [] [] | - bfd | [] [] [] [] | - binutils | [] [] [] | - bison | [] [] [] [] [] [] [] [] | - bison-runtime | [] [] [] [] [] [] [] [] | - buzztrax | [] [] [] [] | - ccd2cue | [] [] [] [] | - ccide | [] [] [] [] [] [] | - cflow | [] [] [] [] [] | - clisp | [] [] [] [] [] | - coreutils | [] [] [] [] [] | - cpio | [] [] [] [] [] | - cppi | [] [] [] [] [] | - cpplib | [] [] [] [] [] [] | - cryptsetup | [] [] [] [] [] | - datamash | [] [] [] [] | - denemo | [] | - dfarc | [] [] [] [] [] [] | - dialog | [] [] [] [] [] [] [] [] [] | - dico | [] [] [] [] | - diffutils | [] [] [] [] [] [] | - dink | [] [] [] [] [] [] | - direvent | [] [] [] [] | - doodle | [] [] [] [] | - dos2unix | [] [] [] [] [] | - dos2unix-man | [] [] [] | - e2fsprogs | [] [] [] [] [] | - enscript | [] [] [] [] [] [] | - exif | [] [] [] [] [] [] | - fetchmail | [] () [] [] [] [] [] | - findutils | [] [] [] [] [] [] [] [] | - flex | [] [] [] [] [] [] | - freedink | [] [] [] [] [] [] [] [] | - fusionforge | [] [] [] | - gas | [] [] [] | - gawk | [] [] [] [] [] | - gcal | [] [] [] [] | - gcc | [] | - gdbm | [] [] [] [] [] | - gettext-examples | [] [] [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] [] | - gettext-tools | [] [] [] [] [] | - gjay | [] [] [] [] | - glunarclock | [] [] [] [] [] | - gnubiff | () [] [] () | - gnubik | [] [] [] [] [] | - gnucash | [] () () () () () () | - gnuchess | [] [] [] [] | - gnulib | [] [] [] [] [] [] [] | - gnunet | [] | - gnunet-gtk | [] | - gold | [] [] [] | - gphoto2 | [] () [] [] | - gprof | [] [] [] [] [] [] | - gramadoir | [] [] [] [] [] | - grep | [] [] [] [] [] [] [] | - grub | [] [] [] [] [] | - gsasl | [] [] [] [] [] | - gss | [] [] [] [] [] | - gst-plugins-bad | [] [] [] | - gst-plugins-base | [] [] [] [] [] [] | - gst-plugins-good | [] [] [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] [] [] [] | - gstreamer | [] [] [] [] [] [] [] | - gtick | [] () [] [] [] | - gtkam | [] () [] [] [] [] | - gtkspell | [] [] [] [] [] [] [] [] | - guix | [] [] | - guix-packages | | - gutenprint | [] [] [] [] | - hello | [] [] [] [] [] [] [] [] | - help2man | [] [] [] [] [] [] [] | - help2man-texi | [] [] [] | - hylafax | [] [] | - idutils | [] [] [] [] [] | - iso_15924 | [] () [] [] () [] () | - iso_3166 | [] () [] [] [] [] () [] () | - iso_3166_2 | [] () () () | - iso_4217 | [] () [] [] [] () [] () | - iso_639 | [] () [] [] () [] () | - iso_639_3 | () () () | - iso_639_5 | () () () | - jwhois | [] [] [] [] [] | - kbd | [] [] [] [] [] [] | - klavaro | [] [] [] [] [] [] [] | - ld | [] [] [] [] | - leafpad | [] [] [] [] [] [] [] [] | - libc | [] [] [] [] [] | - libexif | [] [] () [] [] | - libextractor | [] | - libgnutls | [] [] [] [] | - libgphoto2 | [] () [] | - libgphoto2_port | [] () [] [] [] [] | - libgsasl | [] [] [] [] [] | - libiconv | [] [] [] [] [] [] [] | - libidn | [] [] [] [] [] | - liferea | [] () [] [] [] [] [] | - lilypond | [] [] [] [] [] [] | - lordsawar | [] [] | - lprng | | - lynx | [] [] [] [] [] [] | - m4 | [] [] [] [] [] [] | - mailfromd | [] | - mailutils | [] [] [] [] | - make | [] [] [] [] [] | - man-db | [] [] [] [] | - man-db-manpages | [] [] | - midi-instruments | [] [] [] [] [] [] [] [] [] | - minicom | [] [] [] [] [] | - mkisofs | [] [] [] | - myserver | [] [] [] [] | - nano | [] [] [] [] [] [] [] | - opcodes | [] [] [] [] [] | - parted | [] [] [] | - pies | [] | - pnmixer | [] [] | - popt | [] [] [] [] [] [] | - procps-ng | [] [] | - procps-ng-man | [] [] | - psmisc | [] [] [] [] [] [] [] | - pspp | [] [] [] | - pushover | () [] [] [] | - pwdutils | [] [] [] | - pyspread | [] [] [] | - radius | [] [] | - recode | [] [] [] [] [] [] [] | - recutils | [] [] [] [] | - rpm | [] [] [] [] [] | - rush | [] [] [] | - sarg | [] [] | - sed | [] [] [] [] [] [] [] [] | - sharutils | [] [] [] [] | - shishi | [] [] [] | - skribilo | [] [] [] | - solfege | [] [] [] [] [] [] [] [] | - solfege-manual | [] [] [] [] [] | - spotmachine | [] [] [] [] [] | - sudo | [] [] [] [] [] [] | - sudoers | [] [] [] [] [] [] | - sysstat | [] [] [] [] [] [] | - tar | [] [] [] [] [] [] [] | - texinfo | [] [] [] [] [] | - texinfo_document | [] [] [] [] | - tigervnc | [] [] [] [] [] [] | - tin | [] [] [] [] | - tin-man | [] | - tracgoogleappsa... | [] [] [] [] [] | - trader | [] [] [] [] [] [] | - util-linux | [] [] [] [] | - ve | [] [] [] [] [] | - vice | () () () | - vmm | [] [] | - vorbis-tools | [] [] [] [] | - wastesedge | [] | - wcd | [] [] [] [] | - wcd-man | [] | - wdiff | [] [] [] [] [] [] [] | - wget | [] [] [] [] [] [] | - wyslij-po | [] [] [] [] | - xboard | [] [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] [] [] [] [] | - +--------------------------------------------------+ - da de el en en_GB en_ZA eo es et eu fa fi fr - 119 131 32 1 6 0 94 95 22 13 4 102 139 - - ga gd gl gu he hi hr hu hy ia id is it ja ka kk - +-------------------------------------------------+ - a2ps | [] [] [] [] | - aegis | [] | - anubis | [] [] [] [] | - aspell | [] [] [] [] [] | - bash | [] [] [] [] | - bfd | [] [] | - binutils | [] [] [] | - bison | [] | - bison-runtime | [] [] [] [] [] [] [] [] | - buzztrax | | - ccd2cue | [] | - ccide | [] [] | - cflow | [] [] [] | - clisp | | - coreutils | [] [] | - cpio | [] [] [] [] [] [] | - cppi | [] [] [] [] [] | - cpplib | [] [] | - cryptsetup | [] | - datamash | | - denemo | [] | - dfarc | [] [] [] | - dialog | [] [] [] [] [] [] [] [] [] [] | - dico | | - diffutils | [] [] [] [] | - dink | [] | - direvent | [] | - doodle | [] [] | - dos2unix | [] [] | - dos2unix-man | | - e2fsprogs | [] [] | - enscript | [] [] [] | - exif | [] [] [] [] [] [] | - fetchmail | [] [] [] | - findutils | [] [] [] [] [] [] [] | - flex | [] | - freedink | [] [] [] [] | - fusionforge | | - gas | [] | - gawk | [] () [] | - gcal | | - gcc | | - gdbm | | - gettext-examples | [] [] [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] [] [] | - gettext-tools | [] [] [] | - gjay | [] | - glunarclock | [] [] [] [] [] [] | - gnubiff | [] [] () | - gnubik | [] [] [] | - gnucash | () () () () () | - gnuchess | | - gnulib | [] [] [] [] [] | - gnunet | | - gnunet-gtk | | - gold | [] [] | - gphoto2 | [] [] [] [] | - gprof | [] [] [] [] | - gramadoir | [] [] [] | - grep | [] [] [] [] [] [] [] | - grub | [] [] [] | - gsasl | [] [] [] [] [] | - gss | [] [] [] [] [] | - gst-plugins-bad | [] [] [] | - gst-plugins-base | [] [] [] [] | - gst-plugins-good | [] [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] [] | - gstreamer | [] [] [] [] [] | - gtick | [] [] [] [] [] | - gtkam | [] [] [] [] [] | - gtkspell | [] [] [] [] [] [] [] [] [] [] | - guix | | - guix-packages | | - gutenprint | [] [] [] | - hello | [] [] [] [] [] | - help2man | [] [] [] | - help2man-texi | | - hylafax | [] | - idutils | [] [] | - iso_15924 | [] [] [] [] [] [] | - iso_3166 | [] [] [] [] [] [] [] [] [] [] [] [] [] | - iso_3166_2 | [] [] | - iso_4217 | [] [] [] [] [] [] | - iso_639 | [] [] [] [] [] [] [] [] [] | - iso_639_3 | [] [] | - iso_639_5 | | - jwhois | [] [] [] [] | - kbd | [] [] [] | - klavaro | [] [] [] [] [] | - ld | [] [] [] [] | - leafpad | [] [] [] [] [] [] [] () | - libc | [] [] [] [] [] | - libexif | [] | - libextractor | | - libgnutls | [] | - libgphoto2 | [] [] | - libgphoto2_port | [] [] | - libgsasl | [] [] [] [] | - libiconv | [] [] [] [] [] [] [] | - libidn | [] [] [] [] | - liferea | [] [] [] [] [] | - lilypond | [] | - lordsawar | | - lprng | [] | - lynx | [] [] [] [] | - m4 | [] [] [] [] [] | - mailfromd | | - mailutils | | - make | [] [] [] [] | - man-db | [] [] | - man-db-manpages | [] [] | - midi-instruments | [] [] [] [] [] [] [] [] [] | - minicom | [] [] [] | - mkisofs | [] [] | - myserver | [] | - nano | [] [] [] [] [] [] | - opcodes | [] [] [] | - parted | [] [] [] [] [] | - pies | | - pnmixer | [] [] | - popt | [] [] [] [] [] [] [] [] [] [] | - procps-ng | | - procps-ng-man | | - psmisc | [] [] [] [] | - pspp | [] [] | - pushover | [] | - pwdutils | [] | - pyspread | | - radius | [] | - recode | [] [] [] [] [] [] [] | - recutils | | - rpm | [] | - rush | [] | - sarg | | - sed | [] [] [] [] [] [] [] | - sharutils | | - shishi | | - skribilo | [] | - solfege | [] [] | - solfege-manual | | - spotmachine | | - sudo | [] [] [] [] | - sudoers | [] [] [] | - sysstat | [] [] [] [] | - tar | [] [] [] [] [] [] | - texinfo | [] [] [] | - texinfo_document | [] [] [] | - tigervnc | | - tin | | - tin-man | | - tracgoogleappsa... | [] [] [] [] | - trader | [] [] | - util-linux | [] | - ve | [] | - vice | () () | - vmm | | - vorbis-tools | [] [] | - wastesedge | [] | - wcd | | - wcd-man | | - wdiff | [] [] [] | - wget | [] [] [] [] | - wyslij-po | [] [] [] | - xboard | | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] [] [] [] | - +-------------------------------------------------+ - ga gd gl gu he hi hr hu hy ia id is it ja ka kk - 35 2 47 4 8 2 60 71 2 6 81 11 87 57 0 3 - - kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl - +--------------------------------------------------+ - a2ps | [] [] | - aegis | [] | - anubis | [] [] [] | - aspell | [] [] | - bash | [] [] | - bfd | | - binutils | | - bison | [] | - bison-runtime | [] [] [] [] [] [] | - buzztrax | | - ccd2cue | | - ccide | [] [] | - cflow | [] | - clisp | [] | - coreutils | [] [] | - cpio | [] | - cppi | | - cpplib | [] | - cryptsetup | [] | - datamash | [] [] | - denemo | | - dfarc | [] [] | - dialog | [] [] [] [] [] [] | - dico | | - diffutils | [] [] [] | - dink | [] | - direvent | [] | - doodle | [] | - dos2unix | [] [] | - dos2unix-man | [] | - e2fsprogs | [] | - enscript | [] | - exif | [] [] [] | - fetchmail | [] | - findutils | [] [] | - flex | [] | - freedink | [] [] | - fusionforge | | - gas | | - gawk | [] | - gcal | | - gcc | | - gdbm | | - gettext-examples | [] [] [] [] [] [] | - gettext-runtime | [] [] [] | - gettext-tools | [] | - gjay | | - glunarclock | [] [] | - gnubiff | [] | - gnubik | [] [] | - gnucash | () () () () () () () [] | - gnuchess | [] [] | - gnulib | [] | - gnunet | | - gnunet-gtk | | - gold | | - gphoto2 | [] | - gprof | [] [] | - gramadoir | [] | - grep | [] [] | - grub | [] [] [] | - gsasl | [] | - gss | | - gst-plugins-bad | [] [] [] | - gst-plugins-base | [] [] [] | - gst-plugins-good | [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] | - gstreamer | [] [] [] | - gtick | [] | - gtkam | [] [] | - gtkspell | [] [] [] [] [] [] [] | - guix | | - guix-packages | | - gutenprint | [] | - hello | [] [] [] | - help2man | [] | - help2man-texi | | - hylafax | [] | - idutils | [] | - iso_15924 | () [] [] | - iso_3166 | [] [] [] () [] [] [] [] [] [] | - iso_3166_2 | () [] | - iso_4217 | () [] [] [] | - iso_639 | [] [] () [] [] [] [] | - iso_639_3 | [] () [] | - iso_639_5 | () | - jwhois | [] [] | - kbd | [] | - klavaro | [] [] | - ld | | - leafpad | [] [] [] [] [] | - libc | [] [] | - libexif | [] | - libextractor | [] | - libgnutls | [] [] | - libgphoto2 | [] | - libgphoto2_port | [] | - libgsasl | [] | - libiconv | [] [] | - libidn | [] | - liferea | [] [] [] | - lilypond | [] | - lordsawar | | - lprng | | - lynx | [] | - m4 | [] | - mailfromd | | - mailutils | | - make | [] [] | - man-db | [] | - man-db-manpages | [] | - midi-instruments | [] [] [] [] [] [] [] | - minicom | [] | - mkisofs | [] | - myserver | | - nano | [] [] [] | - opcodes | [] | - parted | [] [] | - pies | | - pnmixer | [] | - popt | [] [] [] [] [] | - procps-ng | | - procps-ng-man | | - psmisc | [] | - pspp | [] [] | - pushover | | - pwdutils | [] | - pyspread | | - radius | [] | - recode | [] [] | - recutils | [] | - rpm | [] | - rush | [] | - sarg | | - sed | [] [] | - sharutils | [] | - shishi | | - skribilo | | - solfege | [] [] | - solfege-manual | [] | - spotmachine | [] | - sudo | [] [] [] | - sudoers | [] [] [] | - sysstat | [] [] | - tar | [] [] [] | - texinfo | [] | - texinfo_document | [] | - tigervnc | [] | - tin | | - tin-man | | - tracgoogleappsa... | [] [] [] | - trader | [] | - util-linux | [] | - ve | [] | - vice | [] | - vmm | [] | - vorbis-tools | [] | - wastesedge | [] | - wcd | [] | - wcd-man | [] | - wdiff | [] | - wget | [] [] | - wyslij-po | [] | - xboard | [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] | - +--------------------------------------------------+ - kn ko ku ky lg lt lv mk ml mn mr ms mt nb ne nl - 5 15 4 6 0 13 23 3 3 3 4 11 2 42 1 125 - - nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr - +------------------------------------------------+ - a2ps | [] [] [] [] [] [] [] | - aegis | [] [] | - anubis | [] [] [] | - aspell | [] [] [] [] [] [] [] | - bash | [] [] [] [] [] [] | - bfd | [] [] | - binutils | [] [] | - bison | [] [] [] | - bison-runtime | [] [] [] [] [] [] [] [] | - buzztrax | [] | - ccd2cue | [] [] | - ccide | [] [] [] | - cflow | [] [] [] | - clisp | [] | - coreutils | [] [] [] [] | - cpio | [] [] [] | - cppi | [] [] [] | - cpplib | [] [] [] | - cryptsetup | [] [] [] | - datamash | [] [] | - denemo | | - dfarc | [] [] [] | - dialog | [] [] [] [] [] [] [] | - dico | [] | - diffutils | [] [] [] | - dink | | - direvent | [] [] [] | - doodle | [] [] | - dos2unix | [] [] [] [] | - dos2unix-man | [] [] | - e2fsprogs | [] | - enscript | [] [] [] [] [] [] | - exif | [] [] [] [] [] [] | - fetchmail | [] [] [] | - findutils | [] [] [] [] [] [] | - flex | [] [] [] [] [] | - freedink | [] [] [] [] [] | - fusionforge | | - gas | | - gawk | [] | - gcal | | - gcc | | - gdbm | [] [] [] | - gettext-examples | [] [] [] [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] [] [] [] [] | - gettext-tools | [] [] [] [] [] [] [] | - gjay | [] | - glunarclock | [] [] [] [] [] [] | - gnubiff | [] | - gnubik | [] [] [] [] | - gnucash | () () () () () [] | - gnuchess | [] [] | - gnulib | [] [] [] [] [] | - gnunet | | - gnunet-gtk | | - gold | | - gphoto2 | [] [] [] [] [] | - gprof | [] [] [] [] | - gramadoir | [] [] | - grep | [] [] [] [] [] [] | - grub | [] [] [] [] [] | - gsasl | [] [] [] | - gss | [] [] [] [] | - gst-plugins-bad | [] [] [] [] [] | - gst-plugins-base | [] [] [] [] [] [] | - gst-plugins-good | [] [] [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] [] [] | - gstreamer | [] [] [] [] [] [] [] | - gtick | [] [] [] [] [] | - gtkam | [] [] [] [] [] [] | - gtkspell | [] [] [] [] [] [] [] [] [] | - guix | | - guix-packages | | - gutenprint | [] [] | - hello | [] [] [] [] [] [] | - help2man | [] [] [] [] | - help2man-texi | [] | - hylafax | | - idutils | [] [] [] | - iso_15924 | [] () [] [] [] [] | - iso_3166 | [] [] [] [] () [] [] [] [] [] [] [] [] | - iso_3166_2 | [] () [] | - iso_4217 | [] [] () [] [] [] [] [] | - iso_639 | [] [] [] () [] [] [] [] [] [] | - iso_639_3 | [] () | - iso_639_5 | () [] | - jwhois | [] [] [] [] | - kbd | [] [] | - klavaro | [] [] [] [] [] | - ld | | - leafpad | [] [] [] [] [] [] [] [] | - libc | [] [] [] | - libexif | [] () [] | - libextractor | [] | - libgnutls | [] | - libgphoto2 | [] | - libgphoto2_port | [] [] [] [] [] | - libgsasl | [] [] [] [] | - libiconv | [] [] [] [] [] | - libidn | [] [] [] | - liferea | [] [] [] [] () [] [] | - lilypond | | - lordsawar | | - lprng | [] | - lynx | [] [] | - m4 | [] [] [] [] [] | - mailfromd | [] | - mailutils | [] | - make | [] [] [] | - man-db | [] [] [] | - man-db-manpages | [] [] [] | - midi-instruments | [] [] [] [] [] [] [] [] | - minicom | [] [] [] [] | - mkisofs | [] [] [] | - myserver | [] [] | - nano | [] [] [] [] [] [] | - opcodes | | - parted | [] [] [] [] [] [] | - pies | [] | - pnmixer | [] | - popt | [] [] [] [] [] [] | - procps-ng | [] | - procps-ng-man | [] | - psmisc | [] [] [] [] | - pspp | [] [] | - pushover | | - pwdutils | [] | - pyspread | [] [] | - radius | [] [] | - recode | [] [] [] [] [] [] [] [] | - recutils | [] [] | - rpm | [] | - rush | [] [] [] | - sarg | [] [] | - sed | [] [] [] [] [] [] [] [] | - sharutils | [] [] [] | - shishi | [] [] | - skribilo | [] | - solfege | [] [] [] | - solfege-manual | [] [] | - spotmachine | [] [] | - sudo | [] [] [] [] [] [] | - sudoers | [] [] [] [] | - sysstat | [] [] [] [] [] | - tar | [] [] [] [] [] | - texinfo | [] [] [] | - texinfo_document | [] [] | - tigervnc | [] [] [] | - tin | [] | - tin-man | | - tracgoogleappsa... | [] [] [] [] | - trader | [] [] | - util-linux | [] [] | - ve | [] [] [] | - vice | | - vmm | | - vorbis-tools | [] [] [] | - wastesedge | | - wcd | | - wcd-man | | - wdiff | [] [] [] [] [] | - wget | [] [] [] [] [] | - wyslij-po | [] [] [] [] | - xboard | [] [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] [] | - +------------------------------------------------+ - nn or pa pl ps pt pt_BR ro ru rw sk sl sq sr - 7 3 6 114 1 12 88 32 82 3 40 45 7 101 - - sv sw ta te tg th tr uk ur vi wa wo zh_CN - +----------------------------------------------+ - a2ps | [] [] [] [] [] | - aegis | [] | - anubis | [] [] [] [] | - aspell | [] [] [] [] [] | - bash | [] [] [] [] | - bfd | [] [] [] | - binutils | [] [] [] | - bison | [] [] [] [] | - bison-runtime | [] [] [] [] [] [] | - buzztrax | [] [] [] | - ccd2cue | [] [] [] | - ccide | [] [] [] [] | - cflow | [] [] [] [] | - clisp | | - coreutils | [] [] [] | - cpio | [] [] [] [] [] | - cppi | [] [] [] [] | - cpplib | [] [] [] [] [] | - cryptsetup | [] [] [] | - datamash | [] [] [] | - denemo | [] | - dfarc | [] [] | - dialog | [] [] [] [] [] [] | - dico | [] | - diffutils | [] [] [] [] [] | - dink | [] | - direvent | [] [] | - doodle | [] [] | - dos2unix | [] [] [] [] | - dos2unix-man | [] [] [] | - e2fsprogs | [] [] [] [] | - enscript | [] [] [] [] | - exif | [] [] [] [] [] | - fetchmail | [] [] [] [] | - findutils | [] [] [] [] [] | - flex | [] [] [] [] | - freedink | [] [] [] | - fusionforge | | - gas | [] | - gawk | [] [] [] | - gcal | [] [] [] | - gcc | [] | - gdbm | [] [] | - gettext-examples | [] [] [] [] [] | - gettext-runtime | [] [] [] [] [] | - gettext-tools | [] [] [] [] [] | - gjay | [] [] [] | - glunarclock | [] [] [] [] | - gnubiff | [] [] | - gnubik | [] [] [] [] | - gnucash | () () () () [] | - gnuchess | [] [] [] | - gnulib | [] [] [] [] | - gnunet | | - gnunet-gtk | | - gold | [] [] | - gphoto2 | [] [] [] [] | - gprof | [] [] [] [] | - gramadoir | [] [] [] | - grep | [] [] [] [] [] | - grub | [] [] [] [] | - gsasl | [] [] [] [] | - gss | [] [] [] | - gst-plugins-bad | [] [] [] [] [] | - gst-plugins-base | [] [] [] [] [] | - gst-plugins-good | [] [] [] [] [] | - gst-plugins-ugly | [] [] [] [] [] | - gstreamer | [] [] [] [] [] | - gtick | [] [] [] | - gtkam | [] [] [] [] | - gtkspell | [] [] [] [] [] [] [] | - guix | | - guix-packages | | - gutenprint | [] [] [] [] | - hello | [] [] [] [] [] [] | - help2man | [] [] [] | - help2man-texi | [] | - hylafax | [] | - idutils | [] [] [] | - iso_15924 | [] () [] [] () [] | - iso_3166 | [] [] () [] [] () [] [] | - iso_3166_2 | () [] [] () [] | - iso_4217 | [] () [] [] () [] | - iso_639 | [] [] [] () [] [] () [] [] | - iso_639_3 | [] () [] [] () | - iso_639_5 | () [] () | - jwhois | [] [] [] [] | - kbd | [] [] [] [] | - klavaro | [] [] [] [] [] [] | - ld | [] [] [] [] [] | - leafpad | [] [] [] [] [] [] | - libc | [] [] [] [] [] | - libexif | [] [] () | - libextractor | [] [] | - libgnutls | [] [] [] [] | - libgphoto2 | [] [] [] | - libgphoto2_port | [] [] [] [] | - libgsasl | [] [] [] [] | - libiconv | [] [] [] [] [] | - libidn | () [] [] [] | - liferea | [] [] [] [] [] | - lilypond | [] | - lordsawar | | - lprng | [] | - lynx | [] [] [] [] | - m4 | [] [] [] | - mailfromd | [] [] | - mailutils | [] | - make | [] [] [] [] | - man-db | [] [] [] | - man-db-manpages | [] [] | - midi-instruments | [] [] [] [] [] [] | - minicom | [] [] | - mkisofs | [] [] [] | - myserver | [] | - nano | [] [] [] [] | - opcodes | [] [] [] | - parted | [] [] [] [] [] | - pies | [] [] | - pnmixer | [] [] [] | - popt | [] [] [] [] [] [] [] | - procps-ng | [] [] | - procps-ng-man | [] | - psmisc | [] [] [] [] | - pspp | [] [] [] | - pushover | [] | - pwdutils | [] [] | - pyspread | [] | - radius | [] [] | - recode | [] [] [] [] | - recutils | [] [] [] | - rpm | [] [] [] [] | - rush | [] [] | - sarg | | - sed | [] [] [] [] [] | - sharutils | [] [] [] [] | - shishi | [] [] | - skribilo | [] [] | - solfege | [] [] [] [] | - solfege-manual | [] | - spotmachine | [] [] [] | - sudo | [] [] [] [] [] | - sudoers | [] [] [] [] | - sysstat | [] [] [] [] [] | - tar | [] [] [] [] [] | - texinfo | [] [] [] | - texinfo_document | [] | - tigervnc | [] [] [] | - tin | [] | - tin-man | | - tracgoogleappsa... | [] [] [] [] [] | - trader | [] | - util-linux | [] [] [] [] | - ve | [] [] [] [] | - vice | () () | - vmm | | - vorbis-tools | [] [] | - wastesedge | | - wcd | [] [] [] | - wcd-man | [] | - wdiff | [] [] [] [] | - wget | [] [] [] | - wyslij-po | [] [] | - xboard | [] [] | - xdg-user-dirs | [] [] [] [] [] [] [] [] | - xkeyboard-config | [] [] [] [] | - +----------------------------------------------+ - sv sw ta te tg th tr uk ur vi wa wo zh_CN - 106 1 4 3 0 13 51 115 1 125 7 1 100 - - zh_HK zh_TW - +-------------+ - a2ps | | 30 - aegis | | 9 - anubis | | 19 - aspell | | 29 - bash | [] | 23 - bfd | | 11 - binutils | | 12 - bison | [] | 18 - bison-runtime | [] | 38 - buzztrax | | 9 - ccd2cue | | 10 - ccide | | 17 - cflow | | 16 - clisp | | 10 - coreutils | | 18 - cpio | | 20 - cppi | | 17 - cpplib | [] | 19 - cryptsetup | | 14 - datamash | | 11 - denemo | | 5 - dfarc | | 17 - dialog | [] | 42 - dico | | 6 - diffutils | | 22 - dink | | 10 - direvent | | 11 - doodle | | 12 - dos2unix | [] | 18 - dos2unix-man | | 9 - e2fsprogs | | 15 - enscript | | 21 - exif | | 27 - fetchmail | | 19 - findutils | | 29 - flex | [] | 19 - freedink | | 24 - fusionforge | | 3 - gas | | 5 - gawk | | 13 - gcal | | 8 - gcc | | 2 - gdbm | | 10 - gettext-examples | [] [] | 40 - gettext-runtime | [] [] | 35 - gettext-tools | [] | 24 - gjay | | 9 - glunarclock | [] | 27 - gnubiff | | 9 - gnubik | | 19 - gnucash | () | 6 - gnuchess | | 11 - gnulib | | 23 - gnunet | | 1 - gnunet-gtk | | 1 - gold | | 7 - gphoto2 | [] | 19 - gprof | | 21 - gramadoir | | 14 - grep | [] | 31 - grub | | 21 - gsasl | [] | 19 - gss | | 17 - gst-plugins-bad | | 21 - gst-plugins-base | | 27 - gst-plugins-good | | 32 - gst-plugins-ugly | | 34 - gstreamer | [] | 32 - gtick | | 19 - gtkam | | 24 - gtkspell | [] [] | 48 - guix | | 2 - guix-packages | | 0 - gutenprint | | 15 - hello | [] | 30 - help2man | | 18 - help2man-texi | | 5 - hylafax | | 5 - idutils | | 14 - iso_15924 | [] | 23 - iso_3166 | [] [] | 58 - iso_3166_2 | | 9 - iso_4217 | [] [] | 28 - iso_639 | [] [] | 46 - iso_639_3 | | 10 - iso_639_5 | | 2 - jwhois | [] | 20 - kbd | | 17 - klavaro | | 30 - ld | [] | 15 - leafpad | [] | 39 - libc | [] | 24 - libexif | | 10 - libextractor | | 5 - libgnutls | | 13 - libgphoto2 | | 10 - libgphoto2_port | [] | 19 - libgsasl | | 18 - libiconv | [] | 29 - libidn | | 17 - liferea | | 29 - lilypond | | 11 - lordsawar | | 3 - lprng | | 3 - lynx | | 19 - m4 | [] | 22 - mailfromd | | 4 - mailutils | | 6 - make | | 19 - man-db | | 15 - man-db-manpages | | 10 - midi-instruments | [] | 43 - minicom | [] | 17 - mkisofs | | 13 - myserver | | 9 - nano | [] | 30 - opcodes | | 12 - parted | [] | 23 - pies | | 4 - pnmixer | | 9 - popt | [] | 36 - procps-ng | | 5 - procps-ng-man | | 4 - psmisc | [] | 22 - pspp | | 13 - pushover | | 6 - pwdutils | | 8 - pyspread | | 6 - radius | | 9 - recode | | 31 - recutils | | 10 - rpm | [] | 13 - rush | | 10 - sarg | | 4 - sed | [] | 35 - sharutils | | 13 - shishi | | 7 - skribilo | | 7 - solfege | | 21 - solfege-manual | | 9 - spotmachine | | 11 - sudo | | 26 - sudoers | | 22 - sysstat | | 23 - tar | [] | 30 - texinfo | | 17 - texinfo_document | | 13 - tigervnc | | 14 - tin | [] | 7 - tin-man | | 1 - tracgoogleappsa... | [] | 22 - trader | | 12 - util-linux | | 13 - ve | | 14 - vice | | 1 - vmm | | 3 - vorbis-tools | | 13 - wastesedge | | 3 - wcd | | 8 - wcd-man | | 3 - wdiff | [] | 23 - wget | | 21 - wyslij-po | | 14 - xboard | | 10 - xdg-user-dirs | [] [] | 68 - xkeyboard-config | [] | 28 - +-------------+ - 89 teams zh_HK zh_TW - 166 domains 7 42 2809 - - Some counters in the preceding matrix are higher than the number of -visible blocks let us expect. This is because a few extra PO files are -used for implementing regional variants of languages, or language -dialects. - - For a PO file in the matrix above to be effective, the package to -which it applies should also have been internationalized and distributed -as such by its maintainer. There might be an observable lag between the -mere existence a PO file and its wide availability in a distribution. - - If Jun 2014 seems to be old, you may fetch a more recent copy of this -'ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix -with full percentage details can be found at -'http://translationproject.org/extra/matrix.html'. - -1.5 Using 'gettext' in new packages -=================================== - -If you are writing a freely available program and want to -internationalize it you are welcome to use GNU 'gettext' in your -package. Of course you have to respect the GNU Lesser General Public -License which covers the use of the GNU 'gettext' library. This means -in particular that even non-free programs can use 'libintl' as a shared -library, whereas only free software can use 'libintl' as a static -library or use modified versions of 'libintl'. - - Once the sources are changed appropriately and the setup can handle -the use of 'gettext' the only thing missing are the translations. The -Free Translation Project is also available for packages which are not -developed inside the GNU project. Therefore the information given above -applies also for every other Free Software Project. Contact -'coordinator@translationproject.org' to make the '.pot' files available -to the translation teams. + diff -Nru alsa-utils-1.2.2/Makefile.am alsa-utils-1.2.6/Makefile.am --- alsa-utils-1.2.2/Makefile.am 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/Makefile.am 2021-12-06 10:17:28.000000000 +0000 @@ -32,7 +32,7 @@ SUBDIRS += topology endif -EXTRA_DIST= config.rpath README.md TODO gitcompile +EXTRA_DIST= README.md TODO gitcompile AUTOMAKE_OPTIONS=foreign ACLOCAL_AMFLAGS = -I m4 diff -Nru alsa-utils-1.2.2/Makefile.in alsa-utils-1.2.6/Makefile.in --- alsa-utils-1.2.2/Makefile.in 2020-02-19 12:07:14.000000000 +0000 +++ alsa-utils-1.2.6/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -100,7 +100,8 @@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -277,8 +278,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -358,6 +359,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -374,7 +376,7 @@ $(am__append_2) $(am__append_3) $(am__append_4) \ $(am__append_5) $(am__append_6) $(am__append_7) \ $(am__append_8) $(am__append_9) $(am__append_10) -EXTRA_DIST = config.rpath README.md TODO gitcompile +EXTRA_DIST = README.md TODO gitcompile AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = \ @@ -611,6 +613,10 @@ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) +dist-zstd: distdir + tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst + $(am__post_remove_distdir) + dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @@ -653,6 +659,8 @@ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ + *.tar.zst*) \ + zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) @@ -831,17 +839,17 @@ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic distclean-tags \ - distcleancheck distdir distuninstallcheck dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-data-hook install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am + dist-zip dist-zstd distcheck distclean distclean-generic \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-data-hook install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ + tags-am uninstall uninstall-am .PRECIOUS: Makefile diff -Nru alsa-utils-1.2.2/aclocal.m4 alsa-utils-1.2.6/aclocal.m4 --- alsa-utils-1.2.2/aclocal.m4 2020-02-19 12:07:13.000000000 +0000 +++ alsa-utils-1.2.6/aclocal.m4 2021-12-06 11:44:43.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.1 -*- Autoconf -*- +# generated automatically by aclocal 1.16.2 -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -103,12 +103,11 @@ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` AC_MSG_RESULT($alsa_min_major_version.$alsa_min_minor_version.$alsa_min_micro_version) -AC_LANG_SAVE -AC_LANG_C +AC_LANG_PUSH([C]) AC_MSG_CHECKING([for libasound headers version >= $alsa_min_major_version.$alsa_min_minor_version.$alsa_min_micro_version ($min_alsa_version)]) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include -], [ +]], [[ /* ensure backward compatibility */ #if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR) #define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR @@ -140,21 +139,20 @@ # endif # endif exit(0); -], +]])], [AC_MSG_RESULT(found.)], [AC_MSG_RESULT(not present.) ifelse([$3], , [AC_MSG_ERROR(Sufficiently new version of libasound not found.)]) alsa_found=no] ) -AC_LANG_RESTORE +AC_LANG_POP([C]) -AC_LANG_SAVE -AC_LANG_C +AC_LANG_PUSH([C]) AC_MSG_CHECKING([for libatopology (sound headers version > 1.1.9)]) -AC_TRY_COMPILE([ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #include -], [ +]], [[ /* ensure backward compatibility */ #if !defined(SND_LIB_VERSION) #define SND_LIB_VERSION 0 @@ -165,13 +163,12 @@ # error not present #endif exit(0); -], +]])], [AC_MSG_RESULT(yes) enable_atopology="yes"], [AC_MSG_RESULT(no)] ) -AC_LANG_RESTORE - +AC_LANG_POP([C]) fi dnl Now that we know that we have the right version, let's see if we have the library and not just the headers. @@ -225,63 +222,6 @@ AC_SUBST(ALSA_TOPOLOGY_LIBS) ]) -# intlmacosx.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Checks for special options needed on Mac OS X. -dnl Defines INTL_MACOSX_LIBS. -AC_DEFUN([gt_INTL_MACOSX], -[ - dnl Check for API introduced in Mac OS X 10.2. - AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - [gt_cv_func_CFPreferencesCopyAppValue], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[CFPreferencesCopyAppValue(NULL, NULL)]])], - [gt_cv_func_CFPreferencesCopyAppValue=yes], - [gt_cv_func_CFPreferencesCopyAppValue=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], - [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) - fi - dnl Check for API introduced in Mac OS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[CFLocaleCopyCurrent();]])], - [gt_cv_func_CFLocaleCopyCurrent=yes], - [gt_cv_func_CFLocaleCopyCurrent=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], - [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - AC_SUBST([INTL_MACOSX_LIBS]) -]) - # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 11 (pkg-config-0.29.1) @@ -626,7 +566,7 @@ [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -641,7 +581,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.1], [], +m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -657,14 +597,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.1])dnl +[AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -716,7 +656,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -747,7 +687,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -938,7 +878,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -977,7 +917,9 @@ done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE="gmake" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -1004,7 +946,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1201,7 +1143,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1222,7 +1164,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1244,7 +1186,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1279,7 +1221,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1322,7 +1264,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1361,7 +1303,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1390,7 +1332,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1437,7 +1379,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1456,7 +1398,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1537,7 +1479,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1597,7 +1539,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1625,7 +1567,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1644,7 +1586,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2018 Free Software Foundation, Inc. +# Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1776,7 +1718,9 @@ ]) # _AM_PROG_TAR m4_include([m4/gettext.m4]) +m4_include([m4/host-cpu-c-abi.m4]) m4_include([m4/iconv.m4]) +m4_include([m4/intlmacosx.m4]) m4_include([m4/lib-ld.m4]) m4_include([m4/lib-link.m4]) m4_include([m4/lib-prefix.m4]) diff -Nru alsa-utils-1.2.2/alsa-info/Makefile.in alsa-utils-1.2.6/alsa-info/Makefile.in --- alsa-utils-1.2.2/alsa-info/Makefile.in 2020-02-19 12:07:14.000000000 +0000 +++ alsa-utils-1.2.6/alsa-info/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,7 +91,8 @@ subdir = alsa-info ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -215,8 +216,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -296,6 +297,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/alsa-info/alsa-info.sh alsa-utils-1.2.6/alsa-info/alsa-info.sh --- alsa-utils-1.2.2/alsa-info/alsa-info.sh 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsa-info/alsa-info.sh 2021-12-06 10:17:28.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/bash -SCRIPT_VERSION=0.4.64 -CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog" +SCRIPT_VERSION=0.5.1 +CHANGELOG="https://www.alsa-project.org/alsa-info.sh.changelog" ################################################################################# #Copyright (C) 2007 Free Software Foundation. @@ -34,8 +34,8 @@ BGTITLE="ALSA-Info v $SCRIPT_VERSION" PASTEBINKEY="C9cRIO8m/9y8Cs0nVs0FraRx7U0pHsuc" -WGET=$(which wget 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null) -REQUIRES="mktemp grep pgrep whereis awk date uname cat sort dmesg amixer alsactl" +WGET=$(command -v wget) +REQUIRES="mktemp grep pgrep awk date uname cat sort dmesg amixer alsactl" # # Define some simple functions @@ -45,7 +45,7 @@ test -z "$WGET" -o ! -x "$WGET" && return SHFILE=$(mktemp -t alsa-info.XXXXXXXXXX) || exit 1 - wget -O $SHFILE "http://www.alsa-project.org/alsa-info.sh" >/dev/null 2>&1 + wget -O $SHFILE "https://www.alsa-project.org/alsa-info.sh" >/dev/null 2>&1 REMOTE_VERSION=$(grep SCRIPT_VERSION $SHFILE | head -n1 | sed 's/.*=//') if [ -s "$SHFILE" -a "$REMOTE_VERSION" != "$SCRIPT_VERSION" ]; then if [[ -n $DIALOG ]] @@ -233,11 +233,30 @@ echo "!!ALSA/HDA dmesg" >> $FILE echo "!!--------------" >> $FILE echo "" >> $FILE - dmesg | grep -C1 -E 'ALSA|HDA|HDMI|snd[_-]|sound|hda.codec|hda.intel' >> $FILE + dmesg | grep -C1 -E 'ALSA|HDA|HDMI|snd[_-]|sound|audio|hda.codec|hda.intel' >> $FILE echo "" >> $FILE echo "" >> $FILE } +withpackages() { + local RPM + local DPKG + RPM="$(command -v rpmquery)" + DPKG="$(command -v dpkg)" + [ -n "$RPM$DPKG" ] || return + local PATTERN='(alsa-(lib|oss|plugins|tools|(topology|ucm)-conf|utils|sof-firmware)|libalsa|tinycompress|sof-firmware)' + { + echo "!!Packages installed" + echo "!!--------------------" + echo "" + { + if [ -x "$RPM" ]; then "$RPM" -a; fi + if [ -x "$DPKG" ]; then "$DPKG" -l; fi + } | grep -E "$PATTERN" + echo "" + } >> "$FILE" +} + withall() { withdevices withconfigs @@ -247,6 +266,7 @@ withmodules withsysfs withdmesg + withpackages WITHALL="no" } @@ -258,7 +278,7 @@ . /etc/lsb-release case "$DISTRIB_ID" in Ubuntu) - if which dpkg > /dev/null ; then + if command -v dpkg > /dev/null ; then ALSA_LIB_VERSION=$(dpkg -l libasound2 | tail -1 | awk '{ print $3 }' | cut -f 1 -d -) fi @@ -272,7 +292,7 @@ ;; esac elif [ -f /etc/debian_version ]; then - if which dpkg > /dev/null ; then + if command -v dpkg > /dev/null ; then ALSA_LIB_VERSION=$(dpkg -l libasound2 | tail -1 | awk '{ print $3 }' | cut -f 1 -d -) fi @@ -286,7 +306,7 @@ # Basic requires for prg in $REQUIRES; do - t=$(which $prg 2> /dev/null) + t=$(command -v $prg) if test -z "$t"; then echo "This script requires $prg utility to continue." exit 1 @@ -294,15 +314,15 @@ done # Run checks to make sure the programs we need are installed. -LSPCI=$(which lspci 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null); -TPUT=$(which tput 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null); -DIALOG=$(which dialog 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null); +LSPCI="$(command -v lspci)" +TPUT="$(command -v tput)" +DIALOG="$(command -v dialog)" # Check to see if sysfs is enabled in the kernel. We'll need this later on SYSFS=$(mount | grep sysfs | awk '{ print $3 }'); # Check modprobe config files for sound related options -SNDOPTIONS=$(modprobe -c|sed -n 's/^options \(snd[-_][^ ]*\)/\1:/p') +SNDOPTIONS=$(modprobe -c | sed -n 's/^options \(snd[-_][^ ]*\)/\1:/p') KEEP_OUTPUT= NFILE="" @@ -357,6 +377,7 @@ aplay amixer alsactl + rpm, dpkg /proc/asound/ /sys/class/sound/ ~/.asoundrc (etc.) @@ -388,13 +409,12 @@ if [ -z "$LSPCI" ]; then if [ -d /sys/bus/pci ]; then echo "This script requires lspci. Please install it, and re-run this script." - exit 0 fi fi # Fetch the info and store in temp files/variables TSTAMP=$(LANG=C TZ=UTC date) -DISTRO=$(grep -ihs "buntu\|SUSE\|Fedora\|PCLinuxOS\|MEPIS\|Mandriva\|Debian\|Damn\|Sabayon\|Slackware\|KNOPPIX\|Gentoo\|Zenwalk\|Mint\|Kubuntu\|FreeBSD\|Puppy\|Freespire\|Vector\|Dreamlinux\|CentOS\|Arch\|Xandros\|Elive\|SLAX\|Red\|BSD\|KANOTIX\|Nexenta\|Foresight\|GeeXboX\|Frugalware\|64\|SystemRescue\|Novell\|Solaris\|BackTrack\|KateOS\|Pardus" /etc/{issue,*release,*version}) +DISTRO=$(grep -ihs "buntu\|SUSE\|Fedora\|PCLinuxOS\|MEPIS\|Mandriva\|Debian\|Damn\|Sabayon\|Slackware\|KNOPPIX\|Gentoo\|Zenwalk\|Mint\|Kubuntu\|FreeBSD\|Puppy\|Freespire\|Vector\|Dreamlinux\|CentOS\|Arch\|Xandros\|Elive\|SLAX\|Red\|BSD\|KANOTIX\|Nexenta\|Foresight\|GeeXboX\|Frugalware\|64\|SystemRescue\|Novell\|Solaris\|BackTrack\|KateOS\|Pardus\|ALT" /etc/{issue,*release,*version}) KERNEL_VERSION=$(uname -r) KERNEL_PROCESSOR=$(uname -p) KERNEL_MACHINE=$(uname -m) @@ -404,12 +424,14 @@ get_alsa_library_version ALSA_UTILS_VERSION=$(amixer -v | awk '{ print $3 }') -ESDINST=$(which esd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) -PAINST=$(which pulseaudio 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) -ARTSINST=$(which artsd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) -JACKINST=$(which jackd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) -ROARINST=$(which roard 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) -DMIDECODE=$(which dmidecode 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null) +ESDINST=$(command -v esd) +PWINST=$(command -v pipewire) +PAINST=$(command -v pulseaudio) +ARTSINST=$(command -v artsd) +JACKINST=$(command -v jackd) +JACK2INST=$(command -v jackdbus) +ROARINST=$(command -v roard) +DMIDECODE=$(command -v dmidecode) #Check for DMI data if [ -d /sys/class/dmi/id ]; then @@ -418,6 +440,7 @@ DMI_SYSTEM_PRODUCT_NAME=$(cat /sys/class/dmi/id/product_name 2>/dev/null) DMI_SYSTEM_PRODUCT_VERSION=$(cat /sys/class/dmi/id/product_version 2>/dev/null) DMI_SYSTEM_FIRMWARE_VERSION=$(cat /sys/class/dmi/id/bios_version 2>/dev/null) + DMI_SYSTEM_SKU=$(cat /sys/class/dmi/id/product_sku 2>/dev/null) DMI_BOARD_VENDOR=$(cat /sys/class/dmi/id/board_vendor 2>/dev/null) DMI_BOARD_NAME=$(cat /sys/class/dmi/id/board_name 2>/dev/null) elif [ -x $DMIDECODE ]; then @@ -425,6 +448,7 @@ DMI_SYSTEM_PRODUCT_NAME=$($DMIDECODE -s system-product-name 2>/dev/null) DMI_SYSTEM_PRODUCT_VERSION=$($DMIDECODE -s system-version 2>/dev/null) DMI_SYSTEM_FIRMWARE_VERSION=$($DMIDECODE -s bios-version 2>/dev/null) + DMI_SYSTEM_SKU=$($DMIDECODE -s system-sku-number 2>/dev/null) DMI_BOARD_VENDOR=$($DMIDECODE -s baseboard-manufacturer 2>/dev/null) DMI_BOARD_NAME=$($DMIDECODE -s baseboard-product-name 2>/dev/null) fi @@ -439,7 +463,7 @@ done fi -cat /proc/asound/modules 2>/dev/null | awk '{ print $2 }' > $TEMPDIR/alsamodules.tmp +awk '{ print $2 " (card " $1 ")" }' < /proc/asound/modules > $TEMPDIR/alsamodules.tmp 2> /dev/null cat /proc/asound/cards > $TEMPDIR/alsacards.tmp if [[ ! -z "$LSPCI" ]]; then for class in 0401 0402 0403; do @@ -454,6 +478,18 @@ cat /proc/asound/card*/codec97\#0/ac97\#0-0 > $TEMPDIR/alsa-ac97.tmp 2> /dev/null cat /proc/asound/card*/codec97\#0/ac97\#0-0+regs > $TEMPDIR/alsa-ac97-regs.tmp 2> /dev/null +#Check for USB descriptors +if [ -x /usr/bin/lsusb ]; then + for f in /proc/asound/card[0-9]*/usbbus; do + test -f "$f" || continue + id=$(sed 's@/@:@' $f) + lsusb -v -s $id >> $TEMPDIR/lsusb.tmp 2> /dev/null + done +fi + +#Check for USB stream setup +cat /proc/asound/card*/stream[0-9]* > $TEMPDIR/alsa-usbstream.tmp 2> /dev/null + #Check for USB mixer setup cat /proc/asound/card*/usbmixer > $TEMPDIR/alsa-usbmixer.tmp 2> /dev/null @@ -483,6 +519,7 @@ echo "Product Name: $DMI_SYSTEM_PRODUCT_NAME" >> $FILE echo "Product Version: $DMI_SYSTEM_PRODUCT_VERSION" >> $FILE echo "Firmware Version: $DMI_SYSTEM_FIRMWARE_VERSION" >> $FILE +echo "System SKU: $DMI_SYSTEM_SKU" >> $FILE echo "Board Vendor: $DMI_BOARD_VENDOR" >> $FILE echo "Board Name: $DMI_BOARD_NAME" >> $FILE echo "" >> $FILE @@ -520,6 +557,13 @@ echo "!!Sound Servers on this system" >> $FILE echo "!!----------------------------" >> $FILE echo "" >> $FILE +if [[ -n $PWINST ]];then +[[ $(pgrep '^(.*/)?pipewire$') ]] && PWRUNNING="Yes" || PWRUNNING="No" +echo "PipeWire:" >> $FILE +echo " Installed - Yes ($PWINST)" >> $FILE +echo " Running - $PWRUNNING" >> $FILE +echo "" >> $FILE +fi if [[ -n $PAINST ]];then [[ $(pgrep '^(.*/)?pulseaudio$') ]] && PARUNNING="Yes" || PARUNNING="No" echo "Pulseaudio:" >> $FILE @@ -548,6 +592,13 @@ echo " Running - $JACKRUNNING" >> $FILE echo "" >> $FILE fi +if [[ -n $JACK2INST ]];then +[[ $(pgrep '^(.*/)?jackdbus$') ]] && JACK2RUNNING="Yes" || JACK2RUNNING="No" +echo "Jack2:" >> $FILE +echo " Installed - Yes ($JACK2INST)" >> $FILE +echo " Running - $JACK2RUNNING" >> $FILE +echo "" >> $FILE +fi if [[ -n $ROARINST ]];then [[ $(pgrep '^(.*/)?roard$') ]] && ROARRUNNING="Yes" || ROARRUNNING="No" echo "RoarAudio:" >> $FILE @@ -576,8 +627,7 @@ echo "" >> $FILE fi -if [ "$SNDOPTIONS" ] -then +if [ "$SNDOPTIONS" ]; then echo "!!Modprobe options (Sound related)" >> $FILE echo "!!--------------------------------" >> $FILE echo "" >> $FILE @@ -600,6 +650,18 @@ echo "" >> $FILE done echo "" >> $FILE + echo "!!Sysfs card info" >> $FILE + echo "!!---------------" >> $FILE + echo "" >> $FILE + for cdir in $(echo $SYSFS/class/sound/card*); do + echo "!!Card: $cdir" >> $FILE + driver=$(readlink -f "$cdir/device/driver") + echo "Driver: $driver" >> $FILE + echo "Tree:" >> $FILE + tree --noreport $cdir -L 2 | sed -e 's/^/\t/g' >> $FILE + echo "" >> $FILE + done + echo "" >> $FILE fi if [ -s "$TEMPDIR/alsa-hda-intel.tmp" ]; then @@ -626,6 +688,27 @@ echo "" >> $FILE fi +if [ -s "$TEMPDIR/lsusb.tmp" ]; then + echo "!!USB Descriptors" >> $FILE + echo "!!---------------" >> $FILE + echo "--startcollapse--" >> $FILE + cat $TEMPDIR/lsusb.tmp >> $FILE + echo "--endcollapse--" >> $FILE + echo "" >> $FILE + echo "" >> $FILE +fi + +if [ -s "$TEMPDIR/alsa-usbstream.tmp" ]; then + echo "!!USB Stream information" >> $FILE + echo "!!----------------------" >> $FILE + echo "--startcollapse--" >> $FILE + echo "" >> $FILE + cat $TEMPDIR/alsa-usbstream.tmp >> $FILE + echo "--endcollapse--" >> $FILE + echo "" >> $FILE + echo "" >> $FILE +fi + if [ -s "$TEMPDIR/alsa-usbmixer.tmp" ]; then echo "!!USB Mixer information" >> $FILE echo "!!---------------------" >> $FILE @@ -699,6 +782,10 @@ withconfigs WITHALL="no" ;; + --with-packages) + withpackages + WITHALL="no" + ;; --stdout) UPLOAD="no" if [ -z "$WITHALL" ]; then @@ -730,12 +817,13 @@ echo " /etc/asound.conf if they exist)" echo " --with-devices (shows the device nodes in /dev/snd/)" echo " --with-dmesg (shows the ALSA/HDA kernel messages)" + echo " --with-packages (includes known packages installed)" echo "" echo " --output FILE (specify the file to output for no-upload mode)" echo " --update (check server for script updates)" echo " --upload (upload contents to remote server)" echo " --no-upload (do not upload contents to remote server)" - echo " --pastebin (use http://pastebin.ca) as remote server" + echo " --pastebin (use https://pastebin.ca) as remote server" echo " instead www.alsa-project.org" echo " --stdout (print alsa information to standard output" echo " instead of a file)" @@ -764,28 +852,28 @@ : elif [ -n "$DIALOG" ]; then if [ -z "$PASTEBIN" ]; then - dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to http://www.alsa-project.org.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to http://www.alsa-project.org/cardinfo-db/ and submit your post." 25 100 + dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to https://www.alsa-project.org.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to https://www.alsa-project.org/cardinfo-db/ and submit your post." 25 100 else - dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to http://www.pastebin.ca.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to http://www.pastebin.ca/upload.php and submit your post." 25 100 + dialog --backtitle "$BGTITLE" --msgbox "Could not automatically upload output to https://www.pastebin.ca.\nPossible reasons are:\n\n 1. Couldn't find 'wget' in your PATH\n 2. Your version of wget is less than 1.8.2\n\nPlease manually upload $NFILE to https://www.pastebin.ca/upload.php and submit your post." 25 100 fi else if [ -z "$PASTEBIN" ]; then echo "" - echo "Could not automatically upload output to http://www.alsa-project.org" + echo "Could not automatically upload output to https://www.alsa-project.org" echo "Possible reasons are:" echo " 1. Couldn't find 'wget' in your PATH" echo " 2. Your version of wget is less than 1.8.2" echo "" - echo "Please manually upload $NFILE to http://www.alsa-project.org/cardinfo-db/ and submit your post." + echo "Please manually upload $NFILE to https://www.alsa-project.org/cardinfo-db/ and submit your post." echo "" else echo "" - echo "Could not automatically upload output to http://www.pastebin.ca" + echo "Could not automatically upload output to https://www.pastebin.ca" echo "Possible reasons are:" echo " 1. Couldn't find 'wget' in your PATH" echo " 2. Your version of wget is less than 1.8.2" echo "" - echo "Please manually upload $NFILE to http://www.pastebin.ca/upload.php and submit your post." + echo "Please manually upload $NFILE to https://www.pastebin.ca/upload.php and submit your post." echo "" fi fi @@ -839,9 +927,9 @@ fi if [[ -z $PASTEBIN ]]; then - wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://www.alsa-project.org/cardinfo-db/" &>$TEMPDIR/wget.tmp + wget -O - --tries=5 --timeout=60 --post-file=$FILE "https://www.alsa-project.org/cardinfo-db/" &>$TEMPDIR/wget.tmp else - wget -O - --tries=5 --timeout=60 --post-file=$FILE "http://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY&encrypt=t&encryptpw=blahblah" &>$TEMPDIR/wget.tmp + wget -O - --tries=5 --timeout=60 --post-file=$FILE "https://pastebin.ca/quiet-paste.php?api=$PASTEBINKEY&encrypt=t&encryptpw=blahblah" &>$TEMPDIR/wget.tmp fi if [ $? -ne 0 ]; then @@ -884,7 +972,7 @@ if [ -z "$PASTEBIN" ]; then FINAL_URL=$(grep "SUCCESS:" $TEMPDIR/wget.tmp | cut -d ' ' -f 2) else - FINAL_URL=$(grep "SUCCESS:" $TEMPDIR/wget.tmp | sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p') + FINAL_URL=$(grep "SUCCESS:" $TEMPDIR/wget.tmp | sed -n 's/.*\:\([0-9]\+\).*/https:\/\/pastebin.ca\/\1/p') fi # See if tput is available, and use it if it is. diff -Nru alsa-utils-1.2.2/alsaconf/Makefile.in alsa-utils-1.2.6/alsaconf/Makefile.in --- alsa-utils-1.2.2/alsaconf/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/alsaconf/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,7 +91,8 @@ subdir = alsaconf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -275,8 +276,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -356,6 +357,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/alsactl/Makefile.am alsa-utils-1.2.6/alsactl/Makefile.am --- alsa-utils-1.2.2/alsactl/Makefile.am 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/Makefile.am 2021-12-06 10:17:28.000000000 +0000 @@ -9,8 +9,8 @@ AM_CFLAGS = -D_GNU_SOURCE -alsactl_SOURCES=alsactl.c state.c lock.c utils.c init_parse.c daemon.c \ - monitor.c +alsactl_SOURCES=alsactl.c state.c lock.c utils.c init_parse.c init_ucm.c \ + daemon.c monitor.c clean.c alsactl_CFLAGS=$(AM_CFLAGS) -D__USE_GNU \ -DSYS_ASOUNDRC=\"$(ASOUND_STATE_DIR)/asound.state\" \ diff -Nru alsa-utils-1.2.2/alsactl/Makefile.in alsa-utils-1.2.6/alsactl/Makefile.in --- alsa-utils-1.2.2/alsactl/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -95,7 +95,8 @@ subdir = alsactl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -114,8 +115,9 @@ PROGRAMS = $(sbin_PROGRAMS) am_alsactl_OBJECTS = alsactl-alsactl.$(OBJEXT) alsactl-state.$(OBJEXT) \ alsactl-lock.$(OBJEXT) alsactl-utils.$(OBJEXT) \ - alsactl-init_parse.$(OBJEXT) alsactl-daemon.$(OBJEXT) \ - alsactl-monitor.$(OBJEXT) + alsactl-init_parse.$(OBJEXT) alsactl-init_ucm.$(OBJEXT) \ + alsactl-daemon.$(OBJEXT) alsactl-monitor.$(OBJEXT) \ + alsactl-clean.$(OBJEXT) alsactl_OBJECTS = $(am_alsactl_OBJECTS) alsactl_LDADD = $(LDADD) alsactl_LINK = $(CCLD) $(alsactl_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ @@ -136,8 +138,9 @@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/alsactl-alsactl.Po \ - ./$(DEPDIR)/alsactl-daemon.Po \ - ./$(DEPDIR)/alsactl-init_parse.Po ./$(DEPDIR)/alsactl-lock.Po \ + ./$(DEPDIR)/alsactl-clean.Po ./$(DEPDIR)/alsactl-daemon.Po \ + ./$(DEPDIR)/alsactl-init_parse.Po \ + ./$(DEPDIR)/alsactl-init_ucm.Po ./$(DEPDIR)/alsactl-lock.Po \ ./$(DEPDIR)/alsactl-monitor.Po ./$(DEPDIR)/alsactl-state.Po \ ./$(DEPDIR)/alsactl-utils.Po am__mv = mv -f @@ -318,8 +321,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -399,6 +402,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -415,8 +419,8 @@ EXTRA_DIST = alsactl.1 alsactl_init.xml alsa-state.service.in \ alsa-restore.service.in 90-alsa-restore.rules.in AM_CFLAGS = -D_GNU_SOURCE -alsactl_SOURCES = alsactl.c state.c lock.c utils.c init_parse.c daemon.c \ - monitor.c +alsactl_SOURCES = alsactl.c state.c lock.c utils.c init_parse.c init_ucm.c \ + daemon.c monitor.c clean.c alsactl_CFLAGS = $(AM_CFLAGS) -D__USE_GNU \ -DSYS_ASOUNDRC=\"$(ASOUND_STATE_DIR)/asound.state\" \ @@ -532,8 +536,10 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsactl-alsactl.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsactl-clean.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsactl-daemon.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsactl-init_parse.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsactl-init_ucm.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsactl-lock.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsactl-monitor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsactl-state.Po@am__quote@ # am--include-marker @@ -629,6 +635,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -c -o alsactl-init_parse.obj `if test -f 'init_parse.c'; then $(CYGPATH_W) 'init_parse.c'; else $(CYGPATH_W) '$(srcdir)/init_parse.c'; fi` +alsactl-init_ucm.o: init_ucm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -MT alsactl-init_ucm.o -MD -MP -MF $(DEPDIR)/alsactl-init_ucm.Tpo -c -o alsactl-init_ucm.o `test -f 'init_ucm.c' || echo '$(srcdir)/'`init_ucm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsactl-init_ucm.Tpo $(DEPDIR)/alsactl-init_ucm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='init_ucm.c' object='alsactl-init_ucm.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -c -o alsactl-init_ucm.o `test -f 'init_ucm.c' || echo '$(srcdir)/'`init_ucm.c + +alsactl-init_ucm.obj: init_ucm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -MT alsactl-init_ucm.obj -MD -MP -MF $(DEPDIR)/alsactl-init_ucm.Tpo -c -o alsactl-init_ucm.obj `if test -f 'init_ucm.c'; then $(CYGPATH_W) 'init_ucm.c'; else $(CYGPATH_W) '$(srcdir)/init_ucm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsactl-init_ucm.Tpo $(DEPDIR)/alsactl-init_ucm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='init_ucm.c' object='alsactl-init_ucm.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -c -o alsactl-init_ucm.obj `if test -f 'init_ucm.c'; then $(CYGPATH_W) 'init_ucm.c'; else $(CYGPATH_W) '$(srcdir)/init_ucm.c'; fi` + alsactl-daemon.o: daemon.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -MT alsactl-daemon.o -MD -MP -MF $(DEPDIR)/alsactl-daemon.Tpo -c -o alsactl-daemon.o `test -f 'daemon.c' || echo '$(srcdir)/'`daemon.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsactl-daemon.Tpo $(DEPDIR)/alsactl-daemon.Po @@ -656,6 +676,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='monitor.c' object='alsactl-monitor.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -c -o alsactl-monitor.obj `if test -f 'monitor.c'; then $(CYGPATH_W) 'monitor.c'; else $(CYGPATH_W) '$(srcdir)/monitor.c'; fi` + +alsactl-clean.o: clean.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -MT alsactl-clean.o -MD -MP -MF $(DEPDIR)/alsactl-clean.Tpo -c -o alsactl-clean.o `test -f 'clean.c' || echo '$(srcdir)/'`clean.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsactl-clean.Tpo $(DEPDIR)/alsactl-clean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='clean.c' object='alsactl-clean.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -c -o alsactl-clean.o `test -f 'clean.c' || echo '$(srcdir)/'`clean.c + +alsactl-clean.obj: clean.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -MT alsactl-clean.obj -MD -MP -MF $(DEPDIR)/alsactl-clean.Tpo -c -o alsactl-clean.obj `if test -f 'clean.c'; then $(CYGPATH_W) 'clean.c'; else $(CYGPATH_W) '$(srcdir)/clean.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsactl-clean.Tpo $(DEPDIR)/alsactl-clean.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='clean.c' object='alsactl-clean.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(alsactl_CFLAGS) $(CFLAGS) -c -o alsactl-clean.obj `if test -f 'clean.c'; then $(CYGPATH_W) 'clean.c'; else $(CYGPATH_W) '$(srcdir)/clean.c'; fi` install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ @@ -988,8 +1022,10 @@ distclean: distclean-recursive -rm -f ./$(DEPDIR)/alsactl-alsactl.Po + -rm -f ./$(DEPDIR)/alsactl-clean.Po -rm -f ./$(DEPDIR)/alsactl-daemon.Po -rm -f ./$(DEPDIR)/alsactl-init_parse.Po + -rm -f ./$(DEPDIR)/alsactl-init_ucm.Po -rm -f ./$(DEPDIR)/alsactl-lock.Po -rm -f ./$(DEPDIR)/alsactl-monitor.Po -rm -f ./$(DEPDIR)/alsactl-state.Po @@ -1042,8 +1078,10 @@ maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/alsactl-alsactl.Po + -rm -f ./$(DEPDIR)/alsactl-clean.Po -rm -f ./$(DEPDIR)/alsactl-daemon.Po -rm -f ./$(DEPDIR)/alsactl-init_parse.Po + -rm -f ./$(DEPDIR)/alsactl-init_ucm.Po -rm -f ./$(DEPDIR)/alsactl-lock.Po -rm -f ./$(DEPDIR)/alsactl-monitor.Po -rm -f ./$(DEPDIR)/alsactl-state.Po diff -Nru alsa-utils-1.2.2/alsactl/alsa-restore.service.in alsa-utils-1.2.6/alsactl/alsa-restore.service.in --- alsa-utils-1.2.2/alsactl/alsa-restore.service.in 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/alsa-restore.service.in 2021-12-06 10:17:28.000000000 +0000 @@ -7,7 +7,6 @@ Description=Save/Restore Sound Card State ConditionPathExists=!@daemonswitch@ ConditionPathExistsGlob=/dev/snd/control* -ConditionPathExists=@asoundrcfile@ [Service] Type=oneshot diff -Nru alsa-utils-1.2.2/alsactl/alsactl.1 alsa-utils-1.2.6/alsactl/alsactl.1 --- alsa-utils-1.2.2/alsactl/alsactl.1 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/alsactl.1 2021-12-06 10:17:28.000000000 +0000 @@ -8,6 +8,8 @@ \fBalsactl\fP \fImonitor\fP +\fBalsactl\fP [\fIclean\fP] [[control identifiers]] + .SH DESCRIPTION \fBalsactl\fP is used to control advanced settings for the ALSA soundcard drivers. It supports multiple soundcards. If your card has @@ -16,31 +18,67 @@ .SH COMMANDS -\fIstore\fP saves the current driver state for the selected soundcard +.SS Introduction + +The \fI\fP argument is optional. If no soundcards are specified, +setup for all cards will be saved, loaded or monitored. + +.SS store + +This command saves the current driver state for the selected soundcard to the configuration file. -\fIrestore\fP loads driver state for the selected soundcard from the +.SS restore + +This command loads driver state for the selected soundcard from the configuration file. If restoring fails (eventually partly), the init action is called. -\fInrestore\fP is like \fIrestore\fP, but it notifies also the daemon +.SS nrestore + +This command is like \fIrestore\fP, but it notifies also the daemon to do new rescan for available soundcards. -\fIinit\fP tries to initialize all devices to a default state. If device +.SS init + +This command tries to initialize all devices to a default state. If device is not known, error code 99 is returned. -\fIdaemon\fP manages to save periodically the sound state. +.SS daemon + +This command manages to save periodically the sound state. + +.SS rdaemon -\fIrdaemon\fP like \fIdaemon\fP but restore the sound state at first. +This command is like \fIdaemon\fP but restore the sound state at first. -\fIkill\fP notifies the daemon to do the specified operation (quit, +.SS kill + +This command notifies the daemon to do the specified operation (quit, rescan, save_and_quit). -\fImonitor\fP is for monitoring the events received from the given +.SS monitor + +This command is for monitoring the events received from the given control device. -If no soundcards are specified, setup for all cards will be saved, -loaded or monitored. +.SS clean [filter] + +This command cleans the controls created by applications. + +The optional element identifiers are accepted as a filter. One extra +argument is parsed as an element identifiers. + +\fIExample:\fP alsactl clean 0 "name='PCM'" "name='Mic Phantom'" + +.SS dump-state + +This command dumps the current state (all cards) to stdout. + +.SS dump-cfg + +This command dumps the current configuration (all cards) to stdout. +Note that the configuration hooks are evaluated. .SH OPTIONS @@ -61,6 +99,10 @@ Select the configuration file to use. The default is /var/lib/alsa/asound.state. .TP +\fI\-a, \-\-config-dir\fP +Select the boot / hotplug ALSA configuration directory to use. The default is /var/lib/alsa. + +.TP \fI\-l, \-\-lock\fP Use the file locking to serialize the concurrent access to the state file (this option is default for the global state file). @@ -81,7 +123,7 @@ .TP \fI\-g, \-\-ignore\fP -Used with store and restore commands. Do not show 'No soundcards found' +Used with store, restore and init commands. Do not show 'No soundcards found' and do not set an error exit code when soundcards are not installed. .TP @@ -142,6 +184,16 @@ \fI\-c, \-\-sched-idle\fP Set the process scheduling policy to idle (SCHED_IDLE). +.TP +\fI\-D, \-\-ucm-defaults\fP +Execute also the 'defaults' section from the UCM configuration. The standard +behaviour is to execute only 'once' section. + +.TP +\fI\-U, \-\-no-ucm\fP +Skip the UCM init even if available. It may be useful for the test the +legacy init configuration. + .SH FILES \fI/var/lib/alsa/asound.state\fP (or whatever file you specify with the \fB\-f\fP flag) is used to store current settings for your diff -Nru alsa-utils-1.2.2/alsactl/alsactl.c alsa-utils-1.2.6/alsactl/alsactl.c --- alsa-utils-1.2.2/alsactl/alsactl.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/alsactl.c 2021-12-06 10:17:28.000000000 +0000 @@ -29,11 +29,13 @@ #include #include #include -#include #include "alsactl.h" +#ifndef SYS_ASOUND_DIR +#define SYS_ASOUND_DIR "/var/lib/alsa" +#endif #ifndef SYS_ASOUNDRC -#define SYS_ASOUNDRC "/var/lib/alsa/asound.state" +#define SYS_ASOUNDRC SYS_ASOUND_DIR "/asound.state" #endif #ifndef SYS_PIDFILE #define SYS_PIDFILE "/var/run/alsactl.pid" @@ -74,6 +76,7 @@ { 'v', "version", "print version of this program" }, { HEADER, NULL, "Available state options:" }, { FILEARG | 'f', "file", "configuration file (default " SYS_ASOUNDRC ")" }, +{ FILEARG | 'a', "config-dir", "boot / hotplug configuration directory (default " SYS_ASOUND_DIR ")" }, { 'l', "lock", "use file locking to serialize concurrent access" }, { 'L', "no-lock", "do not use file locking to serialize concurrent access" }, { FILEARG | 'O', "lock-state-file", "state lock file path (default " SYS_LOCKFILE ")" }, @@ -96,6 +99,13 @@ { 's', "syslog", "use syslog for messages" }, { INTARG | 'n', "nice", "set the process priority (see 'man nice')" }, { 'c', "sched-idle", "set the process scheduling policy to idle (SCHED_IDLE)" }, +#ifdef HAVE_ALSA_USE_CASE_H +{ 'D', "ucm-defaults", "execute also the UCM 'defaults' section" }, +{ 'U', "no-ucm", "don't init with UCM" }, +#if SND_LIB_VER(1, 2, 5) < SND_LIB_VERSION +{ 'X', "ucm-nodev", "show UCM no device errors" }, +#endif +#endif { HEADER, NULL, "Available commands:" }, { CARDCMD, "store", "save current driver setup for one or each soundcards" }, { EMPCMD, NULL, " to configuration file" }, @@ -107,6 +117,9 @@ { CARDCMD, "rdaemon", "like daemon but do the state restore at first" }, { KILLCMD, "kill", "notify daemon to quit, rescan or save_and_quit" }, { CARDCMD, "monitor", "monitor control events" }, +{ CARDCMD, "clean", "clean application controls" }, +{ EMPCMD, "dump-state", "dump the state (for all cards)" }, +{ EMPCMD, "dump-cfg", "dump the configuration (expanded, for all cards)" }, { 0, NULL, NULL } }; @@ -135,7 +148,7 @@ strcat(buf, ""); else if (sarg & KILLCMD) strcat(buf, ""); - printf(" %-8s %-6s %s\n", larg ? larg : "", + printf(" %-10s %-6s %s\n", larg ? larg : "", buf, a->comment); continue; } @@ -150,6 +163,49 @@ } } +static int dump_config_tree(snd_config_t *top) +{ + snd_output_t *out; + int err; + + err = snd_output_stdio_attach(&out, stdout, 0); + if (err < 0) + return err; + err = snd_config_save(top, out); + snd_output_close(out); + return err; +} + +static int dump_state(const char *file) +{ + snd_config_t *top; + int err; + + err = load_configuration(file, &top, NULL); + if (err < 0) + return err; + err = dump_config_tree(top); + snd_config_delete(top); + return err; +} + +static int dump_configuration(void) +{ + snd_config_t *top, *cfg2; + int err; + + err = snd_config_update_ref(&top); + if (err < 0) + return err; + /* expand cards.* tree */ + err = snd_config_search_definition(top, "cards", "_dummy_", &cfg2); + if (err >= 0) + snd_config_delete(cfg2); + err = dump_config_tree(top); + snd_config_unref(top); + return err; +} + #define NO_NICE (-100000) static void do_nice(int use_nice, int sched_idle) @@ -161,7 +217,7 @@ if (sched_idle) { if (sched_getparam(0, &sched_param) >= 0) { sched_param.sched_priority = 0; - if (!sched_setscheduler(0, SCHED_IDLE, &sched_param)) + if (sched_setscheduler(0, SCHED_IDLE, &sched_param) < 0) error("sched_setparam failed: %s", strerror(errno)); } else { error("sched_getparam failed: %s", strerror(errno)); @@ -178,11 +234,13 @@ "/dev/snd/hwC", NULL }; + char *cfgdir = SYS_ASOUND_DIR; char *cfgfile = SYS_ASOUNDRC; char *initfile = DATADIR "/init/00main"; char *pidfile = SYS_PIDFILE; char *cardname, ncardname[16]; char *cmd; + char *const *extra_args; const char *const *tmp; int removestate = 0; int init_fallback = 1; /* new default behavior */ @@ -191,12 +249,16 @@ int daemoncmd = 0; int use_nice = NO_NICE; int sched_idle = 0; + int initflags = 0; struct arg *a; struct option *o; int i, j, k, res; struct option *long_option; char *short_option; +#if SND_LIB_VER(1, 2, 5) >= SND_LIB_VERSION + initflags |= FLAG_UCM_NODEV; +#endif long_option = calloc(ARRAY_SIZE(args), sizeof(struct option)); if (long_option == NULL) exit(EXIT_FAILURE); @@ -235,6 +297,9 @@ case 'f': cfgfile = optarg; break; + case 'a': + cfgdir = optarg; + break; case 'l': do_lock = 1; break; @@ -263,6 +328,15 @@ case 'I': init_fallback = 0; break; + case 'D': + initflags |= FLAG_UCM_DEFAULTS; + break; + case 'U': + initflags |= FLAG_UCM_DISABLED; + break; + case 'X': + initflags |= FLAG_UCM_NODEV; + break; case 'r': statefile = optarg; break; @@ -335,6 +409,8 @@ } } + extra_args = argc - optind > 2 ? argv + optind + 2 : NULL; + /* the global system file should be always locked */ if (strcmp(cfgfile, SYS_ASOUNDRC) == 0 && do_lock >= 0) do_lock = 1; @@ -342,7 +418,11 @@ /* when running in background, use syslog for reports */ if (background) { use_syslog = 1; - daemon(0, 0); + if (daemon(0, 0)) { + syslog(LOG_INFO, "alsactl " SND_UTIL_VERSION_STR " daemon cannot be started: %s", strerror(errno)); + res = EXIT_FAILURE; + goto out; + } } cmd = argv[optind]; @@ -354,8 +434,10 @@ syslog(LOG_INFO, "alsactl " SND_UTIL_VERSION_STR " daemon started"); } + snd_lib_error_set_handler(error_handler); + if (!strcmp(cmd, "init")) { - res = init(initfile, cardname); + res = init(cfgdir, initfile, initflags | FLAG_UCM_FBOOT | FLAG_UCM_BOOT, cardname); snd_config_update_free_global(); } else if (!strcmp(cmd, "store")) { res = save_state(cfgfile, cardname); @@ -364,7 +446,7 @@ !strcmp(cmd, "nrestore")) { if (removestate) remove(statefile); - res = load_state(cfgfile, initfile, cardname, init_fallback); + res = load_state(cfgdir, cfgfile, initfile, initflags, cardname, init_fallback); if (!strcmp(cmd, "rdaemon")) { do_nice(use_nice, sched_idle); res = state_daemon(cfgfile, cardname, period, pidfile); @@ -378,6 +460,12 @@ res = state_daemon_kill(pidfile, cardname); } else if (!strcmp(cmd, "monitor")) { res = monitor(cardname); + } else if (!strcmp(cmd, "clean")) { + res = clean(cardname, extra_args); + } else if (!strcmp(cmd, "dump-state")) { + res = dump_state(cfgfile); + } else if (!strcmp(cmd, "dump-cfg")) { + res = dump_configuration(); } else { fprintf(stderr, "alsactl: Unknown command '%s'...\n", cmd); res = -ENODEV; diff -Nru alsa-utils-1.2.2/alsactl/alsactl.h alsa-utils-1.2.6/alsactl/alsactl.h --- alsa-utils-1.2.2/alsactl/alsactl.h 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/alsactl.h 2021-12-06 10:17:28.000000000 +0000 @@ -1,3 +1,6 @@ +#include +#include + extern int debugflag; extern int force_restore; extern int ignore_nocards; @@ -7,10 +10,18 @@ extern char *statefile; extern char *lockfile; +struct snd_card_iterator { + int card; + char name[16]; + bool single; + bool first; +}; + void info_(const char *fcn, long line, const char *fmt, ...); void error_(const char *fcn, long line, const char *fmt, ...); void cerror_(const char *fcn, long line, int cond, const char *fmt, ...); void dbg_(const char *fcn, long line, const char *fmt, ...); +void error_handler(const char *file, int line, const char *function, int err, const char *fmt, ...); #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) #define info(...) do { info_(__func__, __LINE__, __VA_ARGS__); } while (0) @@ -24,17 +35,33 @@ #define dbg(args...) do { dbg_(__func__, __LINE__, ##args); } while (0) #endif -int init(const char *file, const char *cardname); +#define FLAG_UCM_DISABLED (1<<0) +#define FLAG_UCM_FBOOT (1<<1) +#define FLAG_UCM_BOOT (1<<2) +#define FLAG_UCM_DEFAULTS (1<<3) +#define FLAG_UCM_NODEV (1<<4) + +void snd_card_iterator_init(struct snd_card_iterator *iter, int cardno); +int snd_card_iterator_sinit(struct snd_card_iterator *iter, const char *cardname); +const char *snd_card_iterator_next(struct snd_card_iterator *iter); +int snd_card_iterator_error(struct snd_card_iterator *iter); + +int load_configuration(const char *file, snd_config_t **top, int *open_failed); +int init(const char *cfgdir, const char *file, int flags, const char *cardname); +int init_ucm(int flags, int cardno); int state_lock(const char *file, int timeout); int state_unlock(int fd, const char *file); int save_state(const char *file, const char *cardname); -int load_state(const char *file, const char *initfile, const char *cardname, - int do_init); +int load_state(const char *cfgdir, const char *file, + const char *initfile, int initflags, + const char *cardname, int do_init); int power(const char *argv[], int argc); int monitor(const char *name); int state_daemon(const char *file, const char *cardname, int period, const char *pidfile); int state_daemon_kill(const char *pidfile, const char *cmd); +int clean(const char *cardname, char *const *extra_args); +int snd_card_clean_cfgdir(const char *cfgdir, int cardno); /* utils */ diff -Nru alsa-utils-1.2.2/alsactl/clean.c alsa-utils-1.2.6/alsactl/clean.c --- alsa-utils-1.2.2/alsactl/clean.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/clean.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,196 @@ +/* + * Advanced Linux Sound Architecture Control Program + * Copyright (c) by Jaroslav Kysela + * + * + * 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 of the License, 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "aconfig.h" +#include "version.h" +#include +#include +#include +#include +#include +#include "alsactl.h" + +static int clean_one_control(snd_ctl_t *handle, snd_ctl_elem_id_t *elem_id, + snd_ctl_elem_id_t **filter) +{ + snd_ctl_elem_info_t *info; + char *s; + int err; + + snd_ctl_elem_info_alloca(&info); + snd_ctl_elem_info_set_id(info, elem_id); + err = snd_ctl_elem_info(handle, info); + if (err < 0) { + s = snd_ctl_ascii_elem_id_get(elem_id); + error("Cannot read control info '%s': %s", s, snd_strerror(err)); + free(s); + return err; + } + + if (!snd_ctl_elem_info_is_user(info)) + return 0; + + s = snd_ctl_ascii_elem_id_get(elem_id); + dbg("Application control \"%s\" found.", s); + if (filter) { + for (; *filter; filter++) { + if (snd_ctl_elem_id_compare_set(elem_id, *filter) == 0) + break; + } + if (*filter == NULL) { + free(s); + return 0; + } + } + + err = snd_ctl_elem_remove(handle, elem_id); + if (err < 0) { + error("Cannot remove control '%s': %s", s, snd_strerror(err)); + free(s); + return err; + } + dbg("Application control \"%s\" removed.", s); + free(s); + return 0; +} + +static void filter_controls_free(snd_ctl_elem_id_t **_filter) +{ + snd_ctl_elem_id_t **filter; + + for (filter = _filter; filter; filter++) + free(*filter); + free(_filter); +} + +static int filter_controls_parse(char *const *controls, snd_ctl_elem_id_t ***_filter) +{ + snd_ctl_elem_id_t **filter = NULL; + char *const *c; + char *s; + unsigned int count, idx; + int err; + + if (!controls) + goto fin; + for (count = 0, c = controls; *c; c++, count++); + if (count == 0) + goto fin; + filter = calloc(count + 1, sizeof(snd_ctl_elem_id_t *)); + if (filter == NULL) { +nomem: + error("No enough memory..."); + return -ENOMEM; + } + filter[count] = NULL; + for (idx = 0; idx < count; idx++) { + err = snd_ctl_elem_id_malloc(&filter[idx]); + if (err < 0) { + filter_controls_free(filter); + goto nomem; + } + err = snd_ctl_ascii_elem_id_parse(filter[idx], controls[idx]); + if (err < 0) { + error("Cannot parse id '%s': %s", controls[idx], snd_strerror(err)); + filter_controls_free(filter); + return err; + } + s = snd_ctl_ascii_elem_id_get(filter[idx]); + dbg("Add to filter: \"%s\"", s); + free(s); + } +fin: + *_filter = filter; + return 0; +} + +static int clean_controls(int cardno, char *const *controls) +{ + snd_ctl_t *handle; + snd_ctl_elem_list_t *list; + snd_ctl_elem_id_t *elem_id; + snd_ctl_elem_id_t **filter; + char name[32]; + unsigned int idx, count; + int err; + + snd_ctl_elem_id_alloca(&elem_id); + snd_ctl_elem_list_alloca(&list); + + err = filter_controls_parse(controls, &filter); + if (err < 0) + return err; + + sprintf(name, "hw:%d", cardno); + err = snd_ctl_open(&handle, name, 0); + if (err < 0) { + error("snd_ctl_open error: %s", snd_strerror(err)); + filter_controls_free(filter); + return err; + } + dbg("Control device '%s' opened.", name); + err = snd_ctl_elem_list(handle, list); + if (err < 0) { + error("Cannot determine controls: %s", snd_strerror(err)); + goto fin_err; + } + count = snd_ctl_elem_list_get_count(list); + if (count == 0) + goto fin_ok; + snd_ctl_elem_list_set_offset(list, 0); + if ((err = snd_ctl_elem_list_alloc_space(list, count)) < 0) { + error("No enough memory..."); + goto fin_err; + } + if ((err = snd_ctl_elem_list(handle, list)) < 0) { + error("Cannot determine controls (2): %s", snd_strerror(err)); + goto fin_err; + } + for (idx = 0; idx < count; idx++) { + snd_ctl_elem_list_get_id(list, idx, elem_id); + err = clean_one_control(handle, elem_id, filter); + if (err < 0) + goto fin_err; + } +fin_ok: + filter_controls_free(filter); + snd_ctl_close(handle); + return 0; +fin_err: + filter_controls_free(filter); + snd_ctl_close(handle); + return err; +} + +int clean(const char *cardname, char *const *extra_args) +{ + struct snd_card_iterator iter; + int err; + + err = snd_card_iterator_sinit(&iter, cardname); + if (err < 0) + return err; + while (snd_card_iterator_next(&iter)) { + if ((err = clean_controls(iter.card, extra_args))) + return err; + } + return snd_card_iterator_error(&iter); +} diff -Nru alsa-utils-1.2.2/alsactl/daemon.c alsa-utils-1.2.6/alsactl/daemon.c --- alsa-utils-1.2.2/alsactl/daemon.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/daemon.c 2021-12-06 10:17:28.000000000 +0000 @@ -29,7 +29,6 @@ #include #include #include -#include #include "alsactl.h" struct id_list { @@ -284,7 +283,7 @@ err = err < 0 ? -errno : -EIO; close(fd); pid_txt[11] = '\0'; - return atol(pid_txt); + return err < 0 ? err : atol(pid_txt); } else { return -errno; } @@ -293,7 +292,7 @@ static int write_pid_file(const char *pidfile) { int fd, err; - char pid_txt[12]; + char pid_txt[14]; sprintf(pid_txt, "%10li\n", (long)getpid()); fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0600); diff -Nru alsa-utils-1.2.2/alsactl/init/00main alsa-utils-1.2.6/alsactl/init/00main --- alsa-utils-1.2.2/alsactl/init/00main 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/init/00main 2021-12-06 10:17:28.000000000 +0000 @@ -36,7 +36,7 @@ LABEL="init_end" ACCESS=="postinit", INCLUDE="postinit" -RESULT=="true", GOTO="00_mainend" +RESULT=="true", GOTO="00main_end" ERROR="Found hardware: \"$cardinfo{driver}\" \"$cardinfo{mixername}\" \"$cardinfo{components}\" \"$attr{subsystem_vendor}\" \"$attr{subsystem_device}\"\n" ERROR="Hardware is initialized using a generic method\n" INCLUDE="default" diff -Nru alsa-utils-1.2.2/alsactl/init/Makefile.in alsa-utils-1.2.6/alsactl/init/Makefile.in --- alsa-utils-1.2.2/alsactl/init/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/init/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,7 +91,8 @@ subdir = alsactl/init ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -212,8 +213,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -293,6 +294,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/alsactl/init_parse.c alsa-utils-1.2.6/alsactl/init_parse.c --- alsa-utils-1.2.2/alsactl/init_parse.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/init_parse.c 2021-12-06 10:17:28.000000000 +0000 @@ -37,7 +37,6 @@ #include #include #include -#include #include "aconfig.h" #include "alsactl.h" #include "list.h" @@ -465,12 +464,13 @@ return -EINVAL; } for (idx = 0; idx < count; idx += 2) { - val = hextodigit(*(value++)) << 4; - val |= hextodigit(*(value++)); - if (val > 255) { + int nibble1 = hextodigit(*(value++)); + int nibble2 = hextodigit(*(value++)); + if (nibble1 < 0 || nibble2 < 0) { Perror(space, "bad ctl hexa value"); return -EINVAL; } + val = (nibble1 << 4) | nibble2; snd_ctl_elem_value_set_byte(space->ctl_value, idx, val); } break; @@ -1700,6 +1700,7 @@ if (count > linesize - 1) { free(line); + line = NULL; linesize = (count + 127 + 1) & ~127; if (linesize > 2048) { error("file %s, line %i too long", filename, linenum); @@ -1742,52 +1743,44 @@ return err ? err : -abs(space->exit_code); } -int init(const char *filename, const char *cardname) +int init(const char *cfgdir, const char *filename, int flags, const char *cardname) { struct space *space; - int err = 0, card, first; + struct snd_card_iterator iter; + int err = 0, lasterr = 0; sysfs_init(); - if (!cardname) { - first = 1; - card = -1; - while (1) { - if (snd_card_next(&card) < 0) - break; - if (card < 0) { - if (first) { - error("No soundcards found..."); - return -ENODEV; - } - break; - } - first = 0; - err = init_space(&space, card); - if (err == 0) { - space->rootdir = new_root_dir(filename); - if (space->rootdir != NULL) - err = parse(space, filename); - free_space(space); - } - if (err < 0) - break; + err = snd_card_iterator_sinit(&iter, cardname); + if (err < 0) + goto out; + while (snd_card_iterator_next(&iter)) { + err = snd_card_clean_cfgdir(cfgdir, iter.card); + if (err < 0) { + if (lasterr == 0) + lasterr = err; + continue; } - } else { - card = snd_card_get_index(cardname); - if (card < 0) { - error("Cannot find soundcard '%s'...", cardname); - goto error; - } - memset(&space, 0, sizeof(space)); - err = init_space(&space, card); - if (err == 0) { - space->rootdir = new_root_dir(filename); - if (space->rootdir != NULL) - err = parse(space, filename); - free_space(space); + err = init_ucm(flags, iter.card); + if (err == 0) + continue; + err = init_space(&space, iter.card); + if (err != 0) + continue; + space->rootdir = new_root_dir(filename); + if (space->rootdir != NULL) { + err = parse(space, filename); + if (!cardname && err <= -99) { /* non-fatal errors */ + if (lasterr == 0) + lasterr = err; + err = 0; + } } + free_space(space); + if (err < 0) + goto out; } - error: + err = lasterr ? lasterr : snd_card_iterator_error(&iter); +out: sysfs_cleanup(); return err; } diff -Nru alsa-utils-1.2.2/alsactl/init_ucm.c alsa-utils-1.2.6/alsactl/init_ucm.c --- alsa-utils-1.2.2/alsactl/init_ucm.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/init_ucm.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,75 @@ +/* + * Advanced Linux Sound Architecture Control Program - UCM Initialization + * Copyright (c) by Jaroslav Kysela + * + * + * 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 of the License, 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#include "aconfig.h" +#include +#include "alsactl.h" + +#ifdef HAVE_ALSA_USE_CASE_H + +#include + +/* + * Keep it as simple as possible. Execute commands from the + * FixedBootSequence and BootSequence only. + */ +int init_ucm(int flags, int cardno) +{ + snd_use_case_mgr_t *uc_mgr; + char id[32], *nodev; + int err; + + if (flags & FLAG_UCM_DISABLED) + return -ENXIO; + + nodev = (flags & FLAG_UCM_NODEV) ? "" : "-"; + snprintf(id, sizeof(id), "%shw:%d", nodev, cardno); + err = snd_use_case_mgr_open(&uc_mgr, id); + if (err < 0) + return err; + if (flags & FLAG_UCM_FBOOT) { + err = snd_use_case_set(uc_mgr, "_fboot", NULL); + if (err == -ENOENT && (flags & FLAG_UCM_BOOT) != 0) { + /* nothing */ + } else if (err < 0) { + goto _error; + } + } + if (flags & FLAG_UCM_BOOT) { + err = snd_use_case_set(uc_mgr, "_boot", NULL); + if (err < 0) + goto _error; + if ((flags & FLAG_UCM_DEFAULTS) != 0) + err = snd_use_case_set(uc_mgr, "_defaults", NULL); + } +_error: + snd_use_case_mgr_close(uc_mgr); + return err; +} + +#else + +int init_ucm(int flags, int cardno) +{ + return -ENXIO; +} + +#endif diff -Nru alsa-utils-1.2.2/alsactl/lock.c alsa-utils-1.2.6/alsactl/lock.c --- alsa-utils-1.2.2/alsactl/lock.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/lock.c 2021-12-06 10:17:28.000000000 +0000 @@ -63,11 +63,15 @@ if (fd < 0) { if (errno == EBUSY || errno == EAGAIN) { sleep(1); - timeout--; - } else { - err = -errno; - goto out; + continue; } + if (errno == EEXIST) { + fd = open(nfile, O_RDWR); + if (fd >= 0) + break; + } + err = -errno; + goto out; } } } diff -Nru alsa-utils-1.2.2/alsactl/monitor.c alsa-utils-1.2.6/alsactl/monitor.c --- alsa-utils-1.2.2/alsactl/monitor.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/monitor.c 2021-12-06 10:17:28.000000000 +0000 @@ -28,11 +28,12 @@ #include #include #include -#include #include #include "list.h" +#include "alsactl.h" + struct src_entry { snd_ctl_t *handle; char *name; @@ -40,29 +41,6 @@ struct list_head list; }; -struct snd_card_iterator { - int card; - char name[16]; -}; - -void snd_card_iterator_init(struct snd_card_iterator *iter) -{ - iter->card = -1; - memset(iter->name, 0, sizeof(iter->name)); -} - -static const char *snd_card_iterator_next(struct snd_card_iterator *iter) -{ - if (snd_card_next(&iter->card) < 0) - return NULL; - if (iter->card < 0) - return NULL; - - snprintf(iter->name, sizeof(iter->name), "hw:%d", iter->card); - - return (const char *)iter->name; -} - static void remove_source_entry(struct src_entry *entry) { list_del(&entry->list); @@ -159,7 +137,7 @@ struct snd_card_iterator iter; const char *cardname; - snd_card_iterator_init(&iter); + snd_card_iterator_init(&iter, -1); while ((cardname = snd_card_iterator_next(&iter))) { if (seek_entry_by_name(srcs, cardname)) continue; @@ -340,8 +318,10 @@ int count; int i; - count = epoll_wait(epfd, epev, max_ev_count, 200); + count = epoll_wait(epfd, epev, max_ev_count, -1); if (count < 0) { + if (errno == EINTR) + continue; err = count; break; } diff -Nru alsa-utils-1.2.2/alsactl/state.c alsa-utils-1.2.6/alsactl/state.c --- alsa-utils-1.2.2/alsactl/state.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/state.c 2021-12-06 10:17:28.000000000 +0000 @@ -27,7 +27,6 @@ #include #include #include -#include #include "alsactl.h" @@ -230,7 +229,7 @@ { snd_ctl_elem_value_t *ctl; snd_ctl_elem_info_t *info; - snd_config_t *control, *comment, *item, *value; + snd_config_t *control, *comment, *item = NULL, *value; const char *s; char buf[256]; unsigned int idx; @@ -656,13 +655,16 @@ const char *str; switch (snd_config_get_type(n)) { case SND_CONFIG_TYPE_INTEGER: - snd_config_get_integer(n, &i); + if (snd_config_get_integer(n, &i) < 0) + return -1; return i; case SND_CONFIG_TYPE_INTEGER64: - snd_config_get_integer64(n, &li); + if (snd_config_get_integer64(n, &li) < 0) + return -1; return li; case SND_CONFIG_TYPE_STRING: - snd_config_get_string(n, &str); + if (snd_config_get_string(n, &str) < 0) + return -1; break; default: return -1; @@ -682,17 +684,20 @@ switch (snd_config_get_type(n)) { case SND_CONFIG_TYPE_INTEGER: - snd_config_get_integer(n, &val); + if (snd_config_get_integer(n, &val) < 0) + return -1; if (val < 0 || val > 1) return -1; return val; case SND_CONFIG_TYPE_INTEGER64: - snd_config_get_integer64(n, &lval); + if (snd_config_get_integer64(n, &lval) < 0) + return -1; if (lval < 0 || lval > 1) return -1; return (int) lval; case SND_CONFIG_TYPE_STRING: - snd_config_get_string(n, &str); + if (snd_config_get_string(n, &str) < 0) + return -1; break; case SND_CONFIG_TYPE_COMPOUND: if (!force_restore || !doit) @@ -719,13 +724,16 @@ switch (snd_config_get_type(n)) { case SND_CONFIG_TYPE_INTEGER: - snd_config_get_integer(n, &val); + if (snd_config_get_integer(n, &val) < 0) + return -1; return val; case SND_CONFIG_TYPE_INTEGER64: - snd_config_get_integer64(n, &lval); + if (snd_config_get_integer64(n, &lval) < 0) + return -1; return (int) lval; case SND_CONFIG_TYPE_STRING: - snd_config_get_string(n, &str); + if (snd_config_get_string(n, &str) < 0) + return -1; break; case SND_CONFIG_TYPE_COMPOUND: if (!force_restore || !doit) @@ -1248,6 +1256,8 @@ } if (strcmp(fld, "iface") == 0) { iface = (snd_ctl_elem_iface_t)config_iface(n); + if (iface < 0) + return -EINVAL; continue; } if (strcmp(fld, "device") == 0) { @@ -1255,7 +1265,8 @@ cerror(doit, "control.%d.%s is invalid", numid, fld); return -EINVAL; } - snd_config_get_integer(n, &device); + if (snd_config_get_integer(n, &device) < 0) + return -EINVAL; continue; } if (strcmp(fld, "subdevice") == 0) { @@ -1263,7 +1274,8 @@ cerror(doit, "control.%d.%s is invalid", numid, fld); return -EINVAL; } - snd_config_get_integer(n, &subdevice); + if (snd_config_get_integer(n, &subdevice) < 0) + return -EINVAL; continue; } if (strcmp(fld, "name") == 0) { @@ -1271,7 +1283,8 @@ cerror(doit, "control.%d.%s is invalid", numid, fld); return -EINVAL; } - snd_config_get_string(n, &name); + if (snd_config_get_string(n, &name) < 0) + return -EINVAL; continue; } if (strcmp(fld, "index") == 0) { @@ -1279,7 +1292,8 @@ cerror(doit, "control.%d.%s is invalid", numid, fld); return -EINVAL; } - snd_config_get_integer(n, &index); + if (snd_config_get_integer(n, &index) < 0) + return -EINVAL; continue; } if (strcmp(fld, "value") == 0) { @@ -1468,13 +1482,19 @@ { snd_ctl_t *handle; snd_ctl_card_info_t *info; + snd_ctl_elem_list_t *list; + snd_ctl_elem_info_t *elem_info; + snd_ctl_elem_id_t *elem_id; snd_config_t *control; snd_config_iterator_t i, next; - int err, maxnumid = -1; + int err, maxnumid = -1, maxnumid2 = -1; + unsigned int idx, count = 0; char name[32], tmpid[16]; const char *id; snd_ctl_card_info_alloca(&info); - + snd_ctl_elem_list_alloca(&list); + snd_ctl_elem_info_alloca(&elem_info); + snd_ctl_elem_id_alloca(&elem_id); sprintf(name, "hw:%d", card); dbg("device='%s', doit=%i", name, doit); err = snd_ctl_open(&handle, name, 0); @@ -1514,22 +1534,54 @@ goto _close; } - dbg("maxnumid=%i", maxnumid); + if (doit) + goto _close; + + err = snd_ctl_elem_list(handle, list); + if (err < 0) { + error("Cannot determine controls: %s", snd_strerror(err)); + goto _close; + } + count = snd_ctl_elem_list_get_count(list); + dbg("list count: %u", count); + if (count == 0) + goto _check; + snd_ctl_elem_list_set_offset(list, 0); + if (snd_ctl_elem_list_alloc_space(list, count) < 0) { + error("No enough memory..."); + goto _close; + } + if ((err = snd_ctl_elem_list(handle, list)) < 0) { + error("Cannot determine controls (2): %s", snd_strerror(err)); + goto _free; + } + maxnumid2 = 0; + /* skip non-readable elements */ + for (idx = 0; idx < count; ++idx) { + snd_ctl_elem_info_clear(elem_info); + snd_ctl_elem_list_get_id(list, idx, elem_id); + snd_ctl_elem_info_set_id(elem_info, elem_id); + if (snd_ctl_elem_info(handle, elem_info) == 0) { + if (!snd_ctl_elem_info_is_readable(elem_info)) + continue; + maxnumid2++; + } + } + /* check if we have additional controls in driver */ /* in this case we should go through init procedure */ - if (!doit && maxnumid >= 0) { - snd_ctl_elem_info_t *info; - snd_ctl_elem_info_alloca(&info); - snd_ctl_elem_info_set_numid(info, maxnumid+1); - if (snd_ctl_elem_info(handle, info) == 0) { - /* not very informative */ - /* but value is used for check only */ - err = -EAGAIN; - dbg("more controls than maxnumid?"); - goto _close; - } + _check: + dbg("maxnumid=%i maxnumid2=%i", maxnumid, maxnumid2); + if (maxnumid >= 0 && maxnumid != maxnumid2) { + /* not very informative */ + /* but value is used for check only */ + err = -EAGAIN; + dbg("more controls than maxnumid?"); } + _free: + if (count >= 0) + snd_ctl_elem_list_free_space(list); _close: snd_ctl_close(handle); dbg("result code: %i", err); @@ -1545,6 +1597,7 @@ int stdio; char *nfile = NULL; int lock_fd = -EINVAL; + struct snd_card_iterator iter; err = snd_config_top(&config); if (err < 0) { @@ -1578,45 +1631,18 @@ #endif } - if (!cardname) { - int card, first = 1; - - card = -1; - /* find each installed soundcards */ - while (1) { - if (snd_card_next(&card) < 0) - break; - if (card < 0) { - if (first) { - if (ignore_nocards) { - err = 0; - goto out; - } else { - error("No soundcards found..."); - err = -ENODEV; - goto out; - } - } - break; - } - first = 0; - if ((err = get_controls(card, config))) - goto out; - } - } else { - int cardno; - - cardno = snd_card_get_index(cardname); - if (cardno < 0) { - error("Cannot find soundcard '%s'...", cardname); - err = cardno; - goto out; - } - if ((err = get_controls(cardno, config))) { + err = snd_card_iterator_sinit(&iter, cardname); + if (err < 0) + goto out; + while (snd_card_iterator_next(&iter)) { + if ((err = get_controls(iter.card, config))) goto out; - } } - + if (iter.first) { + err = snd_card_iterator_error(&iter); + goto out; + } + if (stdio) { err = snd_output_stdio_attach(&out, stdout, 0); } else { @@ -1645,142 +1671,67 @@ return err; } -int load_state(const char *file, const char *initfile, const char *cardname, - int do_init) +int load_state(const char *cfgdir, const char *file, + const char *initfile, int initflags, + const char *cardname, int do_init) { - int err, finalerr = 0; + int err, finalerr = 0, open_failed; + struct snd_card_iterator iter; snd_config_t *config; - snd_input_t *in; - int stdio, lock_fd = -EINVAL; + const char *cardname1; - err = snd_config_top(&config); - if (err < 0) { - error("snd_config_top error: %s", snd_strerror(err)); + config = NULL; + err = load_configuration(file, &config, &open_failed); + if (err < 0 && !open_failed) return err; - } - stdio = !strcmp(file, "-"); - if (stdio) { - err = snd_input_stdio_attach(&in, stdin, 0); - } else { - lock_fd = state_lock(file, 10); - err = lock_fd >= 0 ? snd_input_stdio_open(&in, file, "r") : lock_fd; - } - if (err >= 0) { - err = snd_config_load(config, in); - snd_input_close(in); - if (lock_fd >= 0) - state_unlock(lock_fd, file); - if (err < 0) { - error("snd_config_load error: %s", snd_strerror(err)); - goto out; - } - } else { - int card, first = 1; - char cardname1[16]; - if (lock_fd >= 0) - state_unlock(lock_fd, file); + if (open_failed) { error("Cannot open %s for reading: %s", file, snd_strerror(err)); finalerr = err; - if (cardname) { - card = snd_card_get_index(cardname); - if (card < 0) { - error("Cannot find soundcard '%s'...", cardname); - err = -ENODEV; - goto out; - } - goto single; - } else { - card = -1; - } - /* find each installed soundcards */ - while (!cardname) { - if (snd_card_next(&card) < 0) - break; - if (card < 0) - break; -single: - first = 0; + + err = snd_card_iterator_sinit(&iter, cardname); + if (err < 0) + return err; + while ((cardname1 = snd_card_iterator_next(&iter)) != NULL) { if (!do_init) break; - sprintf(cardname1, "%i", card); - err = init(initfile, cardname1); + err = init(cfgdir, initfile, initflags | FLAG_UCM_FBOOT | FLAG_UCM_BOOT, cardname1); if (err < 0) { finalerr = err; - initfailed(card, "init", err); + initfailed(iter.card, "init", err); } - initfailed(card, "restore", -ENOENT); + initfailed(iter.card, "restore", -ENOENT); } - if (first) - finalerr = 0; /* no cards, no error code */ err = finalerr; + if (iter.first) + err = 0; /* no cards, no error code */ goto out; } - if (!cardname) { - int card, first = 1; - char cardname1[16]; - - card = -1; - /* find each installed soundcards */ - while (1) { - if (snd_card_next(&card) < 0) - break; - if (card < 0) { - if (first) { - if (ignore_nocards) { - err = 0; - goto out; - } else { - error("No soundcards found..."); - err = -ENODEV; - goto out; - } - } - break; - } - first = 0; - /* do a check if controls matches state file */ - if (do_init && set_controls(card, config, 0)) { - sprintf(cardname1, "%i", card); - err = init(initfile, cardname1); - if (err < 0) { - initfailed(card, "init", err); - finalerr = err; - } - } - if ((err = set_controls(card, config, 1))) { - if (!force_restore) - finalerr = err; - initfailed(card, "restore", err); - } - } - } else { - int cardno; - - cardno = snd_card_get_index(cardname); - if (cardno < 0) { - error("Cannot find soundcard '%s'...", cardname); - err = -ENODEV; - goto out; - } + err = snd_card_iterator_sinit(&iter, cardname); + if (err < 0) + goto out; + while ((cardname1 = snd_card_iterator_next(&iter)) != NULL) { + /* error is ignored */ + init_ucm(initflags | FLAG_UCM_FBOOT, iter.card); /* do a check if controls matches state file */ - if (do_init && set_controls(cardno, config, 0)) { - err = init(initfile, cardname); + if (do_init && set_controls(iter.card, config, 0)) { + err = init(cfgdir, initfile, initflags | FLAG_UCM_BOOT, cardname1); if (err < 0) { - initfailed(cardno, "init", err); + initfailed(iter.card, "init", err); finalerr = err; } } - if ((err = set_controls(cardno, config, 1))) { - initfailed(cardno, "restore", err); + if ((err = set_controls(iter.card, config, 1))) { if (!force_restore) - goto out; + finalerr = err; + initfailed(iter.card, "restore", err); } } - err = finalerr; + err = finalerr ? finalerr : snd_card_iterator_error(&iter); out: - snd_config_delete(config); + if (config) + snd_config_delete(config); snd_config_update_free_global(); return err; } diff -Nru alsa-utils-1.2.2/alsactl/utils.c alsa-utils-1.2.6/alsactl/utils.c --- alsa-utils-1.2.2/alsactl/utils.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsactl/utils.c 2021-12-06 10:17:28.000000000 +0000 @@ -30,8 +30,7 @@ #include #include #include - -#include +#include #include "alsactl.h" int file_map(const char *filename, char **buf, size_t *bufsize) @@ -92,12 +91,12 @@ return; sprintf(sexitcode, "%i", exitcode); fp = open(statefile, O_WRONLY|O_CREAT|O_APPEND, 0644); - write(fp, str, strlen(str)); - write(fp, ":", 1); - write(fp, reason, strlen(reason)); - write(fp, ":", 1); - write(fp, sexitcode, strlen(sexitcode)); - write(fp, "\n", 1); + (void)write(fp, str, strlen(str)); + (void)write(fp, ":", 1); + (void)write(fp, reason, strlen(reason)); + (void)write(fp, ":", 1); + (void)write(fp, sexitcode, strlen(sexitcode)); + (void)write(fp, "\n", 1); close(fp); free(str); } @@ -107,11 +106,11 @@ { char buf[1024]; - snprintf(buf, sizeof(buf), "%s: %s:%ld", command, fcn, line); + snprintf(buf, sizeof(buf), "%s: %s:%ld: ", command, fcn, line); buf[sizeof(buf)-1] = '\0'; vsnprintf(buf + strlen(buf), sizeof(buf)-strlen(buf), fmt, ap); buf[sizeof(buf)-1] = '\0'; - syslog(LOG_INFO, "%s", buf); + syslog(prio, "%s", buf); } void info_(const char *fcn, long line, const char *fmt, ...) @@ -177,3 +176,159 @@ } va_end(ap); } + +void error_handler(const char *file, int line, const char *function, int err, const char *fmt, ...) +{ + char buf[2048]; + va_list arg; + + va_start(arg, fmt); + vsnprintf(buf, sizeof(buf), fmt, arg); + va_end(arg); + if (use_syslog) + syslog(LOG_ERR, "alsa-lib %s:%i:(%s) %s%s%s\n", file, line, function, + buf, err ? ": " : "", err ? snd_strerror(err) : ""); + else + fprintf(stderr, "alsa-lib %s:%i:(%s) %s%s%s\n", file, line, function, + buf, err ? ": " : "", err ? snd_strerror(err) : ""); +} + +int load_configuration(const char *file, snd_config_t **top, int *open_failed) +{ + snd_config_t *config; + snd_input_t *in; + int err, stdio_flag, lock_fd = -EINVAL; + + *top = NULL; + if (open_failed) + *open_failed = 0; + err = snd_config_top(&config); + if (err < 0) { + error("snd_config_top error: %s", snd_strerror(err)); + return err; + } + stdio_flag = !strcmp(file, "-"); + if (stdio_flag) { + err = snd_input_stdio_attach(&in, stdin, 0); + } else { + lock_fd = state_lock(file, 10); + err = lock_fd >= 0 ? snd_input_stdio_open(&in, file, "r") : lock_fd; + } + if (err < 0) { + if (open_failed) + *open_failed = 1; + goto out; + } + err = snd_config_load(config, in); + snd_input_close(in); + if (err < 0) { + error("snd_config_load error: %s", snd_strerror(err)); +out: + if (lock_fd >= 0) + state_unlock(lock_fd, file); + snd_config_delete(config); + snd_config_update_free_global(); + return err; + } else { + if (lock_fd >= 0) + state_unlock(lock_fd, file); + *top = config; + return 0; + } +} + +void snd_card_iterator_init(struct snd_card_iterator *iter, int cardno) +{ + iter->card = cardno; + iter->single = cardno >= 0; + iter->first = true; + iter->name[0] = '\0'; +} + +int snd_card_iterator_sinit(struct snd_card_iterator *iter, const char *cardname) +{ + int cardno = -1; + + if (cardname) { + if (strncmp(cardname, "hw:", 3) == 0) + cardname += 3; + cardno = snd_card_get_index(cardname); + if (cardno < 0) { + error("Cannot find soundcard '%s'...", cardname); + return cardno; + } + } + snd_card_iterator_init(iter, cardno); + return 0; +} + +const char *snd_card_iterator_next(struct snd_card_iterator *iter) +{ + if (iter->single) { + if (iter->first) { + iter->first = false; + goto retval; + } + return NULL; + } + if (snd_card_next(&iter->card) < 0) { + if (!ignore_nocards && iter->first) + error("No soundcards found..."); + return NULL; + } + iter->first = false; + if (iter->card < 0) + return NULL; +retval: + snprintf(iter->name, sizeof(iter->name), "hw:%d", iter->card); + + return (const char *)iter->name; +} + +int snd_card_iterator_error(struct snd_card_iterator *iter) +{ + return iter->first ? (ignore_nocards ? 0 : -ENODEV) : 0; +} + +static int cleanup_filename_filter(const struct dirent *dirent) +{ + size_t flen; + + if (dirent == NULL) + return 0; + if (dirent->d_type == DT_DIR) + return 0; + + flen = strlen(dirent->d_name); + if (flen <= 5) + return 0; + + if (strncmp(&dirent->d_name[flen-5], ".conf", 5) == 0) + return 1; + + return 0; +} + +int snd_card_clean_cfgdir(const char *cfgdir, int cardno) +{ + char path[PATH_MAX]; + struct dirent **list; + int lasterr = 0, n, j; + + snprintf(path, sizeof(path), "%s/card%d.conf.d", cfgdir, cardno); + n = scandir(path, &list, cleanup_filename_filter, NULL); + if (n < 0) { + if (errno == ENOENT) + return 0; + return -errno; + } + for (j = 0; j < n; j++) { + snprintf(path, sizeof(path), "%s/card%d.conf.d/%s", cfgdir, cardno, list[j]->d_name); + if (remove(path)) { + error("Unable to remove file '%s'", path); + lasterr = -errno; + } + } + + return lasterr; +} diff -Nru alsa-utils-1.2.2/alsaloop/Makefile.in alsa-utils-1.2.6/alsaloop/Makefile.in --- alsa-utils-1.2.2/alsaloop/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/alsaloop/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -94,7 +94,8 @@ subdir = alsaloop ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -262,8 +263,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -343,6 +344,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/alsaloop/alsaloop.1 alsa-utils-1.2.6/alsaloop/alsaloop.1 --- alsa-utils-1.2.2/alsaloop/alsaloop.1 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsaloop/alsaloop.1 2021-12-06 10:17:28.000000000 +0000 @@ -58,6 +58,11 @@ Use given CTL device for capture. .TP +\fI\-x \fP | \fI\-\-prateshift=\fP + +Specify ctl ascii name for playshift sync mode (see the Examples section). + +.TP \fI\-l \fP | \fI\-\-latency=\fP Requested latency in frames. @@ -79,7 +84,7 @@ Channel count specification. Default value is 2. .TP -\fI\-c \fP | \fI\-\-rate=\fP +\fI\-r \fP | \fI\-\-rate=\fP Rate specification. Default value is 48000 (Hz). @@ -195,10 +200,12 @@ Set process wake timeout. .SH EXAMPLES - -.TP +.nf \fBalsaloop \-C hw:0,0 \-P hw:1,0 \-t 50000\fR +\fBalsaloop \-C hw:soundcard,0 \-P hw:Loopback,0 \-t 50000 \-S playshift \\ +\-x iface=PCM,name='PCM Rate Shift 100000',device=1\fR +.ne .SH BUGS None known. .SH AUTHOR diff -Nru alsa-utils-1.2.2/alsaloop/alsaloop.c alsa-utils-1.2.6/alsaloop/alsaloop.c --- alsa-utils-1.2.2/alsaloop/alsaloop.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsaloop/alsaloop.c 2021-12-06 10:17:28.000000000 +0000 @@ -85,12 +85,17 @@ if (device == NULL) device = "hw:0,0"; handle->device = strdup(device); - if (handle->device == NULL) + if (handle->device == NULL) { + free(handle); return -ENOMEM; + } if (ctldev) { handle->ctldev = strdup(ctldev); - if (handle->ctldev == NULL) + if (handle->ctldev == NULL) { + free(handle->device); + free(handle); return -ENOMEM; + } } else { handle->ctldev = NULL; } @@ -170,6 +175,7 @@ "-C,--cdevice capture device\n" "-X,--pctl playback ctl device\n" "-Y,--cctl capture ctl device\n" +"-x,--prateshift playback 'PCM Rate Shift 100000' ascii ctl name\n" "-l,--latency requested latency in frames\n" "-t,--tlatency requested latency in usec (1/1000000sec)\n" "-f,--format sample format\n" @@ -357,6 +363,7 @@ {"cdevice", 1, NULL, 'C'}, {"pctl", 1, NULL, 'X'}, {"cctl", 1, NULL, 'Y'}, + {"prateshift", 1, NULL, 'x'}, {"latency", 1, NULL, 'l'}, {"tlatency", 1, NULL, 't'}, {"format", 1, NULL, 'f'}, @@ -386,6 +393,7 @@ char *arg_cdevice = NULL; char *arg_pctl = NULL; char *arg_cctl = NULL; + char *arg_prateshift = NULL; unsigned int arg_latency_req = 0; unsigned int arg_latency_reqtime = 10000; snd_pcm_format_t arg_format = SND_PCM_FORMAT_S16_LE; @@ -415,7 +423,7 @@ while (1) { int c; if ((c = getopt_long(argc, argv, - "hdg:P:C:X:Y:l:t:F:f:c:r:s:benvA:S:a:m:T:O:w:UW:z", + "hdg:P:C:X:Y:x:l:t:F:f:c:r:s:benvA:S:a:m:T:O:w:UW:z", long_option, NULL)) < 0) break; switch (c) { @@ -441,6 +449,9 @@ case 'Y': arg_cctl = strdup(optarg); break; + case 'x': + arg_prateshift = strdup(optarg); + break; case 'l': err = atoi(optarg); arg_latency_req = err >= 4 ? err : 4; @@ -517,6 +528,8 @@ arg_sync = SYNC_TYPE_PLAYRATESHIFT; else if (optarg[0] == 'r') arg_sync = SYNC_TYPE_SAMPLERATE; + else if (optarg[0] == 'a') + arg_sync = SYNC_TYPE_AUTO; else arg_sync = atoi(optarg); if (arg_sync < 0 || arg_sync > SYNC_TYPE_LAST) @@ -622,6 +635,9 @@ logit(LOG_CRIT, "Unable to add ossmixer controls.\n"); exit(EXIT_FAILURE); } + if (arg_prateshift) + play->prateshift_name = arg_prateshift; + #ifdef USE_SAMPLERATE loop->src_enable = arg_samplerate > 0; if (loop->src_enable) diff -Nru alsa-utils-1.2.2/alsaloop/alsaloop.h alsa-utils-1.2.6/alsaloop/alsaloop.h --- alsa-utils-1.2.2/alsaloop/alsaloop.h 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsaloop/alsaloop.h 2021-12-06 10:17:28.000000000 +0000 @@ -122,10 +122,12 @@ unsigned int ctl_pollfd_count; snd_ctl_elem_value_t *ctl_notify; snd_ctl_elem_value_t *ctl_rate_shift; + snd_ctl_elem_value_t *ctl_pitch; snd_ctl_elem_value_t *ctl_active; snd_ctl_elem_value_t *ctl_format; snd_ctl_elem_value_t *ctl_rate; snd_ctl_elem_value_t *ctl_channels; + char *prateshift_name; /* ascii name for the playback rate shift ctl elem */ }; struct loopback { diff -Nru alsa-utils-1.2.2/alsaloop/pcmjob.c alsa-utils-1.2.6/alsaloop/pcmjob.c --- alsa-utils-1.2.2/alsaloop/pcmjob.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsaloop/pcmjob.c 2021-12-06 10:17:28.000000000 +0000 @@ -556,13 +556,13 @@ if (capt->format == SND_PCM_FORMAT_S32) src_int_to_float_array((int *)(capt->buf + pos1 * capt->frame_size), - (void *)loop->src_data.data_in + + (float *)loop->src_data.data_in + pos * capt->channels, count1 * capt->channels); else src_short_to_float_array((short *)(capt->buf + pos1 * capt->frame_size), - (void *)loop->src_data.data_in + + (float *)loop->src_data.data_in + pos * capt->channels, count1 * capt->channels); count -= count1; @@ -969,13 +969,14 @@ "sync: playback silence added %li samples\n", (long)diff); play->buf_pos -= diff; play->buf_pos %= play->buf_size; - if ((err = snd_pcm_format_set_silence(play->format, play->buf + play->buf_pos * play->channels, diff)) < 0) + err = snd_pcm_format_set_silence(play->format, play->buf + play->buf_pos * play->frame_size, + diff * play->channels); + if (err < 0) return err; play->buf_count += diff; } if ((err = snd_pcm_prepare(play->handle)) < 0) { logit(LOG_CRIT, "%s prepare failed: %s\n", play->id, snd_strerror(err)); - return err; } delay1 = writeit(play); @@ -1001,7 +1002,9 @@ "sync: playback short, silence filling %li / buf_count=%li\n", (long)delay1, play->buf_count); if (delay1 > diff) delay1 = diff; - if ((err = snd_pcm_format_set_silence(play->format, play->buf + play->buf_pos * play->channels, delay1)) < 0) + err = snd_pcm_format_set_silence(play->format, play->buf + play->buf_pos * play->frame_size, + delay1 * play->channels); + if (err < 0) return err; play->buf_pos += delay1; play->buf_pos %= play->buf_size; @@ -1057,10 +1060,16 @@ { int err; - if (lhandle->ctl_rate_shift == NULL) + if (lhandle->ctl_rate_shift) { + snd_ctl_elem_value_set_integer(lhandle->ctl_rate_shift, 0, pitch * 100000); + err = snd_ctl_elem_write(lhandle->ctl, lhandle->ctl_rate_shift); + } else if (lhandle->ctl_pitch) { + // 'Playback/Capture Pitch 1000000' requires reciprocal to pitch + snd_ctl_elem_value_set_integer(lhandle->ctl_pitch, 0, (1 / pitch) * 1000000); + err = snd_ctl_elem_write(lhandle->ctl, lhandle->ctl_pitch); + } else { return 0; - snd_ctl_elem_value_set_integer(lhandle->ctl_rate_shift, 0, pitch * 100000); - err = snd_ctl_elem_write(lhandle->ctl, lhandle->ctl_rate_shift); + } if (err < 0) { logit(LOG_CRIT, "Cannot set PCM Rate Shift element for %s: %s\n", lhandle->id, snd_strerror(err)); return err; @@ -1093,7 +1102,8 @@ #endif } else if (loop->sync == SYNC_TYPE_PLAYRATESHIFT) { - set_rate_shift(loop->play, pitch); + // pitch is capture-based, playback side requires reciprocal + set_rate_shift(loop->play, 1 / pitch); #ifdef USE_SAMPLERATE if (loop->use_samplerate) { loop->src_data.src_ratio = @@ -1164,43 +1174,89 @@ return snd_ctl_elem_value_get_integer(lhandle->ctl_channels, 0); } -static void openctl_elem(struct loopback_handle *lhandle, - int device, int subdevice, - const char *name, - snd_ctl_elem_value_t **elem) +static int openctl_elem_id(struct loopback_handle *lhandle, snd_ctl_elem_id_t *id, + snd_ctl_elem_value_t **elem) { int err; if (snd_ctl_elem_value_malloc(elem) < 0) { *elem = NULL; + return -ENOMEM; + } + snd_ctl_elem_value_set_id(*elem, id); + snd_ctl_elem_value_set_interface(*elem, SND_CTL_ELEM_IFACE_PCM); + err = snd_ctl_elem_read(lhandle->ctl, *elem); + if (err < 0) { + snd_ctl_elem_value_free(*elem); + *elem = NULL; + return err; } else { - snd_ctl_elem_value_set_interface(*elem, - SND_CTL_ELEM_IFACE_PCM); - snd_ctl_elem_value_set_device(*elem, device); - snd_ctl_elem_value_set_subdevice(*elem, subdevice); - snd_ctl_elem_value_set_name(*elem, name); - err = snd_ctl_elem_read(lhandle->ctl, *elem); - if (err < 0) { - snd_ctl_elem_value_free(*elem); - *elem = NULL; - } + snd_output_printf(lhandle->loopback->output, + "Opened PCM element %s of %s, device %d, subdevice %d\n", + snd_ctl_elem_id_get_name(id), snd_ctl_name(lhandle->ctl), + snd_ctl_elem_id_get_device(id), + snd_ctl_elem_id_get_subdevice(id)); + return 0; } } +static int openctl_elem(struct loopback_handle *lhandle, + int device, int subdevice, + const char *name, + snd_ctl_elem_value_t **elem) +{ + snd_ctl_elem_id_t *id; + + snd_ctl_elem_id_alloca(&id); + snd_ctl_elem_id_set_device(id, device); + snd_ctl_elem_id_set_subdevice(id, subdevice); + snd_ctl_elem_id_set_name(id, name); + return openctl_elem_id(lhandle, id, elem); +} + +static int openctl_elem_ascii(struct loopback_handle *lhandle, char *ascii_name, + snd_ctl_elem_value_t **elem) +{ + snd_ctl_elem_id_t *id; + + snd_ctl_elem_id_alloca(&id); + if (snd_ctl_ascii_elem_id_parse(id, ascii_name)) { + fprintf(stderr, "Wrong control identifier: %s\n", ascii_name); + return -EINVAL; + } + return openctl_elem_id(lhandle, id, elem); +} + static int openctl(struct loopback_handle *lhandle, int device, int subdevice) { int err; lhandle->ctl_rate_shift = NULL; if (lhandle->loopback->play == lhandle) { + // play only + if (lhandle->prateshift_name) { + err = openctl_elem_ascii(lhandle, lhandle->prateshift_name, + &lhandle->ctl_rate_shift); + if (err < 0) { + logit(LOG_CRIT, "Unable to open playback PCM Rate Shift elem '%s'.\n", + lhandle->prateshift_name); + exit(EXIT_FAILURE); + } + } else + openctl_elem(lhandle, device, subdevice, "Playback Pitch 1000000", + &lhandle->ctl_pitch); + set_rate_shift(lhandle, 1); if (lhandle->loopback->controls) goto __events; return 0; } + // capture only openctl_elem(lhandle, device, subdevice, "PCM Notify", &lhandle->ctl_notify); openctl_elem(lhandle, device, subdevice, "PCM Rate Shift 100000", &lhandle->ctl_rate_shift); + openctl_elem(lhandle, device, subdevice, "Capture Pitch 1000000", + &lhandle->ctl_pitch); set_rate_shift(lhandle, 1); openctl_elem(lhandle, device, subdevice, "PCM Slave Active", &lhandle->ctl_active); @@ -1286,6 +1342,9 @@ if (lhandle->ctl_rate_shift) snd_ctl_elem_value_free(lhandle->ctl_rate_shift); lhandle->ctl_rate_shift = NULL; + if (lhandle->ctl_pitch) + snd_ctl_elem_value_free(lhandle->ctl_pitch); + lhandle->ctl_pitch = NULL; if (lhandle->ctl) err = snd_ctl_close(lhandle->ctl); lhandle->ctl = NULL; @@ -1331,9 +1390,9 @@ snprintf(id, sizeof(id), "%s/%s", loop->play->id, loop->capt->id); id[sizeof(id)-1] = '\0'; loop->id = strdup(id); - if (loop->sync == SYNC_TYPE_AUTO && loop->capt->ctl_rate_shift) + if (loop->sync == SYNC_TYPE_AUTO && (loop->capt->ctl_rate_shift || loop->capt->ctl_pitch)) loop->sync = SYNC_TYPE_CAPTRATESHIFT; - if (loop->sync == SYNC_TYPE_AUTO && loop->play->ctl_rate_shift) + if (loop->sync == SYNC_TYPE_AUTO && (loop->play->ctl_rate_shift || loop->play->ctl_pitch)) loop->sync = SYNC_TYPE_PLAYRATESHIFT; #ifdef USE_SAMPLERATE if (loop->sync == SYNC_TYPE_AUTO && loop->src_enable) @@ -1695,9 +1754,8 @@ static snd_pcm_sframes_t get_queued_playback_samples(struct loopback *loop) { snd_pcm_sframes_t delay; - int err; - if ((err = snd_pcm_delay(loop->play->handle, &delay)) < 0) + if (snd_pcm_delay(loop->play->handle, &delay) < 0) return 0; loop->play->last_delay = delay; delay += loop->play->buf_count; @@ -1951,8 +2009,16 @@ } if (loop->sync != SYNC_TYPE_NONE) { snd_pcm_sframes_t pqueued, cqueued; - pqueued = get_queued_playback_samples(loop); - cqueued = get_queued_capture_samples(loop); + + /* Reduce cumulative error by interleaving playback vs capture reading order */ + if (loop->total_queued_count & 1) { + pqueued = get_queued_playback_samples(loop); + cqueued = get_queued_capture_samples(loop); + } else { + cqueued = get_queued_capture_samples(loop); + pqueued = get_queued_playback_samples(loop); + } + if (verbose > 4) snd_output_printf(loop->output, "%s: queued %li/%li samples\n", loop->id, pqueued, cqueued); if (pqueued > 0) diff -Nru alsa-utils-1.2.2/alsamixer/Makefile.am alsa-utils-1.2.6/alsamixer/Makefile.am --- alsa-utils-1.2.2/alsamixer/Makefile.am 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/Makefile.am 2021-12-06 10:17:28.000000000 +0000 @@ -3,12 +3,17 @@ bin_PROGRAMS = alsamixer alsamixer_SOURCES = card_select.c card_select.h \ + bindings.c bindings.h \ cli.c \ colors.c colors.h \ + curskey.c curskey.h \ + configparser.c configparser.h \ device_name.c device_name.h \ die.c die.h \ mainloop.c mainloop.h \ mem.c mem.h \ + menu_widget.c menu_widget.h \ + mixer_clickable.c mixer_clickable.h \ mixer_controls.c mixer_controls.h \ mixer_display.c mixer_display.h \ mixer_widget.c mixer_widget.h \ diff -Nru alsa-utils-1.2.2/alsamixer/Makefile.in alsa-utils-1.2.6/alsamixer/Makefile.in --- alsa-utils-1.2.2/alsamixer/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ subdir = alsamixer ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -107,9 +108,13 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_alsamixer_OBJECTS = alsamixer-card_select.$(OBJEXT) \ - alsamixer-cli.$(OBJEXT) alsamixer-colors.$(OBJEXT) \ + alsamixer-bindings.$(OBJEXT) alsamixer-cli.$(OBJEXT) \ + alsamixer-colors.$(OBJEXT) alsamixer-curskey.$(OBJEXT) \ + alsamixer-configparser.$(OBJEXT) \ alsamixer-device_name.$(OBJEXT) alsamixer-die.$(OBJEXT) \ alsamixer-mainloop.$(OBJEXT) alsamixer-mem.$(OBJEXT) \ + alsamixer-menu_widget.$(OBJEXT) \ + alsamixer-mixer_clickable.$(OBJEXT) \ alsamixer-mixer_controls.$(OBJEXT) \ alsamixer-mixer_display.$(OBJEXT) \ alsamixer-mixer_widget.$(OBJEXT) \ @@ -134,11 +139,16 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/alsamixer-card_select.Po \ +am__depfiles_remade = ./$(DEPDIR)/alsamixer-bindings.Po \ + ./$(DEPDIR)/alsamixer-card_select.Po \ ./$(DEPDIR)/alsamixer-cli.Po ./$(DEPDIR)/alsamixer-colors.Po \ + ./$(DEPDIR)/alsamixer-configparser.Po \ + ./$(DEPDIR)/alsamixer-curskey.Po \ ./$(DEPDIR)/alsamixer-device_name.Po \ ./$(DEPDIR)/alsamixer-die.Po ./$(DEPDIR)/alsamixer-mainloop.Po \ ./$(DEPDIR)/alsamixer-mem.Po \ + ./$(DEPDIR)/alsamixer-menu_widget.Po \ + ./$(DEPDIR)/alsamixer-mixer_clickable.Po \ ./$(DEPDIR)/alsamixer-mixer_controls.Po \ ./$(DEPDIR)/alsamixer-mixer_display.Po \ ./$(DEPDIR)/alsamixer-mixer_widget.Po \ @@ -280,8 +290,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -361,6 +371,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -375,12 +386,17 @@ AM_CFLAGS = -D_GNU_SOURCE @CURSES_CFLAGS@ -DCURSESINC="@CURSESINC@" LDADD = @CURSESLIB@ alsamixer_SOURCES = card_select.c card_select.h \ + bindings.c bindings.h \ cli.c \ colors.c colors.h \ + curskey.c curskey.h \ + configparser.c configparser.h \ device_name.c device_name.h \ die.c die.h \ mainloop.c mainloop.h \ mem.c mem.h \ + menu_widget.c menu_widget.h \ + mixer_clickable.c mixer_clickable.h \ mixer_controls.c mixer_controls.h \ mixer_display.c mixer_display.h \ mixer_widget.c mixer_widget.h \ @@ -479,13 +495,18 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-bindings.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-card_select.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-cli.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-colors.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-configparser.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-curskey.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-device_name.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-die.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-mainloop.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-mem.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-menu_widget.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-mixer_clickable.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-mixer_controls.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-mixer_display.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alsamixer-mixer_widget.Po@am__quote@ # am--include-marker @@ -529,6 +550,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-card_select.obj `if test -f 'card_select.c'; then $(CYGPATH_W) 'card_select.c'; else $(CYGPATH_W) '$(srcdir)/card_select.c'; fi` +alsamixer-bindings.o: bindings.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-bindings.o -MD -MP -MF $(DEPDIR)/alsamixer-bindings.Tpo -c -o alsamixer-bindings.o `test -f 'bindings.c' || echo '$(srcdir)/'`bindings.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-bindings.Tpo $(DEPDIR)/alsamixer-bindings.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bindings.c' object='alsamixer-bindings.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-bindings.o `test -f 'bindings.c' || echo '$(srcdir)/'`bindings.c + +alsamixer-bindings.obj: bindings.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-bindings.obj -MD -MP -MF $(DEPDIR)/alsamixer-bindings.Tpo -c -o alsamixer-bindings.obj `if test -f 'bindings.c'; then $(CYGPATH_W) 'bindings.c'; else $(CYGPATH_W) '$(srcdir)/bindings.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-bindings.Tpo $(DEPDIR)/alsamixer-bindings.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bindings.c' object='alsamixer-bindings.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-bindings.obj `if test -f 'bindings.c'; then $(CYGPATH_W) 'bindings.c'; else $(CYGPATH_W) '$(srcdir)/bindings.c'; fi` + alsamixer-cli.o: cli.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-cli.o -MD -MP -MF $(DEPDIR)/alsamixer-cli.Tpo -c -o alsamixer-cli.o `test -f 'cli.c' || echo '$(srcdir)/'`cli.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-cli.Tpo $(DEPDIR)/alsamixer-cli.Po @@ -557,6 +592,34 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-colors.obj `if test -f 'colors.c'; then $(CYGPATH_W) 'colors.c'; else $(CYGPATH_W) '$(srcdir)/colors.c'; fi` +alsamixer-curskey.o: curskey.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-curskey.o -MD -MP -MF $(DEPDIR)/alsamixer-curskey.Tpo -c -o alsamixer-curskey.o `test -f 'curskey.c' || echo '$(srcdir)/'`curskey.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-curskey.Tpo $(DEPDIR)/alsamixer-curskey.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curskey.c' object='alsamixer-curskey.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-curskey.o `test -f 'curskey.c' || echo '$(srcdir)/'`curskey.c + +alsamixer-curskey.obj: curskey.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-curskey.obj -MD -MP -MF $(DEPDIR)/alsamixer-curskey.Tpo -c -o alsamixer-curskey.obj `if test -f 'curskey.c'; then $(CYGPATH_W) 'curskey.c'; else $(CYGPATH_W) '$(srcdir)/curskey.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-curskey.Tpo $(DEPDIR)/alsamixer-curskey.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='curskey.c' object='alsamixer-curskey.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-curskey.obj `if test -f 'curskey.c'; then $(CYGPATH_W) 'curskey.c'; else $(CYGPATH_W) '$(srcdir)/curskey.c'; fi` + +alsamixer-configparser.o: configparser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-configparser.o -MD -MP -MF $(DEPDIR)/alsamixer-configparser.Tpo -c -o alsamixer-configparser.o `test -f 'configparser.c' || echo '$(srcdir)/'`configparser.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-configparser.Tpo $(DEPDIR)/alsamixer-configparser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='configparser.c' object='alsamixer-configparser.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-configparser.o `test -f 'configparser.c' || echo '$(srcdir)/'`configparser.c + +alsamixer-configparser.obj: configparser.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-configparser.obj -MD -MP -MF $(DEPDIR)/alsamixer-configparser.Tpo -c -o alsamixer-configparser.obj `if test -f 'configparser.c'; then $(CYGPATH_W) 'configparser.c'; else $(CYGPATH_W) '$(srcdir)/configparser.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-configparser.Tpo $(DEPDIR)/alsamixer-configparser.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='configparser.c' object='alsamixer-configparser.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-configparser.obj `if test -f 'configparser.c'; then $(CYGPATH_W) 'configparser.c'; else $(CYGPATH_W) '$(srcdir)/configparser.c'; fi` + alsamixer-device_name.o: device_name.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-device_name.o -MD -MP -MF $(DEPDIR)/alsamixer-device_name.Tpo -c -o alsamixer-device_name.o `test -f 'device_name.c' || echo '$(srcdir)/'`device_name.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-device_name.Tpo $(DEPDIR)/alsamixer-device_name.Po @@ -613,6 +676,34 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-mem.obj `if test -f 'mem.c'; then $(CYGPATH_W) 'mem.c'; else $(CYGPATH_W) '$(srcdir)/mem.c'; fi` +alsamixer-menu_widget.o: menu_widget.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-menu_widget.o -MD -MP -MF $(DEPDIR)/alsamixer-menu_widget.Tpo -c -o alsamixer-menu_widget.o `test -f 'menu_widget.c' || echo '$(srcdir)/'`menu_widget.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-menu_widget.Tpo $(DEPDIR)/alsamixer-menu_widget.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='menu_widget.c' object='alsamixer-menu_widget.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-menu_widget.o `test -f 'menu_widget.c' || echo '$(srcdir)/'`menu_widget.c + +alsamixer-menu_widget.obj: menu_widget.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-menu_widget.obj -MD -MP -MF $(DEPDIR)/alsamixer-menu_widget.Tpo -c -o alsamixer-menu_widget.obj `if test -f 'menu_widget.c'; then $(CYGPATH_W) 'menu_widget.c'; else $(CYGPATH_W) '$(srcdir)/menu_widget.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-menu_widget.Tpo $(DEPDIR)/alsamixer-menu_widget.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='menu_widget.c' object='alsamixer-menu_widget.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-menu_widget.obj `if test -f 'menu_widget.c'; then $(CYGPATH_W) 'menu_widget.c'; else $(CYGPATH_W) '$(srcdir)/menu_widget.c'; fi` + +alsamixer-mixer_clickable.o: mixer_clickable.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-mixer_clickable.o -MD -MP -MF $(DEPDIR)/alsamixer-mixer_clickable.Tpo -c -o alsamixer-mixer_clickable.o `test -f 'mixer_clickable.c' || echo '$(srcdir)/'`mixer_clickable.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-mixer_clickable.Tpo $(DEPDIR)/alsamixer-mixer_clickable.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mixer_clickable.c' object='alsamixer-mixer_clickable.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-mixer_clickable.o `test -f 'mixer_clickable.c' || echo '$(srcdir)/'`mixer_clickable.c + +alsamixer-mixer_clickable.obj: mixer_clickable.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-mixer_clickable.obj -MD -MP -MF $(DEPDIR)/alsamixer-mixer_clickable.Tpo -c -o alsamixer-mixer_clickable.obj `if test -f 'mixer_clickable.c'; then $(CYGPATH_W) 'mixer_clickable.c'; else $(CYGPATH_W) '$(srcdir)/mixer_clickable.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-mixer_clickable.Tpo $(DEPDIR)/alsamixer-mixer_clickable.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='mixer_clickable.c' object='alsamixer-mixer_clickable.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o alsamixer-mixer_clickable.obj `if test -f 'mixer_clickable.c'; then $(CYGPATH_W) 'mixer_clickable.c'; else $(CYGPATH_W) '$(srcdir)/mixer_clickable.c'; fi` + alsamixer-mixer_controls.o: mixer_controls.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(alsamixer_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT alsamixer-mixer_controls.o -MD -MP -MF $(DEPDIR)/alsamixer-mixer_controls.Tpo -c -o alsamixer-mixer_controls.o `test -f 'mixer_controls.c' || echo '$(srcdir)/'`mixer_controls.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/alsamixer-mixer_controls.Tpo $(DEPDIR)/alsamixer-mixer_controls.Po @@ -895,13 +986,18 @@ clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am - -rm -f ./$(DEPDIR)/alsamixer-card_select.Po + -rm -f ./$(DEPDIR)/alsamixer-bindings.Po + -rm -f ./$(DEPDIR)/alsamixer-card_select.Po -rm -f ./$(DEPDIR)/alsamixer-cli.Po -rm -f ./$(DEPDIR)/alsamixer-colors.Po + -rm -f ./$(DEPDIR)/alsamixer-configparser.Po + -rm -f ./$(DEPDIR)/alsamixer-curskey.Po -rm -f ./$(DEPDIR)/alsamixer-device_name.Po -rm -f ./$(DEPDIR)/alsamixer-die.Po -rm -f ./$(DEPDIR)/alsamixer-mainloop.Po -rm -f ./$(DEPDIR)/alsamixer-mem.Po + -rm -f ./$(DEPDIR)/alsamixer-menu_widget.Po + -rm -f ./$(DEPDIR)/alsamixer-mixer_clickable.Po -rm -f ./$(DEPDIR)/alsamixer-mixer_controls.Po -rm -f ./$(DEPDIR)/alsamixer-mixer_display.Po -rm -f ./$(DEPDIR)/alsamixer-mixer_widget.Po @@ -955,13 +1051,18 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/alsamixer-card_select.Po + -rm -f ./$(DEPDIR)/alsamixer-bindings.Po + -rm -f ./$(DEPDIR)/alsamixer-card_select.Po -rm -f ./$(DEPDIR)/alsamixer-cli.Po -rm -f ./$(DEPDIR)/alsamixer-colors.Po + -rm -f ./$(DEPDIR)/alsamixer-configparser.Po + -rm -f ./$(DEPDIR)/alsamixer-curskey.Po -rm -f ./$(DEPDIR)/alsamixer-device_name.Po -rm -f ./$(DEPDIR)/alsamixer-die.Po -rm -f ./$(DEPDIR)/alsamixer-mainloop.Po -rm -f ./$(DEPDIR)/alsamixer-mem.Po + -rm -f ./$(DEPDIR)/alsamixer-menu_widget.Po + -rm -f ./$(DEPDIR)/alsamixer-mixer_clickable.Po -rm -f ./$(DEPDIR)/alsamixer-mixer_controls.Po -rm -f ./$(DEPDIR)/alsamixer-mixer_display.Po -rm -f ./$(DEPDIR)/alsamixer-mixer_widget.Po diff -Nru alsa-utils-1.2.2/alsamixer/alsamixer.1 alsa-utils-1.2.6/alsamixer/alsamixer.1 --- alsa-utils-1.2.2/alsamixer/alsamixer.1 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/alsamixer.1 2021-12-06 10:17:28.000000000 +0000 @@ -34,7 +34,7 @@ .SH MIXER VIEWS -The top-left corner of \fBalsamixer\fP is the are to show some basic +The top-left corner of \fBalsamixer\fP shows some basic information: the card name, the mixer chip name, the current view mode and the currently selected mixer item. When the mixer item is switched off, \fI[Off]\fP is displayed in its @@ -43,7 +43,7 @@ Volume bars are located below the basic information area. You can scroll left/right when all controls can't be put in a single screen. The name of each control is shown in the bottom below the volume bars. -The currently selected item is drawn in red and/of emphasized. +The currently selected item is drawn in red and/or emphasized. Each mixer control with volume capability shows a box and the current volume filled in that box. The volume percentages are displayed below @@ -170,6 +170,216 @@ hardware volume register values is used (this is the same algorithm as used in the old \fBalsamixer\fP). +.SH FILES + +Configuration is read from the following files: + +\fI$XDG_CONFIG_HOME\fP/alsamixer.rc + +\fI$HOME\fP/.config/alsamixer.rc + +.SH CONFIGURATION + +Comments start with '#'. + +.TP +\fBcolor\fP \fIelement\fP \fIforeground\fP \fIbackground\fP [\fIattribute...\fP] + +Valid values for \fIforeground\fP and \fIbackground\fP are: red, green, yellow, blue, magenta, cyan, white, black, none / default. + +Valid values for \fIattribute\fP are: bold, normal, reverse, underline, dim, italic, blink. + +See section \fBTHEME ELEMENTS\fP for a list of \fIelements\fP. + +.TP +\fBset\fP \fIoption\fP \fIvalue\fP + +\fBmouse_wheel_step\fP \fI\fP + +Set the mouse wheel step to \fI\fP + +\fBmouse_wheel_focuses_control\fP \fI0|1\fP + +If enabled (\fI1\fP), mixer controls can be changed by hovering over them and scrolling the mouse wheel. + +\fBbackground\fP \fIcolor\fP + +Set the default background color + +.TP +\fBbind\fP \fIkey_definition\fP \fIcommand\fP + +A \fIkey_definition\fP may be: + - a single character + - a combination with control: C-a + - a combination with alt: M-a + - a special keyname: Enter, Escape, PageUp, PageDown, Left, Down, Right, Up, Home, End, Backspace, F1 .. F12 + +See section \fBCOMMANDS\fP for a list of \fIcommands\fP. + +.SS COMMANDS + +.TP +\fItextbox_close\fP +Close textbox + +.TP +\fItextbox_up\fP / \fItextbox_down\fP +Scroll text up/down by one line + +.TP +\fItextbox_left\fP / \fItextbox_right\fP +Scroll text left/right by one column + +.TP +\fItextbox_page_up\fP / \fItextbox_page_down\fP +Scroll text up/down one page + +.TP +\fItextbox_page_left\fP / \fItextbox_page_right\fP +Scroll text left/right one page + +.TP +\fItextbox_top\fP / \fItextbox_bottom\fP +Go to top/bottom position of text + +.TP +\fImixer_balance_volumes\fP +Balance both channels + +.TP +\fImixer_close\fP +Close alsamixer application + +.TP +\fImixer_help\fP +Show help + +.TP +\fImixer_mode_playback\fP +Show playback controls + +.TP +\fImixer_mode_capture\fP +Show capture controls + +.TP +\fImixer_mode_all\fP +Show playback and capture controls + +.TP +\fImixer_mode_toggle\fP +Toggle between playback/capture/all controls + +.TP +\fImixer_refresh\fP +Refresh screen + +.TP +\fImixer_previous\fP / \fImixer_next\fP +Select previous/next mixer control + +.TP +\fImixer_control_focus_\fP +Focus control number \fI\fP. + +.TP +\fImixer_control_set_\fP[\fI_left\fP|\fI_right\fP] +Change volume of current control to \fI\fP percent. + +.TP +\fImixer_control_up_\fP[\fI_left\fP|\fI_right\fP] +Increase volume of current control by \fI\fP percent. + +.TP +\fImixer_control_down_\fP[\fI_left\fP|\fI_right\fP] +Decrease volume of current control by \fI\fP percent. + +.TP +\fImixer_toggle_mute\fP[\fI_left\fP|\fI_right\fP] +Toggle mute state of both/left/right channels + +.TP +\fImixer_toggle_capture\fP[\fI_left\fP|\fI_right\fP] +Toggle capture state of both/left/right channels + +.TP +\fImixer_select_card\fP +Show window for selecting sound card + +.TP +\fImixer_system_information\fP +Show system information + + +.SS THEME ELEMENTS + +.TP +\fImixer_frame\fP Color of the box around the mixer + +.TP +\fImixer_text\fP Color of text at the top of the mixer + +.TP +\fImixer_active\fP Color of \fIAlsaMixer\fP heading + +.TP +\fIctl_frame\fP Color of the frame around the mixer controls + +.TP +\fIctl_mute\fP Color indicating the mute state (\fIMM\fP) + +.TP +\fIctl_nomute\fP Color indicating the unmute state (\fI00\fP) + +.TP +\fIctl_capture\fP Color of \fICAPTURE\fP text + +.TP +\fIctl_nocapture\fP Colof of disabled capture label + +.TP +\fIctl_label\fP Color of label underneath mixer controls + +.TP +\fIctl_label_focus\fP Color of label underneath focused mixer control + +.TP +\fIctl_mark_focus\fP Color of \fI<>\fP marks beside focused mixer label + +.TP +\fIctl_bar_lo\fP Color of lower volume bar + +.TP +\fIctl_bar_mi\fP Color of middle volume bar + +.TP +\fIctl_bar_hi\fP Color of top volume bar + +.TP +\fIctl_inactive\fP Color for inactive control + +.TP +\fIctl_label_inactive\fP Color for inactive label + +.TP +\fIerrormsg\fP Color used for error message + +.TP +\fIinfomsg\fP Color used for information message + +.TP +\fItextbox\fP Color used for textbox (user input) + +.TP +\fItextfield\fP Color used for textbox + +.TP +\fImenu\fP Color used for menu + +.TP +\fImenu_selected\fP Color used for selected entry in menu + .SH SEE ALSO \fB amixer(1), @@ -177,11 +387,6 @@ arecord(1) \fP -.SH BUGS -Some terminal emulators (e.g. \fBnxterm\fP) may not -work quite right with ncurses, but that's their own damn -fault. Plain old \fBxterm\fP seems to be fine. - .SH AUTHOR .B alsamixer has been written by Tim Janik and diff -Nru alsa-utils-1.2.2/alsamixer/bindings.c alsa-utils-1.2.6/alsamixer/bindings.c --- alsa-utils-1.2.2/alsamixer/bindings.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/bindings.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,132 @@ +#include "bindings.h" +#include "mixer_widget.h" + +#define CNTRL(C) (C%32) + +uint8_t textbox_bindings[KEY_MAX] = { + ['\n'] = CMD_TEXTBOX_CLOSE, + ['\r'] = CMD_TEXTBOX_CLOSE, + [27] = CMD_TEXTBOX_CLOSE, + [KEY_CANCEL] = CMD_TEXTBOX_CLOSE, + [KEY_ENTER] = CMD_TEXTBOX_CLOSE, + [KEY_CLOSE] = CMD_TEXTBOX_CLOSE, + [KEY_EXIT] = CMD_TEXTBOX_CLOSE, + [KEY_DOWN] = CMD_TEXTBOX_DOWN, + [KEY_SF] = CMD_TEXTBOX_DOWN, + ['J'] = CMD_TEXTBOX_DOWN, + ['j'] = CMD_TEXTBOX_DOWN, + ['X'] = CMD_TEXTBOX_DOWN, + ['x'] = CMD_TEXTBOX_DOWN, + [KEY_UP] = CMD_TEXTBOX_UP, + [KEY_SR] = CMD_TEXTBOX_UP, + ['K'] = CMD_TEXTBOX_UP, + ['k'] = CMD_TEXTBOX_UP, + ['W'] = CMD_TEXTBOX_UP, + ['w'] = CMD_TEXTBOX_UP, + [KEY_LEFT] = CMD_TEXTBOX_LEFT, + ['H'] = CMD_TEXTBOX_LEFT, + ['h'] = CMD_TEXTBOX_LEFT, + ['P'] = CMD_TEXTBOX_LEFT, + ['p'] = CMD_TEXTBOX_LEFT, + [KEY_RIGHT] = CMD_TEXTBOX_RIGHT, + ['L'] = CMD_TEXTBOX_RIGHT, + ['l'] = CMD_TEXTBOX_RIGHT, + ['N'] = CMD_TEXTBOX_RIGHT, + ['n'] = CMD_TEXTBOX_RIGHT, + [KEY_NPAGE] = CMD_TEXTBOX_PAGE_DOWN, + [' '] = CMD_TEXTBOX_PAGE_DOWN, + [KEY_PPAGE] = CMD_TEXTBOX_PAGE_UP, + [KEY_BACKSPACE] = CMD_TEXTBOX_PAGE_UP, + ['B'] = CMD_TEXTBOX_PAGE_UP, + ['b'] = CMD_TEXTBOX_PAGE_UP, + [KEY_HOME] = CMD_TEXTBOX_TOP, + [KEY_BEG] = CMD_TEXTBOX_TOP, + [KEY_LL] = CMD_TEXTBOX_BOTTOM, + [KEY_END] = CMD_TEXTBOX_BOTTOM, + ['\t'] = CMD_TEXTBOX_PAGE_RIGHT, + [KEY_BTAB] = CMD_TEXTBOX_PAGE_LEFT, +}; + +command_enum mixer_bindings[] = { + [27] = CMD_MIXER_CLOSE, + [KEY_CANCEL] = CMD_MIXER_CLOSE, + [KEY_F(10)] = CMD_MIXER_CLOSE, + [KEY_F(1)] = CMD_MIXER_HELP, + [KEY_HELP] = CMD_MIXER_HELP, + ['H'] = CMD_MIXER_HELP, + ['h'] = CMD_MIXER_HELP, + ['?'] = CMD_MIXER_HELP, + [KEY_F(2)] = CMD_MIXER_SYSTEM_INFORMATION, + ['/'] = CMD_MIXER_SYSTEM_INFORMATION, + [KEY_F(3)] = CMD_WITH_ARG(CMD_MIXER_SET_VIEW_MODE, VIEW_MODE_PLAYBACK), + [KEY_F(4)] = CMD_WITH_ARG(CMD_MIXER_SET_VIEW_MODE, VIEW_MODE_CAPTURE), + [KEY_F(5)] = CMD_WITH_ARG(CMD_MIXER_SET_VIEW_MODE, VIEW_MODE_ALL), + ['\t'] = CMD_MIXER_TOGGLE_VIEW_MODE, + [KEY_F(6)] = CMD_MIXER_SELECT_CARD, + ['S'] = CMD_MIXER_SELECT_CARD, + ['s'] = CMD_MIXER_SELECT_CARD, + [KEY_REFRESH] = CMD_MIXER_REFRESH, + [CNTRL('L')] = CMD_MIXER_REFRESH, + ['L'] = CMD_MIXER_REFRESH, + ['l'] = CMD_MIXER_REFRESH, + [KEY_LEFT] = CMD_WITH_ARG(CMD_MIXER_PREVIOUS, 1), + ['p'] = CMD_WITH_ARG(CMD_MIXER_PREVIOUS, 1), + ['P'] = CMD_WITH_ARG(CMD_MIXER_PREVIOUS, 1), + [KEY_RIGHT] = CMD_WITH_ARG(CMD_MIXER_NEXT, 1), + ['N'] = CMD_WITH_ARG(CMD_MIXER_NEXT, 1), + ['n'] = CMD_WITH_ARG(CMD_MIXER_NEXT, 1), + [KEY_PPAGE] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP, 5), + [KEY_NPAGE] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN, 5), + [KEY_LL] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 0), + [KEY_END] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 0), + ['0'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 0), + ['1'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 10), + ['2'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 20), + ['3'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 30), + ['4'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 40), + ['5'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 50), + ['6'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 60), + ['7'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 70), + ['8'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 80), + ['9'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 90), +#if 0 + [KEY_BEG] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 100), + [KEY_HELP] = CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT, 100), +#endif + [KEY_UP] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP, 1), + ['+'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP, 1), + ['K'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP, 1), + ['k'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP, 1), + ['W'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP, 1), + ['w'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP, 1), + [KEY_DOWN] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN, 1), + ['-'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN, 1), + ['J'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN, 1), + ['j'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN, 1), + ['X'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN, 1), + ['x'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN, 1), + ['Q'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP_LEFT, 1), + ['q'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP_LEFT, 1), + ['Y'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN_LEFT, 1), + ['y'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN_LEFT, 1), + ['Z'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN_LEFT, 1), + ['z'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN_LEFT, 1), + ['E'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP_RIGHT, 1), + ['e'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_UP_RIGHT, 1), + ['C'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN_RIGHT, 1), + ['c'] = CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN_RIGHT, 1), + ['M'] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_MUTE, LEFT|RIGHT), + ['m'] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_MUTE, LEFT|RIGHT), + ['<'] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_MUTE, LEFT), + [','] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_MUTE, LEFT), + ['>'] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_MUTE, RIGHT), + ['.'] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_MUTE, RIGHT), + [' '] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_CAPTURE, LEFT|RIGHT), + [KEY_IC] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_CAPTURE, LEFT), + [';'] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_CAPTURE, LEFT), + [KEY_DC] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_CAPTURE, RIGHT), + ['\''] = CMD_WITH_ARG(CMD_MIXER_TOGGLE_CAPTURE, RIGHT), + ['B'] = CMD_MIXER_BALANCE_CONTROL, + ['b'] = CMD_MIXER_BALANCE_CONTROL, + ['='] = CMD_MIXER_BALANCE_CONTROL, +}; diff -Nru alsa-utils-1.2.2/alsamixer/bindings.h alsa-utils-1.2.6/alsamixer/bindings.h --- alsa-utils-1.2.2/alsamixer/bindings.h 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/bindings.h 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,81 @@ +#ifndef BINDINGS_H_INCLUDED +#define BINDINGS_H_INCLUDED + +#include CURSESINC +#include +#include + +/* Commands are stored in an uint16_t and may take an unsigned numeric argument. + * The command itself is stored in the lower 7 bits, the argument is stored + * in the higher 9 bits. + * + * The value `0` is used for no (unbound) command. */ + +typedef uint16_t command_enum; +extern command_enum mixer_bindings[KEY_MAX]; +/* No need for a 16bit type, since textbox commands don't take arguments */ +extern uint8_t textbox_bindings[KEY_MAX]; + +#define CMD_WITH_ARG(CMD, ARG) \ + ((CMD) + ((ARG) << 9)) + +#define CMD_GET_COMMAND(CMD) \ + ((CMD) & 0x1FF) + +#define CMD_GET_ARGUMENT(CMD) \ + ((CMD) >> 9) + +enum mixer_command { + // `CMD % 4` should produce the channel mask + CMD_MIXER_CONTROL_DOWN_LEFT = 1, + CMD_MIXER_CONTROL_DOWN_RIGHT, + CMD_MIXER_CONTROL_DOWN, + CMD_MIXER_CONTROL_UP_LEFT = 5, + CMD_MIXER_CONTROL_UP_RIGHT, + CMD_MIXER_CONTROL_UP, + CMD_MIXER_CONTROL_SET_PERCENT_LEFT = 9, + CMD_MIXER_CONTROL_SET_PERCENT_RIGHT, + CMD_MIXER_CONTROL_SET_PERCENT, + + // Keep those in the same order as displayed on screen + CMD_MIXER_HELP, + CMD_MIXER_SYSTEM_INFORMATION, + CMD_MIXER_SELECT_CARD, + CMD_MIXER_CLOSE, + + CMD_MIXER_TOGGLE_VIEW_MODE, + CMD_MIXER_SET_VIEW_MODE, + CMD_MIXER_PREVIOUS, + CMD_MIXER_NEXT, + CMD_MIXER_FOCUS_CONTROL, + CMD_MIXER_TOGGLE_MUTE, + CMD_MIXER_TOGGLE_CAPTURE, + CMD_MIXER_BALANCE_CONTROL, + CMD_MIXER_REFRESH, + + // Mouse + CMD_MIXER_MOUSE_CLICK_MUTE, + CMD_MIXER_MOUSE_CLICK_VOLUME_BAR, + CMD_MIXER_MOUSE_CLICK_CONTROL_ENUM, +}; + +enum textbox_command { + /* Since these commands are also used by the menu widget we make use of + * the menu_driver() request constants. + * KEY_MAX is substracted so the value fits in 8 bits. */ + CMD_TEXTBOX___MIN_MENU_COMMAND = MIN_MENU_COMMAND - KEY_MAX, + CMD_TEXTBOX_TOP = REQ_FIRST_ITEM - KEY_MAX, + CMD_TEXTBOX_BOTTOM = REQ_LAST_ITEM - KEY_MAX, + CMD_TEXTBOX_LEFT = REQ_LEFT_ITEM - KEY_MAX, + CMD_TEXTBOX_RIGHT = REQ_RIGHT_ITEM - KEY_MAX, + CMD_TEXTBOX_UP = REQ_UP_ITEM - KEY_MAX, + CMD_TEXTBOX_DOWN = REQ_DOWN_ITEM - KEY_MAX, + CMD_TEXTBOX_PAGE_DOWN = REQ_SCR_DPAGE - KEY_MAX, + CMD_TEXTBOX_PAGE_UP = REQ_SCR_UPAGE - KEY_MAX, + CMD_TEXTBOX___MAX_MENU_COMMAND = MAX_MENU_COMMAND - KEY_MAX, + CMD_TEXTBOX_PAGE_LEFT, + CMD_TEXTBOX_PAGE_RIGHT, + CMD_TEXTBOX_CLOSE, +}; + +#endif diff -Nru alsa-utils-1.2.2/alsamixer/card_select.c alsa-utils-1.2.6/alsamixer/card_select.c --- alsa-utils-1.2.2/alsamixer/card_select.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/card_select.c 2021-12-06 10:17:28.000000000 +0000 @@ -28,6 +28,7 @@ #include "utils.h" #include "colors.h" #include "widget.h" +#include "menu_widget.h" #include "mixer_widget.h" #include "device_name.h" #include "card_select.h" @@ -59,86 +60,24 @@ } } -static void on_menu_key(int key) -{ - static const struct { - int key; - int request; - } key_map[] = { - { KEY_DOWN, REQ_DOWN_ITEM }, - { KEY_UP, REQ_UP_ITEM }, - { KEY_HOME, REQ_FIRST_ITEM }, - { KEY_NPAGE, REQ_SCR_DPAGE }, - { KEY_PPAGE, REQ_SCR_UPAGE }, - { KEY_BEG, REQ_FIRST_ITEM }, - { KEY_END, REQ_LAST_ITEM }, - }; - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(key_map); ++i) - if (key_map[i].key == key) { - menu_driver(menu, key_map[i].request); - break; - } -} - static void on_handle_key(int key) { - switch (key) { - case 27: - case KEY_CANCEL: - case 'q': - case 'Q': - list_widget.close(); - break; - case 10: - case 13: - case KEY_ENTER: - on_key_enter(); - break; - default: - on_menu_key(key); - break; - } -} - -static bool create(void) -{ - int rows, columns; - const char *title; - - if (screen_lines < 3 || screen_cols < 10) { - beep(); - list_widget.close(); - return FALSE; + switch (menu_widget_handle_key(menu, key)) { + case KEY_ENTER: + on_key_enter(); + break; + case KEY_CANCEL: + list_widget.close(); + break; } - scale_menu(menu, &rows, &columns); - rows += 2; - columns += 2; - if (rows > screen_lines) - rows = screen_lines; - if (columns > screen_cols) - columns = screen_cols; - - widget_init(&list_widget, rows, columns, SCREEN_CENTER, SCREEN_CENTER, - attr_menu, WIDGET_BORDER | WIDGET_SUBWINDOW); - - title = _("Sound Card"); - mvwprintw(list_widget.window, 0, (columns - 2 - get_mbs_width(title)) / 2, " %s ", title); - set_menu_win(menu, list_widget.window); - set_menu_sub(menu, list_widget.subwindow); - return TRUE; } -static void on_window_size_changed(void) +static void create(void) { - unpost_menu(menu); - if (!create()) - return; - post_menu(menu); + menu_widget_create(&list_widget, menu, _("Sound Card")); } -static void on_close(void) +void close_card_select_list(void) { unsigned int i; struct card *card, *next_card; @@ -158,15 +97,10 @@ widget_free(&list_widget); } -void close_card_select_list(void) -{ - on_close(); -} - static struct widget list_widget = { .handle_key = on_handle_key, - .window_size_changed = on_window_size_changed, - .close = on_close, + .window_size_changed = create, + .close = close_card_select_list, }; static int get_cards(void) @@ -174,7 +108,7 @@ int count, number, err; snd_ctl_t *ctl; snd_ctl_card_info_t *info; - char buf[16]; + char buf[32]; struct card *card, *prev_card; first_card.indexstr = "-"; @@ -191,7 +125,11 @@ fatal_alsa_error(_("cannot enumerate sound cards"), err); if (number < 0) break; +#if defined(SND_LIB_VER) && SND_LIB_VER(1, 2, 5) <= SND_LIB_VERSION + sprintf(buf, "sysdefault:%d", number); +#else sprintf(buf, "hw:%d", number); +#endif err = snd_ctl_open(&ctl, buf, 0); if (err < 0) continue; @@ -200,11 +138,9 @@ if (err < 0) continue; card = ccalloc(1, sizeof *card); - sprintf(buf, "%d", number); - card->indexstr = cstrdup(buf); - card->name = cstrdup(snd_ctl_card_info_get_name(info)); - sprintf(buf, "hw:%d", number); card->device_name = cstrdup(buf); + card->indexstr = cstrdup(buf + 3); + card->name = cstrdup(snd_ctl_card_info_get_name(info)); prev_card->next = card; prev_card = card; ++count; @@ -253,16 +189,13 @@ menu = new_menu(items); if (!menu) fatal_error("cannot create menu"); - set_menu_fore(menu, attr_menu_selected); - set_menu_back(menu, attr_menu); + set_menu_fore(menu, attrs.menu_selected); + set_menu_back(menu, attrs.menu); set_menu_mark(menu, NULL); if (initial_item) set_current_item(menu, initial_item); set_menu_spacing(menu, 2, 1, 1); menu_opts_on(menu, O_SHOWDESC); - if (!create()) - return; - - post_menu(menu); + create(); } diff -Nru alsa-utils-1.2.2/alsamixer/cli.c alsa-utils-1.2.6/alsamixer/cli.c --- alsa-utils-1.2.2/alsamixer/cli.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/cli.c 2021-12-06 10:17:28.000000000 +0000 @@ -27,8 +27,11 @@ #include "gettext_curses.h" #include "mixer_widget.h" #include "mainloop.h" +#include "configparser.h" static int use_color = 1; +static int use_mouse = 1; +static const char* config_file = CONFIG_DEFAULT; static struct snd_mixer_selem_regopt selem_regopt = { .ver = 1, .abstract = SND_MIXER_SABSTRACT_NONE, @@ -42,6 +45,10 @@ " -h, --help this help\n" " -c, --card=NUMBER sound card number or id\n" " -D, --device=NAME mixer device name\n" + " -m, --mouse enable mouse\n" + " -M, --no-mouse disable mouse\n" + " -f, --config=FILE configuration file\n" + " -F, --no-config do not load configuration file\n" " -V, --view=MODE starting view mode: playback/capture/all")); puts(_("Debugging options:\n" " -g, --no-color toggle using of colors\n" @@ -50,11 +57,15 @@ static void parse_options(int argc, char *argv[]) { - static const char short_options[] = "hc:D:V:gsa:"; + static const char short_options[] = "hc:D:f:FmMV:gsa:"; static const struct option long_options[] = { { .name = "help", .val = 'h' }, { .name = "card", .has_arg = 1, .val = 'c' }, + { .name = "config", .has_arg = 1, .val = 'f' }, + { .name = "no-config", .val = 'F' }, { .name = "device", .has_arg = 1, .val = 'D' }, + { .name = "mouse", .val = 'm' }, + { .name = "no-mouse", .val = 'M' }, { .name = "view", .has_arg = 1, .val = 'V' }, { .name = "no-color", .val = 'g' }, { .name = "abstraction", .has_arg = 1, .val = 'a' }, @@ -62,7 +73,7 @@ }; int option; int card_index; - static char name_buf[16]; + static char name_buf[24]; while ((option = getopt_long(argc, argv, short_options, long_options, NULL)) != -1) { @@ -77,12 +88,28 @@ fprintf(stderr, _("invalid card index: %s\n"), optarg); goto fail; } +#if defined(SND_LIB_VER) && SND_LIB_VER(1, 2, 5) <= SND_LIB_VERSION + sprintf(name_buf, "sysdefault:%d", card_index); +#else sprintf(name_buf, "hw:%d", card_index); +#endif selem_regopt.device = name_buf; break; case 'D': selem_regopt.device = optarg; break; + case 'f': + config_file = optarg; + break; + case 'F': + config_file = NULL; + break; + case 'm': + use_mouse = 1; + break; + case 'M': + use_mouse = 0; + break; case 'V': if (*optarg == 'p' || *optarg == 'P') view_mode = VIEW_MODE_PLAYBACK; @@ -125,9 +152,14 @@ parse_options(argc, argv); + if (config_file == CONFIG_DEFAULT) + parse_default_config_file(); + else if (config_file) + parse_config_file(config_file); + create_mixer_object(&selem_regopt); - initialize_curses(use_color); + initialize_curses(use_color, use_mouse); create_mixer_widget(); diff -Nru alsa-utils-1.2.2/alsamixer/colors.c alsa-utils-1.2.6/alsamixer/colors.c --- alsa-utils-1.2.2/alsamixer/colors.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/colors.c 2021-12-06 10:17:28.000000000 +0000 @@ -22,98 +22,101 @@ #include CURSESINC #include "colors.h" -int attr_mixer_frame; -int attr_mixer_text; -int attr_mixer_active; -int attr_ctl_frame; -int attr_ctl_mute; -int attr_ctl_nomute; -int attr_ctl_capture; -int attr_ctl_nocapture; -int attr_ctl_label; -int attr_ctl_label_focus; -int attr_ctl_mark_focus; -int attr_ctl_bar_lo; -#ifdef TRICOLOR_VOLUME_BAR -int attr_ctl_bar_mi; -int attr_ctl_bar_hi; -#endif -int attr_ctl_inactive; -int attr_ctl_label_inactive; -int attr_errormsg; -int attr_infomsg; -int attr_textbox; -int attr_textfield; -int attr_menu; -int attr_menu_selected; +struct attributes attrs; +short background_color = -1; + +int get_color_pair(short fg, short bg) +{ + static int color_pairs_defined = 0; + short i, pair_fg, pair_bg; + + for (i = 1; i <= color_pairs_defined; ++i) { + if (OK == pair_content(i, &pair_fg, &pair_bg)) + if (pair_fg == fg && pair_bg == bg) + return COLOR_PAIR(i); + } + + if (color_pairs_defined + 1 < COLOR_PAIRS) { + ++color_pairs_defined; + init_pair(color_pairs_defined, fg, bg); + return COLOR_PAIR(color_pairs_defined); + } + + return 0; +} void init_colors(int use_color) { if (!!has_colors() == !!use_color) { start_color(); + use_default_colors(); - init_pair(1, COLOR_CYAN, COLOR_BLACK); - init_pair(2, COLOR_YELLOW, COLOR_BLACK); - init_pair(3, COLOR_WHITE, COLOR_GREEN); - init_pair(4, COLOR_RED, COLOR_BLACK); - init_pair(5, COLOR_WHITE, COLOR_BLACK); - init_pair(6, COLOR_WHITE, COLOR_BLUE); - init_pair(7, COLOR_RED, COLOR_BLUE); - init_pair(8, COLOR_GREEN, COLOR_GREEN); - init_pair(9, COLOR_WHITE, COLOR_RED); + get_color_pair(COLOR_CYAN, background_color); // COLOR_PAIR(1) + get_color_pair(COLOR_YELLOW, background_color); + get_color_pair(COLOR_WHITE, COLOR_GREEN); + get_color_pair(COLOR_RED, background_color); + get_color_pair(COLOR_WHITE, background_color); + get_color_pair(COLOR_WHITE, COLOR_BLUE); + get_color_pair(COLOR_RED, COLOR_BLUE); + get_color_pair(COLOR_GREEN, COLOR_GREEN); + get_color_pair(COLOR_WHITE, COLOR_RED); // COLOR_PAIR(9) #ifdef TRICOLOR_VOLUME_BAR - init_pair(10, COLOR_WHITE, COLOR_WHITE); - init_pair(11, COLOR_RED, COLOR_RED); + get_color_pair(COLOR_WHITE, COLOR_WHITE); + get_color_pair(COLOR_RED, COLOR_RED); #endif - attr_mixer_frame = COLOR_PAIR(1); - attr_mixer_text = COLOR_PAIR(1); - attr_mixer_active = A_BOLD | COLOR_PAIR(2); - attr_ctl_frame = A_BOLD | COLOR_PAIR(1); - attr_ctl_mute = COLOR_PAIR(1); - attr_ctl_nomute = A_BOLD | COLOR_PAIR(3); - attr_ctl_capture = A_BOLD | COLOR_PAIR(4); - attr_ctl_nocapture = COLOR_PAIR(5); - attr_ctl_label = A_BOLD | COLOR_PAIR(6); - attr_ctl_label_focus = A_BOLD | COLOR_PAIR(7); - attr_ctl_mark_focus = A_BOLD | COLOR_PAIR(4); - attr_ctl_bar_lo = A_BOLD | COLOR_PAIR(8); + attrs = (struct attributes) { + .mixer_frame = COLOR_PAIR(1), + .mixer_text = COLOR_PAIR(1), + .mixer_active = A_BOLD | COLOR_PAIR(2), + .ctl_frame = A_BOLD | COLOR_PAIR(1), + .ctl_mute = COLOR_PAIR(1), + .ctl_nomute = A_BOLD | COLOR_PAIR(3), + .ctl_capture = A_BOLD | COLOR_PAIR(4), + .ctl_nocapture = COLOR_PAIR(5), + .ctl_label = A_BOLD | COLOR_PAIR(6), + .ctl_label_focus = A_BOLD | COLOR_PAIR(7), + .ctl_mark_focus = A_BOLD | COLOR_PAIR(4), + .ctl_bar_lo = A_BOLD | COLOR_PAIR(8), #ifdef TRICOLOR_VOLUME_BAR - attr_ctl_bar_mi = A_BOLD | COLOR_PAIR(10); - attr_ctl_bar_hi = A_BOLD | COLOR_PAIR(11); + .ctl_bar_mi = A_BOLD | COLOR_PAIR(10), + .ctl_bar_hi = A_BOLD | COLOR_PAIR(11), #endif - attr_ctl_inactive = COLOR_PAIR(5); - attr_ctl_label_inactive = A_REVERSE | COLOR_PAIR(5); - attr_errormsg = A_BOLD | COLOR_PAIR(9); - attr_infomsg = A_BOLD | COLOR_PAIR(6); - attr_textbox = A_BOLD | COLOR_PAIR(6); - attr_textfield = A_REVERSE | COLOR_PAIR(5); - attr_menu = A_BOLD | COLOR_PAIR(6); - attr_menu_selected = A_REVERSE | COLOR_PAIR(6); + .ctl_inactive = COLOR_PAIR(5), + .ctl_label_inactive = A_REVERSE | COLOR_PAIR(5), + .errormsg = A_BOLD | COLOR_PAIR(9), + .infomsg = A_BOLD | COLOR_PAIR(6), + .textbox = A_BOLD | COLOR_PAIR(6), + .textfield = A_REVERSE | COLOR_PAIR(5), + .menu = A_BOLD | COLOR_PAIR(6), + .menu_selected = A_REVERSE | COLOR_PAIR(6) + }; } else { - attr_mixer_frame = A_NORMAL; - attr_mixer_text = A_NORMAL; - attr_mixer_active = A_BOLD; - attr_ctl_frame = A_BOLD; - attr_ctl_mute = A_NORMAL; - attr_ctl_nomute = A_BOLD; - attr_ctl_capture = A_BOLD; - attr_ctl_nocapture = A_NORMAL; - attr_ctl_label = A_REVERSE; - attr_ctl_label_focus = A_REVERSE | A_BOLD; - attr_ctl_mark_focus = A_BOLD; - attr_ctl_bar_lo = A_BOLD; + attrs = (struct attributes) { + .mixer_frame = A_NORMAL, + .mixer_text = A_NORMAL, + .mixer_active = A_BOLD, + .ctl_frame = A_BOLD, + .ctl_mute = A_NORMAL, + .ctl_nomute = A_BOLD, + .ctl_capture = A_BOLD, + .ctl_nocapture = A_NORMAL, + .ctl_label = A_REVERSE, + .ctl_label_focus = A_REVERSE | A_BOLD, + .ctl_mark_focus = A_BOLD, + .ctl_bar_lo = A_BOLD, #ifdef TRICOLOR_VOLUME_BAR - attr_ctl_bar_mi = A_BOLD; - attr_ctl_bar_hi = A_BOLD; + .ctl_bar_mi = A_BOLD, + .ctl_bar_hi = A_BOLD, #endif - attr_ctl_inactive = A_NORMAL; - attr_ctl_label_inactive = A_REVERSE; - attr_errormsg = A_STANDOUT; - attr_infomsg = A_NORMAL; - attr_textbox = A_NORMAL; - attr_textfield = A_REVERSE; - attr_menu = A_NORMAL; - attr_menu_selected = A_REVERSE; + .ctl_inactive = A_NORMAL, + .ctl_label_inactive = A_REVERSE, + .errormsg = A_STANDOUT, + .infomsg = A_NORMAL, + .textbox = A_NORMAL, + .textfield = A_REVERSE, + .menu = A_NORMAL, + .menu_selected = A_REVERSE, + }; } } diff -Nru alsa-utils-1.2.2/alsamixer/colors.h alsa-utils-1.2.6/alsamixer/colors.h --- alsa-utils-1.2.2/alsamixer/colors.h 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/colors.h 2021-12-06 10:17:28.000000000 +0000 @@ -3,31 +3,40 @@ #define TRICOLOR_VOLUME_BAR -extern int attr_mixer_frame; -extern int attr_mixer_text; -extern int attr_mixer_active; -extern int attr_ctl_frame; -extern int attr_ctl_mute; -extern int attr_ctl_nomute; -extern int attr_ctl_capture; -extern int attr_ctl_nocapture; -extern int attr_ctl_label; -extern int attr_ctl_label_focus; -extern int attr_ctl_mark_focus; -extern int attr_ctl_bar_lo; +struct attributes { + // Alphabetically sorted #ifdef TRICOLOR_VOLUME_BAR -extern int attr_ctl_bar_mi; -extern int attr_ctl_bar_hi; + int ctl_bar_hi; #endif -extern int attr_ctl_inactive; -extern int attr_ctl_label_inactive; -extern int attr_errormsg; -extern int attr_infomsg; -extern int attr_textbox; -extern int attr_textfield; -extern int attr_menu; -extern int attr_menu_selected; + int ctl_bar_lo; +#ifdef TRICOLOR_VOLUME_BAR + int ctl_bar_mi; +#endif + int ctl_capture; + int ctl_frame; + int ctl_inactive; + int ctl_label; + int ctl_label_focus; + int ctl_label_inactive; + int ctl_mark_focus; + int ctl_mute; + int ctl_nocapture; + int ctl_nomute; + int errormsg; + int infomsg; + int menu; + int menu_selected; + int mixer_active; + int mixer_frame; + int mixer_text; + int textbox; + int textfield; +}; + +extern struct attributes attrs; +extern short background_color; void init_colors(int use_color); +int get_color_pair(short fg, short bg); #endif diff -Nru alsa-utils-1.2.2/alsamixer/configparser.c alsa-utils-1.2.6/alsamixer/configparser.c --- alsa-utils-1.2.2/alsamixer/configparser.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/configparser.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,601 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include CURSESINC +#include "colors.h" +#include "gettext_curses.h" +#include "utils.h" +#include "curskey.h" +#include "bindings.h" +#include "mixer_widget.h" + +#define ERROR_CONFIG (-1) +#define ERROR_MISSING_ARGUMENTS (-2) +#define ERROR_TOO_MUCH_ARGUMENTS (-3) + +static const char *error_message; +static const char *error_cause; + +static int strlist_index(const char *haystack, unsigned int itemlen, const char *needle) { + unsigned int needle_len; + unsigned int pos; + const char *found; + + needle_len = strlen(needle); + if (needle_len <= itemlen && needle[needle_len - 1] != ' ') { + found = strstr(haystack, needle); + if (found) { + pos = (found - haystack); + if (pos % itemlen == 0 && (needle_len == itemlen || haystack[pos+needle_len] == ' ')) + return pos / itemlen; + } + } + + return -1; +} + +static int color_by_name(const char *name) { + return strlist_index( + "default" + "black " + "red " + "green " + "yellow " + "blue " + "magenta" + "cyan " + "white ", 7, name) - 1; +}; + +static int attr_by_name(const char *name) { + return (int[]) { + -1, + A_BOLD, + A_REVERSE, + A_STANDOUT, + A_DIM, + A_UNDERLINE, +#ifdef A_ITALIC + A_ITALIC, +#endif + A_NORMAL, + A_BLINK, + }[strlist_index( + "bold " + "reverse " + "standout " + "dim " + "underline" +#ifdef A_ITALIC + "italic " +#endif + "normal " + "blink ", 9, name) + 1]; +}; + +#define W_NUMBER (1U << 0) + +enum textbox_word { + TW_BOTTOM = (1U << 1), + TW_CLOSE = (1U << 2), + TW_DOWN = (1U << 3), + TW_LEFT = (1U << 4), + TW_PAGE = (1U << 5), + TW_RIGHT = (1U << 6), + TW_TOP = (1U << 7), + TW_UP = (1U << 8), +}; + +const char *textbox_words = + "bottom" + "close " + "down " + "left " + "page " + "right " + "top " + "up "; + +enum mixer_word { + MW_ALL = (1U << 1), + MW_BALANCE = (1U << 2), + MW_CAPTURE = (1U << 3), + MW_CARD = (1U << 4), + MW_CLOSE = (1U << 5), + MW_CONTROL = (1U << 6), + MW_DOWN = (1U << 7), + MW_FOCUS = (1U << 8), + MW_HELP = (1U << 9), + MW_INFORMATION = (1U << 10), + MW_LEFT = (1U << 11), + MW_MODE = (1U << 12), + MW_MUTE = (1U << 13), + MW_NEXT = (1U << 14), + MW_PLAYBACK = (1U << 15), + MW_PREVIOUS = (1U << 16), + MW_REFRESH = (1U << 17), + MW_RIGHT = (1U << 18), + MW_SELECT = (1U << 19), + MW_SET = (1U << 20), + MW_SYSTEM = (1U << 21), + MW_TOGGLE = (1U << 22), + MW_UP = (1U << 23), +}; + +const char *mixer_words = + "all " + "balance " + "capture " + "card " + "close " + "control " + "down " + "focus " + "help " + "information" + "left " + "mode " + "mute " + "next " + "playback " + "previous " + "refresh " + "right " + "select " + "set " + "system " + "toggle " + "up "; + +static unsigned int parse_words(const char *name, const char* wordlist, unsigned int itemlen, unsigned int *number) { + unsigned int words = 0; + unsigned int word; + int i; + char buf[16]; + char *endptr; + + while (*name) { + for (i = 0; i < sizeof(buf) - 1; ++i) { + if (*name == '\0') + break; + if (*name == '_') { + ++name; + break; + } + buf[i] = *name; + ++name; + } + buf[i] = '\0'; + + if (buf[0] >= '0' && buf[0] <= '9') { + if (number) { + *number = strtoumax(buf, &endptr, 10); + if (*endptr != '\0') + return 0; + } + word = W_NUMBER; + } + else if ((i = strlist_index(wordlist, itemlen, buf)) >= 0) + word = i <= 30 ? (2U << i) : 0; + else + return 0; + + if (words & word) // no duplicate words + return 0; + words |= word; + } + + return words; +} + +static int textbox_command_by_name(const char *name) { + switch (parse_words(name, textbox_words, 6, NULL)) { + case TW_TOP: return CMD_TEXTBOX_TOP; + case TW_BOTTOM: return CMD_TEXTBOX_BOTTOM; + case TW_CLOSE: return CMD_TEXTBOX_CLOSE; + case TW_UP: return CMD_TEXTBOX_UP; + case TW_DOWN: return CMD_TEXTBOX_DOWN; + case TW_LEFT: return CMD_TEXTBOX_LEFT; + case TW_RIGHT: return CMD_TEXTBOX_RIGHT; + case TW_PAGE|TW_UP: return CMD_TEXTBOX_PAGE_UP; + case TW_PAGE|TW_DOWN: return CMD_TEXTBOX_PAGE_DOWN; + case TW_PAGE|TW_LEFT: return CMD_TEXTBOX_PAGE_LEFT; + case TW_PAGE|TW_RIGHT: return CMD_TEXTBOX_PAGE_RIGHT; + default: return 0; + } +} + +static int mixer_command_by_name(const char *name) { + unsigned int channel = 0; + unsigned int number = 1; // default numeric arg + unsigned int words = parse_words(name, mixer_words, 11, &number); + + switch (words) { + case MW_HELP: return CMD_MIXER_HELP; + case MW_CLOSE: return CMD_MIXER_CLOSE; + case MW_REFRESH: return CMD_MIXER_REFRESH; + case MW_SELECT|MW_CARD: return CMD_MIXER_SELECT_CARD; + case MW_SYSTEM|MW_INFORMATION: return CMD_MIXER_SYSTEM_INFORMATION; + case MW_MODE|MW_ALL: return CMD_WITH_ARG(CMD_MIXER_SET_VIEW_MODE, VIEW_MODE_ALL); + case MW_MODE|MW_CAPTURE: return CMD_WITH_ARG(CMD_MIXER_SET_VIEW_MODE, VIEW_MODE_CAPTURE); + case MW_MODE|MW_PLAYBACK: return CMD_WITH_ARG(CMD_MIXER_SET_VIEW_MODE, VIEW_MODE_PLAYBACK); + case MW_MODE|MW_TOGGLE: return CMD_MIXER_TOGGLE_VIEW_MODE; + case MW_CONTROL|MW_BALANCE: return CMD_MIXER_BALANCE_CONTROL; + case MW_NEXT: + case MW_NEXT|W_NUMBER: + case MW_PREVIOUS: + case MW_PREVIOUS|W_NUMBER: + return ((number < 1 || number > 511) ? 0 : + CMD_WITH_ARG((words & MW_NEXT + ? CMD_MIXER_NEXT + : CMD_MIXER_PREVIOUS), number)); + case MW_CONTROL|MW_FOCUS|W_NUMBER: + return ((number < 1 || number > 512) ? 0 : + CMD_WITH_ARG(CMD_MIXER_FOCUS_CONTROL, number - 1)); + } + + if (words & MW_LEFT) + channel |= LEFT; + if (words & MW_RIGHT) + channel |= RIGHT; + if (!channel) + channel = LEFT|RIGHT; + + switch (words & ~(MW_LEFT|MW_RIGHT)) { + case MW_CONTROL|MW_UP: + case MW_CONTROL|MW_UP|W_NUMBER: + case MW_CONTROL|MW_DOWN: + case MW_CONTROL|MW_DOWN|W_NUMBER: + return ((number < 1 || number > 100) ? 0 : + CMD_WITH_ARG((words & MW_UP + ? CMD_MIXER_CONTROL_UP_LEFT + : CMD_MIXER_CONTROL_DOWN_LEFT) + channel - 1, number)); + case MW_CONTROL|MW_SET|W_NUMBER: + return (number > 100 ? 0 : + CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT_LEFT + channel - 1, number)); + case MW_TOGGLE|MW_MUTE: + return CMD_WITH_ARG(CMD_MIXER_TOGGLE_MUTE, channel); + case MW_TOGGLE|MW_CAPTURE: + return CMD_WITH_ARG(CMD_MIXER_TOGGLE_CAPTURE, channel); + } + + return 0; +} + +static int* element_by_name(const char *name) { + int idx = strlist_index( +#ifdef TRICOLOR_VOLUME_BAR + "ctl_bar_hi " +#endif + "ctl_bar_lo " +#ifdef TRICOLOR_VOLUME_BAR + "ctl_bar_mi " +#endif + "ctl_capture " + "ctl_frame " + "ctl_inactive " + "ctl_label " + "ctl_label_focus " + "ctl_label_inactive" + "ctl_mark_focus " + "ctl_mute " + "ctl_nocapture " + "ctl_nomute " + "errormsg " + "infomsg " + "menu " + "menu_selected " + "mixer_active " + "mixer_frame " + "mixer_text " + "textbox " + "textfield ", 18, name); + + if (idx < 0) { +#ifndef TRICOLOR_VOLUME_BAR + if (strlist_index( + "ctl_bar_hi" + "ctl_bar_mi", 10, name) >= 0) + return &errno; // dummy element +#endif + return NULL; + } + + return &( ((int*) &attrs)[idx] ); +} + +static int cfg_bind(char **argv, unsigned int argc) { + const char *command_name; + command_enum command = 0; + unsigned int i; + int keys[3] = { -1, -1, -1 }; + union { + command_enum *mixer_bindings; + uint8_t *textbox_bindings; + } bind_to = { + .mixer_bindings = mixer_bindings + }; + + if (argc == 2) + command_name = argv[1]; + else if (argc == 3) { + command_name = argv[2]; + + if (! strcmp(argv[1], "textbox")) { + bind_to.textbox_bindings = textbox_bindings; + } + else if (! strcmp(argv[1], "mixer")) + ; // bind_to.mixer_bindings = mixer_bindings + else { + error_message = _("invalid widget"); + error_cause = argv[1]; + return ERROR_CONFIG; + } + } + else { + return (argc < 2 ? ERROR_MISSING_ARGUMENTS : ERROR_TOO_MUCH_ARGUMENTS); + } + + keys[0] = curskey_parse(argv[0]); + if (keys[0] < 0 || keys[0] >= ARRAY_SIZE(mixer_bindings)) { + error_message = _("invalid key"); + error_cause = argv[0]; + return ERROR_CONFIG; + } + + if (keys[0] == KEY_ENTER || keys[0] == '\n' || keys[0] == '\r') { + keys[0] = KEY_ENTER; + keys[1] = '\n'; + keys[2] = '\r'; + } + + if (bind_to.textbox_bindings == textbox_bindings) + command = textbox_command_by_name(command_name); + else + command = mixer_command_by_name(command_name); + + if (!command) { + if (!strcmp(command_name, "none")) + ; // command = 0 + else { + error_message = _("invalid command"); + error_cause = command_name; + return ERROR_CONFIG; + } + } + + for (i = 0; i < ARRAY_SIZE(keys) && keys[i] != -1; ++i) { + if (bind_to.textbox_bindings == textbox_bindings) + bind_to.textbox_bindings[keys[i]] = command; + else + bind_to.mixer_bindings[keys[i]] = command; + } + + return 0; +} + +static int cfg_color(char **argv, unsigned int argc) +{ + short fg_color, bg_color; + unsigned int i; + int *element; + int attr; + + if (argc < 3) + return ERROR_MISSING_ARGUMENTS; + + if (NULL == (element = element_by_name(argv[0]))) { + error_message = _("unknown theme element"); + error_cause = argv[0]; + return ERROR_CONFIG; + } + + if (-2 == (fg_color = color_by_name(argv[1]))) { + error_message = _("unknown color"); + error_cause = argv[1]; + return ERROR_CONFIG; + } + + if (-2 == (bg_color = color_by_name(argv[2]))) { + error_message = _("unknown color"); + error_cause = argv[2]; + return ERROR_CONFIG; + } + + *element = get_color_pair(fg_color, bg_color); + + for (i = 3; i < argc; ++i) { + if (-1 == (attr = attr_by_name(argv[i]))) { + error_message = _("unknown color attribute"); + error_cause = argv[i]; + return ERROR_CONFIG; + } + else + *element |= attr; + } + return 0; +} + +static int cfg_set(char **argv, unsigned int argc) +{ + char *endptr; + + if (argc == 2) { + if (! strcmp(argv[0], "mouse_wheel_step")) { + mouse_wheel_step = strtoumax(argv[1], &endptr, 10); + if (mouse_wheel_step > 100 || *endptr != '\0') { + mouse_wheel_step = 1; + error_message = _("invalid value"); + error_cause = argv[1]; + return ERROR_CONFIG; + } + } + else if (! strcmp(argv[0], "mouse_wheel_focuses_control")) { + if ((argv[1][0] == '0' || argv[1][0] == '1') && argv[1][1] == '\0') + mouse_wheel_focuses_control = argv[1][0] - '0'; + else { + error_message = _("invalid value"); + error_cause = argv[1]; + return ERROR_CONFIG; + } + } + else if (!strcmp(argv[0], "background")) { + int bg_color = color_by_name(argv[1]); + if (bg_color == -2) { + error_message = _("unknown color"); + error_cause = argv[1]; + return ERROR_CONFIG; + } + background_color = bg_color; + } + else { + error_message = _("unknown option"); + error_cause = argv[0]; + return ERROR_CONFIG; + } + } + else { + return (argc < 2 ? ERROR_MISSING_ARGUMENTS : ERROR_TOO_MUCH_ARGUMENTS); + } + + return 0; +} + +/* Split $line on whitespace, store it in $args, return the argument count. + * Return 0 for commented lines ('\s*#'). + * + * This will modify contents of $line. + */ +static unsigned int parse_line(char *line, char **args, unsigned int args_size) +{ + unsigned int count; + + for (count = 0; count < args_size; ++count) { + while (*line && isspace(*line)) + ++line; + + if (*line == '\0') + break; + + if (*line == '#' && count == 0) + break; + + args[count] = line; + + while (*line && !isspace(*line)) + ++line; + + if (*line != '\0') { + *line = '\0'; + ++line; + } + } + + return count; +} + +static int process_line(char *line) { + char *args[16]; + unsigned int argc = parse_line(line, args, ARRAY_SIZE(args)); + int ret = 0; + + if (argc >= 1) { + error_cause = NULL; + //error_message = _("unknown error"); + + if (argc >= ARRAY_SIZE(args)) + ret = ERROR_TOO_MUCH_ARGUMENTS; + else { + ret = strlist_index( + "bind " + "color" + "set ", 5, args[0]); + switch (ret) { + case 0: ret = cfg_bind(args + 1, argc - 1); break; + case 1: ret = cfg_color(args + 1, argc - 1); break; + case 2: ret = cfg_set(args + 1, argc - 1); break; + default: error_message = _("unknown command"); + } + } + + if (ret == ERROR_MISSING_ARGUMENTS) + error_message = _("missing arguments"); + else if (ret == ERROR_TOO_MUCH_ARGUMENTS) + error_message = _("too much arguments"); + } + + return ret; +} + +void parse_config_file(const char *file_name) +{ + char *buf; + unsigned int file_size; + unsigned int lineno; + unsigned int i; + char *line; + + endwin(); // print warnings to stderr + + buf = read_file(file_name, &file_size); + if (!buf) { + fprintf(stderr, "%s: %s\n", file_name, strerror(errno)); + return; + } + + curskey_init(); + curskey_define_meta_keys(128); + + lineno = 0; + line = buf; + for (i = 0; i < file_size; ++i) { + if (buf[i] == '\n') { + buf[i] = '\0'; + ++lineno; + if (process_line(line) < 0) { + if (error_cause) + fprintf(stderr, "%s:%d: %s: %s: %s\n", file_name, lineno, line, error_message, error_cause); + else + fprintf(stderr, "%s:%d: %s: %s\n", file_name, lineno, line, error_message); + } + line = &buf[i + 1]; + } + } + + free(buf); + curskey_destroy(); +} + +void parse_default_config_file() { + char file[4096]; + const char *home; + + home = getenv("XDG_CONFIG_HOME"); + if (home && *home) { + snprintf(file, sizeof(file), "%s/alsamixer.rc", home); + if (! access(file, F_OK)) + return parse_config_file(file); + } + + home = getenv("HOME"); + if (!home || !*home) { + struct passwd *pwd = getpwuid(getuid()); + if (pwd) + home = pwd->pw_dir; + } + + if (home && *home) { + snprintf(file, sizeof(file), "%s/.config/alsamixer.rc", home); + if (! access(file, F_OK)) + return parse_config_file(file); + + snprintf(file, sizeof(file), "%s/.alsamixer.rc", home); + if (! access(file, F_OK)) + return parse_config_file(file); + } +} diff -Nru alsa-utils-1.2.2/alsamixer/configparser.h alsa-utils-1.2.6/alsamixer/configparser.h --- alsa-utils-1.2.2/alsamixer/configparser.h 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/configparser.h 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,9 @@ +#ifndef CONFIGPARSER_H_INCLUDED +#define CONFIGPARSER_H_INCLUDED + +#define CONFIG_DEFAULT ((const char*) 1) + +void parse_config_file(const char *file); +void parse_default_config_file(); + +#endif diff -Nru alsa-utils-1.2.2/alsamixer/curskey.c alsa-utils-1.2.6/alsamixer/curskey.c --- alsa-utils-1.2.2/alsamixer/curskey.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/curskey.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,274 @@ +#include +#include +#include +#include "curskey.h" +#include "utils.h" +#include "mem.h" + +struct curskey_key { + char *keyname; + int keycode; +}; + +static struct curskey_key *keynames; +static unsigned int keynames_count; + +unsigned int meta_keycode_start; +static uint64_t invalid_meta_char_mask[2]; + +// Names for non-printable/whitespace characters and aliases for existing keys +static const struct curskey_key keyname_aliases[] = { + // Sorted by `keyname` + { "DEL", KEY_DEL }, + { "DELETE", KEY_DC }, + { "ENTER", '\n' }, + { "ENTER", '\r' }, + { "ESCAPE", KEY_ESCAPE }, + { "INSERT", KEY_IC }, + { "PAGEDOWN", KEY_NPAGE }, + { "PAGEUP", KEY_PPAGE }, + { "SPACE", KEY_SPACE }, + { "TAB", KEY_TAB } +}; + +#define STARTSWITH_KEY(S) \ + ((name[0] == 'K' || name[0] == 'k') && \ + (name[1] == 'E' || name[1] == 'e') && \ + (name[2] == 'Y' || name[2] == 'y') && \ + (name[3] == '_')) + +#define IS_META(S) \ + ((S[0] == 'M' || S[0] == 'm' || S[0] == 'A' || S[0] == 'a') && S[1] == '-') + +static int curskey_key_cmp(const void *a, const void *b) { + return strcmp(((struct curskey_key*) a)->keyname, + ((struct curskey_key*) b)->keyname); +} + +static int curskey_find(const struct curskey_key *table, unsigned int size, const char *name) { + unsigned int start = 0; + unsigned int end = size; + unsigned int i; + int cmp; + + while (1) { + i = (start+end) / 2; + cmp = strcasecmp(name, table[i].keyname); + + if (cmp == 0) + return table[i].keycode; + else if (end == start + 1) + return ERR; + else if (cmp > 0) + start = i; + else + end = i; + } +} + +/* Translate the name of a ncurses KEY_ constant to its value. + * "KEY_DOWN" -> 258 + * + * Return ERR on failure. + */ +int curskey_keycode(const char *name) +{ + int i; + + if (! name) + return ERR; + + if (STARTSWITH_KEY(name)) + name += 4; + + if (name[0] == 'F' || name[0] == 'f') { + i = (name[1] == '(' ? 2 : 1); + + if (name[i] >= '0' && name[i] <= '9') { + i = atoi(name + i); + if (i >= 1 && i <= 63) + return KEY_F(i); + } + } + + i = curskey_find(keyname_aliases, ARRAY_SIZE(keyname_aliases), name); + if (i != ERR) + return i; + + return curskey_find(keynames, keynames_count, name); +} + +static void free_ncurses_keynames() { + if (keynames) { + while (keynames_count) + free(keynames[--keynames_count].keyname); + free(keynames); + keynames = NULL; + } +} + +/* Create the list of ncurses KEY_ constants and their names. + * Returns OK on success, ERR on failure. + */ +int create_ncurses_keynames() { + int key; + char *name; + + free_ncurses_keynames(); + keynames = ccalloc(sizeof(struct curskey_key), (KEY_MAX - KEY_MIN)); + + for (key = KEY_MIN; key != KEY_MAX; ++key) { + name = (char*) keyname(key); + + if (!name || !STARTSWITH_KEY(name)) + continue; + + name += 4; + if (name[0] == 'F' && name[1] == '(') + continue; // ignore KEY_F(1),... + + keynames[keynames_count].keycode = key; + keynames[keynames_count].keyname = cstrdup(name); + ++keynames_count; + } + + keynames = crealloc(keynames, keynames_count * sizeof(struct curskey_key)); + qsort(keynames, keynames_count, sizeof(struct curskey_key), curskey_key_cmp); + + return OK; +} + +/* Defines meta escape sequences in ncurses. + * + * Some combinations with meta/alt may not be available since they collide + * with the prefix of a pre-defined key. + * For example, keys F1 - F4 begin with "\eO", so ALT-O cannot be defined. + * + * Returns OK if meta keys are available, ERR otherwise. + */ +int curskey_define_meta_keys(unsigned int keycode_start) { +#ifdef NCURSES_VERSION + int ch; + int keycode; + int new_keycode = keycode_start; + char key_sequence[3] = "\e "; + + invalid_meta_char_mask[0] = 0; + invalid_meta_char_mask[1] = 0; + + for (ch = 0; ch <= CURSKEY_MAX_META_CHAR; ++ch) { + key_sequence[1] = ch; + keycode = key_defined(key_sequence); + if (! keycode) { + define_key(key_sequence, new_keycode); + } + else if (keycode == new_keycode) + ; + else + invalid_meta_char_mask[ch/65] |= (1UL << (ch % 64)); + + ++new_keycode; + } + + meta_keycode_start = keycode_start; + return OK; +#endif + return ERR; +} + +/* Return the keycode for a key with modifiers applied. + * + * Available modifiers are: + * - CURSKEY_MOD_META / CURSKEY_MOD_ALT + * - CURSKEY_MOD_CNTRL + * + * See also the macros curskey_meta_key(), curskey_cntrl_key(). + * + * Returns ERR if the modifiers cannot be applied to this key. + */ +int curskey_mod_key(int key, unsigned int modifiers) { + if (modifiers & CURSKEY_MOD_CNTRL) { + if ((key >= 'A' && key <= '_') || (key >= 'a' && key <= 'z') || key == ' ') + key = key % 32; + else + return ERR; + } + + if (modifiers & CURSKEY_MOD_META) { + if (meta_keycode_start && + (key >= 0 && key <= CURSKEY_MAX_META_CHAR) && + ! (invalid_meta_char_mask[key/65] & (1UL << (key % 64)))) { + key = meta_keycode_start + key; + } + else + return ERR; + } + + return key; +} + +/* Return the ncurses keycode for a key definition. + * + * Key definition may be: + * - Single character (a, z, ...) + * - Character with control-modifier (^x, C-x, c-x, ...) + * - Character with meta/alt-modifier (M-x, m-x, A-x, a-x, ...) + * - Character with both modifiers (C-M-x, M-C-x, M-^x, ...) + * - Curses keyname, no modifiers allowed (KEY_HOME, HOME, F1, F(1), ...) + * + * Returns ERR if either + * - The key definition is NULL or empty + * - The key could not be found ("KEY_FOO") + * - The key combination is invalid in general ("C-TAB", "C-RETURN") + * - The key is invalid because of compile time options (the + * `define_key()` function was not available.) + * - The key is invalid because it could not be defined by + * curskey_define_meta_keys() + */ +int curskey_parse(const char *def) { + int c; + unsigned int mod = 0; + + if (! def) + return ERR; + + for (;;) { + if (def[0] == '^' && def[1] != '\0') { + ++def; + mod |= CURSKEY_MOD_CNTRL; + } + else if ((def[0] == 'C' || def[0] == 'c') && def[1] == '-') { + def += 2; + mod |= CURSKEY_MOD_CNTRL; + } + else if (IS_META(def)) { + if (! meta_keycode_start) + return ERR; + def += 2; + mod |= CURSKEY_MOD_ALT; + } + else + break; + } + + if (*def == '\0') + return ERR; + else if (*(def+1) == '\0') + c = *def; + else + c = curskey_keycode(def); + + return curskey_mod_key(c, mod); +} + +/* Initialize curskey. + * Returns OK on success, ERR on failure. */ +int curskey_init() { + keypad(stdscr, TRUE); + return create_ncurses_keynames(); +} + +/* Destroy curskey. */ +void curskey_destroy() { + free_ncurses_keynames(); +} diff -Nru alsa-utils-1.2.2/alsamixer/curskey.h alsa-utils-1.2.6/alsamixer/curskey.h --- alsa-utils-1.2.2/alsamixer/curskey.h 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/curskey.h 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,37 @@ +#ifndef CURSKEY_H_INCLUDED +#define CURSKEY_H_INCLUDED + +#include CURSESINC + +/* Additional KEY_ constants */ +#define KEY_SPACE ' ' +#define KEY_TAB '\t' +#define KEY_DEL 127 +#define KEY_ESCAPE 27 +#define KEY_INSERT KEY_IC +#define KEY_DELETE KEY_DC +#define KEY_PAGEUP KEY_PPAGE +#define KEY_PAGEDOWN KEY_NPAGE + +/* Modifiers */ +#define CURSKEY_MOD_CNTRL 1U +#define CURSKEY_MOD_META 2U +#define CURSKEY_MOD_ALT CURSKEY_MOD_META + +/* Defines the range of characters which should be "meta-able" */ +#define CURSKEY_MAX_META_CHAR 127 + +int curskey_init(); +void curskey_destroy(); +int curskey_define_meta_keys(unsigned int keycode_start); + +int curskey_parse(const char *keydef); +int curskey_mod_key(int key, unsigned int modifiers); + +#define curskey_meta_key(KEY) \ + curskey_mod_key(KEY, CURSKEY_MOD_META) + +#define curskey_cntrl_key(KEY) \ + curskey_mod_key(KEY, CURSKEY_MOD_CNTRL) + +#endif diff -Nru alsa-utils-1.2.2/alsamixer/device_name.c alsa-utils-1.2.6/alsamixer/device_name.c --- alsa-utils-1.2.2/alsamixer/device_name.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/device_name.c 2021-12-06 10:17:28.000000000 +0000 @@ -76,13 +76,14 @@ { KEY_RIGHT, REQ_NEXT_CHAR }, { KEY_HOME, REQ_BEG_FIELD }, { KEY_BACKSPACE, REQ_DEL_PREV }, + { 127, REQ_DEL_PREV }, { KEY_DC, REQ_DEL_CHAR }, { KEY_BEG, REQ_BEG_FIELD }, { KEY_END, REQ_END_FIELD }, }; unsigned int i; - if (key >= 32 && key < 256) { + if (key >= 32 && key < 256 && key != 127) { form_driver(form, key); return; } @@ -122,7 +123,7 @@ } widget_init(&form_widget, 6, 36, SCREEN_CENTER, SCREEN_CENTER, - attr_textbox, WIDGET_BORDER | WIDGET_SUBWINDOW | WIDGET_CURSOR_VISIBLE); + attrs.textbox, WIDGET_BORDER | WIDGET_SUBWINDOW | WIDGET_CURSOR_VISIBLE); title = _("Sound Card"); mvwprintw(form_widget.window, 0, (36 - 2 - get_mbs_width(title)) / 2, " %s ", title); @@ -170,20 +171,17 @@ fields[0] = new_field(1, 32, 1, 1, 0, 0); if (!fields[0]) fatal_error("cannot create field"); - field_opts_off(fields[0], O_ACTIVE); - field_opts_off(fields[0], O_EDIT); - set_field_fore(fields[0], attr_textbox); - set_field_back(fields[0], attr_textbox); + field_opts_off(fields[0], O_ACTIVE|O_EDIT); + set_field_fore(fields[0], attrs.textbox); + set_field_back(fields[0], attrs.textbox); set_field_buffer(fields[0], 0, _("Device name:")); fields[1] = new_field(1, 32, 2, 1, 0, 0); if (!fields[1]) fatal_error("cannot create field"); - field_opts_off(fields[1], O_AUTOSKIP); - field_opts_off(fields[1], O_NULLOK); - field_opts_off(fields[1], O_STATIC); - set_field_fore(fields[1], attr_textfield); - set_field_back(fields[1], attr_textfield); + field_opts_off(fields[1], O_AUTOSKIP|O_NULLOK|O_STATIC); + set_field_fore(fields[1], attrs.textfield); + set_field_back(fields[1], attrs.textfield); set_field_buffer(fields[1], 0, mixer_device_name); form = new_form(fields); diff -Nru alsa-utils-1.2.2/alsamixer/mainloop.c alsa-utils-1.2.6/alsamixer/mainloop.c --- alsa-utils-1.2.2/alsamixer/mainloop.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/mainloop.c 2021-12-06 10:17:28.000000000 +0000 @@ -40,7 +40,7 @@ { } -void initialize_curses(bool use_color) +void initialize_curses(bool use_color, bool use_mouse) { curses_initialized = initscr(); cbreak(); @@ -50,6 +50,8 @@ #endif window_size_changed(); /* update screen_lines/cols */ init_colors(use_color); + if (use_mouse && has_mouse()) + mousemask(ALL_MOUSE_EVENTS, NULL); snd_lib_error_set_handler(black_hole_error_handler); } diff -Nru alsa-utils-1.2.2/alsamixer/mainloop.h alsa-utils-1.2.6/alsamixer/mainloop.h --- alsa-utils-1.2.2/alsamixer/mainloop.h 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/mainloop.h 2021-12-06 10:17:28.000000000 +0000 @@ -3,7 +3,7 @@ #include CURSESINC -void initialize_curses(bool use_color); +void initialize_curses(bool use_color, bool use_mouse); void mainloop(void); void app_shutdown(void); diff -Nru alsa-utils-1.2.2/alsamixer/menu_widget.c alsa-utils-1.2.6/alsamixer/menu_widget.c --- alsa-utils-1.2.2/alsamixer/menu_widget.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/menu_widget.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,92 @@ +#include "menu_widget.h" +#include "colors.h" +#include "utils.h" +#include "bindings.h" + +/* Returns + * - KEY_CANCEL: close is requested + * - KEY_ENTER: item is selected + * - -1: no action + */ +int menu_widget_handle_key(MENU *menu, int key) +{ + MEVENT m; + + switch (key) { + case 27: + case KEY_CANCEL: + case 'q': + case 'Q': + return KEY_CANCEL; + case '\n': + case '\r': + case KEY_ENTER: + return KEY_ENTER; + + case KEY_MOUSE: + switch (menu_driver(menu, KEY_MOUSE)) { + case E_UNKNOWN_COMMAND: + /* If you double-click an item a REQ_TOGGLE_ITEM is generated + * and E_UNKNOWN_COMMAND is returned. (man menu_driver) */ + return KEY_ENTER; + case E_REQUEST_DENIED: + /* If menu did not handle KEY_MOUSE is has to be removed from + * input queue to prevent an infinite loop. */ + key = wgetch(menu_win(menu)); + if (key == KEY_MOUSE) { + if (getmouse(&m) == ERR) + return -1; + if (m.bstate & (BUTTON4_PRESSED|BUTTON4_CLICKED)) + menu_driver(menu, REQ_UP_ITEM); +#if NCURSES_MOUSE_VERSION > 1 + else if (m.bstate & (BUTTON5_PRESSED|BUTTON5_CLICKED)) + menu_driver(menu, REQ_DOWN_ITEM); +#endif + else + return KEY_CANCEL; + } + else if (key > 0) + ungetch(key); + } + return -1; + + default: + if (key < ARRAY_SIZE(textbox_bindings)) { + key = textbox_bindings[key]; + if (key >= CMD_TEXTBOX___MIN_MENU_COMMAND && + key <= CMD_TEXTBOX___MAX_MENU_COMMAND) + menu_driver(menu, key + KEY_MAX); + } + + return -1; + } +} + +void menu_widget_create(struct widget *widget, MENU *menu, const char *title) +{ + int rows, columns; + + if (menu) + unpost_menu(menu); + + if (screen_lines < 3 || screen_cols < 10) { + widget->close(); + beep(); + return; + } + scale_menu(menu, &rows, &columns); + rows += 2; + columns += 2; + if (rows > screen_lines) + rows = screen_lines; + if (columns > screen_cols) + columns = screen_cols; + + widget_init(widget, rows, columns, SCREEN_CENTER, SCREEN_CENTER, + attrs.menu, WIDGET_BORDER | WIDGET_SUBWINDOW); + + mvwprintw(widget->window, 0, (columns - 2 - get_mbs_width(title)) / 2, " %s ", title); + set_menu_win(menu, widget->window); + set_menu_sub(menu, widget->subwindow); + post_menu(menu); +} diff -Nru alsa-utils-1.2.2/alsamixer/menu_widget.h alsa-utils-1.2.6/alsamixer/menu_widget.h --- alsa-utils-1.2.2/alsamixer/menu_widget.h 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/menu_widget.h 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,10 @@ +#ifndef MENU_WIDGET_H_INCLUDED +#define MENU_WIDGET_H_INCLUDED + +#include "widget.h" +#include + +int menu_widget_handle_key(MENU *menu, int key); +void menu_widget_create(struct widget *widget, MENU *menu, const char *title); + +#endif diff -Nru alsa-utils-1.2.2/alsamixer/mixer_clickable.c alsa-utils-1.2.6/alsamixer/mixer_clickable.c --- alsa-utils-1.2.2/alsamixer/mixer_clickable.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/mixer_clickable.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,136 @@ +#include +#include +#include "mixer_clickable.h" + +extern int screen_cols; +extern int screen_lines; + +static struct clickable_rect *clickable_rects = NULL; +static unsigned int clickable_rects_count = 0; +static unsigned int last_rect = 0; + +/* Using 0 instead of -1 for marking free rectangles allows us to use + * memset for `freeing` all rectangles at once. + * Zero is actually a valid coordinate in ncurses, but since we don't have + * any clickables in the top line this is fine. */ +#define FREE_MARKER 0 +#define RECT_IS_FREE(RECT) ((RECT).y1 == FREE_MARKER) +#define RECT_FREE(RECT) ((RECT).y1 = FREE_MARKER) + +void clickable_set(int y1, int x1, int y2, int x2, command_enum command, int arg1) { + struct clickable_rect* tmp; + unsigned int i; + + for (i = last_rect; i < clickable_rects_count; ++i) { + if (RECT_IS_FREE(clickable_rects[i])) { + last_rect = i; + goto SET_CLICKABLE_DATA; + } + } + + for (i = 0; i < last_rect; ++i) { + if (RECT_IS_FREE(clickable_rects[i])) { + last_rect = i; + goto SET_CLICKABLE_DATA; + } + } + + last_rect = clickable_rects_count; + tmp = realloc(clickable_rects, (clickable_rects_count + 8) * sizeof(*clickable_rects)); + if (!tmp) { + free(clickable_rects); + clickable_rects = NULL; + clickable_rects_count = 0; + last_rect = 0; + return; + } + clickable_rects = tmp; +#if FREE_MARKER == 0 + memset(clickable_rects + clickable_rects_count, 0, 8 * sizeof(*clickable_rects)); +#else + for (i = clickable_rects_count; i < clickable_rects_count + 8; ++i) + RECT_FREE(clickable_rects[i]); +#endif + clickable_rects_count += 8; + +SET_CLICKABLE_DATA: + clickable_rects[last_rect] = (struct clickable_rect) { + .y1 = y1, + .x1 = x1, + .x2 = x2, + .y2 = y2, + .command = command, + .arg1 = arg1 + }; +} + +void clickable_set_relative(WINDOW *win, int y1, int x1, int y2, int x2, command_enum command, int arg1) { + int y, x; + getyx(win, y, x); + y1 = y + y1; + x1 = x + x1; + y2 = y + y2; + x2 = x + x2; + clickable_set(y1, x1, y2, x2, command, arg1); +} + +void clickable_clear(int y1, int x1, int y2, int x2) { +#define IS_IN_RECT(Y, X) (Y >= y1 && Y <= y2 && X >= x1 && X <= x2) + unsigned int i; + + if (x1 == 0 && x2 == -1 && y2 == -1) { + if (y1 == 0) { + // Optimize case: clear all +#if FREE_MARKER == 0 + if (clickable_rects) + memset(clickable_rects, 0, + clickable_rects_count * sizeof(*clickable_rects)); +#else + for (i = 0; i < clickable_rects_count; ++i) + RECT_FREE(clickable_rects[i]); +#endif + } + else { + // Optimize case: clear all lines beyond y1 + for (i = 0; i < clickable_rects_count; ++i) { + if (clickable_rects[i].y2 >= y1) + RECT_FREE(clickable_rects[i]); + } + } + return; + } + + if (y2 < 0) + y2 = screen_lines + y2 + 1; + if (x2 < 0) + x2 = screen_cols + x2 + 1; + + for (i = 0; i < clickable_rects_count; ++i) { + if (!RECT_IS_FREE(clickable_rects[i]) && ( + IS_IN_RECT(clickable_rects[i].y1, clickable_rects[i].x1) || + IS_IN_RECT(clickable_rects[i].y2, clickable_rects[i].x2) + )) + { + RECT_FREE(clickable_rects[i]); + } + } +} + +struct clickable_rect* clickable_find(int y, int x) { + unsigned int i; + + for (i = 0; i < clickable_rects_count; ++i) { + if ( + !RECT_IS_FREE(clickable_rects[i]) && + y >= clickable_rects[i].y1 && + x >= clickable_rects[i].x1 && + y <= clickable_rects[i].y2 && + x <= clickable_rects[i].x2 + ) + { + return &clickable_rects[i]; + } + } + + return NULL; +} diff -Nru alsa-utils-1.2.2/alsamixer/mixer_clickable.h alsa-utils-1.2.6/alsamixer/mixer_clickable.h --- alsa-utils-1.2.2/alsamixer/mixer_clickable.h 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/mixer_clickable.h 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,21 @@ +#ifndef MIXER_CLICKABLE_H +#define MIXER_CLICKABLE_H + +#include CURSESINC +#include "bindings.h" + +struct clickable_rect { + short y1; + short x1; + short y2; + short x2; + command_enum command; + int arg1; +}; + +void clickable_set(int y1, int x1, int y2, int x2, command_enum command, int arg1); +void clickable_set_relative(WINDOW *win, int y1, int x1, int y2, int x2, command_enum command, int arg1); +void clickable_clear(int y1, int x1, int y2, int x2); +struct clickable_rect* clickable_find(int y, int x); + +#endif diff -Nru alsa-utils-1.2.2/alsamixer/mixer_display.c alsa-utils-1.2.6/alsamixer/mixer_display.c --- alsa-utils-1.2.2/alsamixer/mixer_display.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/mixer_display.c 2021-12-06 10:17:28.000000000 +0000 @@ -34,6 +34,7 @@ #include "mixer_widget.h" #include "mixer_controls.h" #include "mixer_display.h" +#include "mixer_clickable.h" enum align { ALIGN_LEFT, @@ -109,6 +110,7 @@ unsigned int label_width_left, label_width_right; unsigned int right_x, i; + clickable_clear(0, 0, -1, -1); screen_too_small = screen_lines < 14 || screen_cols < 12; has_info_items = screen_lines >= 6; if (!has_info_items) @@ -129,15 +131,18 @@ return; } - wattrset(mixer_widget.window, attr_mixer_text); + wattrset(mixer_widget.window, attrs.mixer_text); if (label_width_left) for (i = 0; i < 4; ++i) display_string_in_field(1 + i, 2, labels_left[i], label_width_left, ALIGN_RIGHT); if (label_width_right) - for (i = 0; i < 4; ++i) + for (i = 0; i < 4; ++i) { display_string_in_field(1 + i, right_x, labels_right[i], label_width_right, ALIGN_LEFT); + clickable_set(1 + i, right_x, 1 + i, right_x + label_width_right - 1, + CMD_MIXER_HELP + i, -1); + } } void display_card_info(void) @@ -167,9 +172,9 @@ } if (card_name) - wattrset(mixer_widget.window, attr_mixer_active); + wattrset(mixer_widget.window, attrs.mixer_active); else { - wattrset(mixer_widget.window, attr_mixer_text); + wattrset(mixer_widget.window, attrs.mixer_text); if (unplugged) card_name = _("(unplugged)"); else @@ -178,9 +183,9 @@ display_string_in_field(1, info_items_left, card_name, info_items_width, ALIGN_LEFT); if (mixer_name) - wattrset(mixer_widget.window, attr_mixer_active); + wattrset(mixer_widget.window, attrs.mixer_active); else { - wattrset(mixer_widget.window, attr_mixer_text); + wattrset(mixer_widget.window, attrs.mixer_text); mixer_name = "-"; } display_string_in_field(2, info_items_left, mixer_name, info_items_width, ALIGN_LEFT); @@ -197,6 +202,7 @@ bool has_view_mode; int i; + clickable_clear(3, 0, 3, 30); if (!has_info_items) return; @@ -204,22 +210,22 @@ for (i = 0; i < 3; ++i) widths[i] = get_mbs_width(modes[i]); if (4 + widths[0] + 6 + widths[1] + 6 + widths[2] + 1 <= info_items_width) { - wmove(mixer_widget.window, 3, info_items_left); - wattrset(mixer_widget.window, attr_mixer_text); + wmove(mixer_widget.window, 3, info_items_left - 1); + wattrset(mixer_widget.window, attrs.mixer_text); for (i = 0; i < 3; ++i) { - wprintw(mixer_widget.window, "F%c:", '3' + i); + wprintw(mixer_widget.window, " F%c:", '3' + i); if (has_view_mode && (int)view_mode == i) { - wattrset(mixer_widget.window, attr_mixer_active); + wattrset(mixer_widget.window, attrs.mixer_active); wprintw(mixer_widget.window, "[%s]", modes[i]); - wattrset(mixer_widget.window, attr_mixer_text); + wattrset(mixer_widget.window, attrs.mixer_text); } else { wprintw(mixer_widget.window, " %s ", modes[i]); } - if (i < 2) - waddch(mixer_widget.window, ' '); + clickable_set_relative(mixer_widget.window, 0, -(widths[i] + 5), 0, -1, + CMD_WITH_ARG(CMD_MIXER_SET_VIEW_MODE, i), -1); } } else { - wattrset(mixer_widget.window, attr_mixer_active); + wattrset(mixer_widget.window, attrs.mixer_active); display_string_in_field(3, info_items_left, has_view_mode ? modes[view_mode] : "", info_items_width, ALIGN_LEFT); @@ -248,7 +254,7 @@ if (!has_info_items) return; - wattrset(mixer_widget.window, attr_mixer_active); + wattrset(mixer_widget.window, attrs.mixer_active); if (!controls_count || screen_too_small) { display_string_in_field(4, info_items_left, "", info_items_width, ALIGN_LEFT); return; @@ -322,7 +328,8 @@ { int i; - wattrset(mixer_widget.window, attr_mixer_frame); + clickable_clear(5, 0, -1, -1); + wattrset(mixer_widget.window, attrs.mixer_frame); for (i = 5; i < screen_lines - 1; ++i) mvwprintw(mixer_widget.window, i, 1, "%*s", screen_cols - 2, ""); } @@ -349,17 +356,17 @@ top = 5; if (boojum) { left = (screen_cols - 46) / 2; - wattrset(mixer_widget.window, attr_mixer_text); + wattrset(mixer_widget.window, attrs.mixer_text); mvwaddstr(mixer_widget.window, top + 0, left, "In the midst of the word he was trying to say,"); mvwaddstr(mixer_widget.window, top + 1, left + 2, "In the midst of his laughter and glee,"); mvwaddstr(mixer_widget.window, top + 2, left, "He had softly and suddenly vanished away---"); mvwaddstr(mixer_widget.window, top + 3, left + 2, "For the Snark was a Boojum, you see."); mvwchgat(mixer_widget.window, top + 3, left + 16, 3, /* ^^^ */ - attr_mixer_text | A_BOLD, PAIR_NUMBER(attr_mixer_text), NULL); + attrs.mixer_text | A_BOLD, PAIR_NUMBER(attrs.mixer_text), NULL); mvwaddstr(mixer_widget.window, top + 5, left, "(Lewis Carroll, \"The Hunting of the Snark\")"); top += 8; } - wattrset(mixer_widget.window, attr_errormsg); + wattrset(mixer_widget.window, attrs.errormsg); center_string(top, _("The sound device was unplugged.")); center_string(top + 1, _("Press F6 to select another sound card.")); } @@ -374,7 +381,7 @@ y = 5; if (y >= screen_lines - 1) return; - wattrset(mixer_widget.window, attr_infomsg); + wattrset(mixer_widget.window, attrs.infomsg); if (view_mode == VIEW_MODE_PLAYBACK && are_there_any_controls()) msg = _("This sound device does not have any playback controls."); else if (view_mode == VIEW_MODE_CAPTURE && are_there_any_controls()) @@ -412,18 +419,16 @@ left = first_control_x + col * (control_width + 1); frame_left = left + (control_width - 4) / 2; if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, attr_ctl_frame); + wattrset(mixer_widget.window, attrs.ctl_frame); else - wattrset(mixer_widget.window, attr_ctl_inactive); + wattrset(mixer_widget.window, attrs.ctl_inactive); if (control->flags & (TYPE_PVOLUME | TYPE_CVOLUME)) { mvwaddch(mixer_widget.window, base_y - volume_height - 1, frame_left, ACS_ULCORNER); waddch(mixer_widget.window, ACS_HLINE); waddch(mixer_widget.window, ACS_HLINE); waddch(mixer_widget.window, ACS_URCORNER); - for (i = 0; i < volume_height; ++i) { - mvwaddch(mixer_widget.window, base_y - i - 1, frame_left, ACS_VLINE); - mvwaddch(mixer_widget.window, base_y - i - 1, frame_left + 3, ACS_VLINE); - } + mvwvline(mixer_widget.window, base_y - volume_height, frame_left, ACS_VLINE, volume_height); + mvwvline(mixer_widget.window, base_y - volume_height, frame_left + 3, ACS_VLINE, volume_height); mvwaddch(mixer_widget.window, base_y, frame_left, control->flags & TYPE_PSWITCH ? ACS_LTEE : ACS_LLCORNER); waddch(mixer_widget.window, ACS_HLINE); @@ -465,26 +470,28 @@ chtype ch; if (i + 1 > bar_height) ch = ' ' | (control->flags & IS_ACTIVE ? - attr_ctl_frame : 0); + attrs.ctl_frame : 0); else { ch = ACS_CKBOARD; if (!(control->flags & IS_ACTIVE)) ; #ifdef TRICOLOR_VOLUME_BAR else if (i > volume_height * 8 / 10) - ch |= attr_ctl_bar_hi; + ch |= attrs.ctl_bar_hi; else if (i > volume_height * 4 / 10) - ch |= attr_ctl_bar_mi; + ch |= attrs.ctl_bar_mi; #endif else - ch |= attr_ctl_bar_lo; + ch |= attrs.ctl_bar_lo; } mvwaddch(mixer_widget.window, base_y - i - 1, frame_left + c + 1, ch); } } + clickable_set(base_y - volume_height, frame_left + 1, base_y, frame_left + 2, + CMD_MIXER_MOUSE_CLICK_VOLUME_BAR, control_index); if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, attr_mixer_active); + wattrset(mixer_widget.window, attrs.mixer_active); if (!(control->flags & HAS_VOLUME_1)) { sprintf(buf, "%d", (int)lrint(volumes[0] * 100)); display_string_in_field(values_y, frame_left - 2, buf, 8, ALIGN_CENTER); @@ -492,10 +499,10 @@ mvwprintw(mixer_widget.window, values_y, frame_left - 2, "%3d", (int)lrint(volumes[0] * 100)); if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, attr_ctl_frame); + wattrset(mixer_widget.window, attrs.ctl_frame); waddstr(mixer_widget.window, "<>"); if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, attr_mixer_active); + wattrset(mixer_widget.window, attrs.mixer_active); wprintw(mixer_widget.window, "%-3d", (int)lrint(volumes[1] * 100)); } } @@ -513,13 +520,15 @@ mvwaddch(mixer_widget.window, base_y + 1, frame_left + 1, switches[0] /* TRANSLATORS: playback on; one character */ - ? _("O")[0] | (control->flags & IS_ACTIVE ? attr_ctl_nomute : 0) + ? _("O")[0] | (control->flags & IS_ACTIVE ? attrs.ctl_nomute : 0) /* TRANSLATORS: playback muted; one character */ - : _("M")[0] | (control->flags & IS_ACTIVE ? attr_ctl_mute : 0)); + : _("M")[0] | (control->flags & IS_ACTIVE ? attrs.ctl_mute : 0)); waddch(mixer_widget.window, switches[1] - ? _("O")[0] | (control->flags & IS_ACTIVE ? attr_ctl_nomute : 0) - : _("M")[0] | (control->flags & IS_ACTIVE ? attr_ctl_mute : 0)); + ? _("O")[0] | (control->flags & IS_ACTIVE ? attrs.ctl_nomute : 0) + : _("M")[0] | (control->flags & IS_ACTIVE ? attrs.ctl_mute : 0)); + clickable_set(base_y + 1, frame_left + 1, base_y + 1, frame_left + 2, + CMD_MIXER_MOUSE_CLICK_MUTE, control_index); } if (control->flags & TYPE_CSWITCH) { @@ -531,18 +540,22 @@ if (err < 0) return; if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, switches[0] ? attr_ctl_capture : attr_ctl_nocapture); + wattrset(mixer_widget.window, switches[0] ? attrs.ctl_capture : attrs.ctl_nocapture); /* TRANSLATORS: "left"; no more than two characters */ display_string_in_field(cswitch_y - 1, frame_left - 2, switches[0] ? _("L") : "", 2, ALIGN_RIGHT); + clickable_set(cswitch_y - 1, frame_left - 2, cswitch_y - 1, frame_left - 1, + CMD_WITH_ARG(CMD_MIXER_TOGGLE_CAPTURE, LEFT), control_index); if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, switches[1] ? attr_ctl_capture : attr_ctl_nocapture); + wattrset(mixer_widget.window, switches[1] ? attrs.ctl_capture : attrs.ctl_nocapture); /* TRANSLATORS: "right"; no more than two characters */ display_string_in_field(cswitch_y - 1, frame_left + 4, switches[1] ? _("R") : "", 2, ALIGN_LEFT); + clickable_set(cswitch_y - 1, frame_left + 4, cswitch_y - 1, frame_left + 5, + CMD_WITH_ARG(CMD_MIXER_TOGGLE_CAPTURE, RIGHT), control_index); /* TRANSLATORS: no more than eight characters */ s = _("CAPTURE"); if (switches[0] || switches[1]) { if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, attr_ctl_capture); + wattrset(mixer_widget.window, attrs.ctl_capture); display_string_in_field(cswitch_y, frame_left - 2, s, 8, ALIGN_CENTER); } else { i = get_mbs_width(s); @@ -551,9 +564,11 @@ memset(buf, '-', i); buf[i] = '\0'; if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, attr_ctl_nocapture); + wattrset(mixer_widget.window, attrs.ctl_nocapture); display_string_in_field(cswitch_y, frame_left - 2, buf, 8, ALIGN_CENTER); } + clickable_set(cswitch_y, frame_left - 2, cswitch_y, frame_left - 2 + 8, + CMD_WITH_ARG(CMD_MIXER_TOGGLE_CAPTURE, LEFT|RIGHT), control_index); } if (control->flags & TYPE_ENUM) { @@ -564,26 +579,30 @@ if (err < 0) return; if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, attr_mixer_active); + wattrset(mixer_widget.window, attrs.mixer_active); display_string_centered_in_control(base_y, col, buf, control_width); + clickable_set_relative(mixer_widget.window, 0, -control_name_width, 0, -2, + CMD_MIXER_MOUSE_CLICK_CONTROL_ENUM, control_index); } if (control_index == focus_control_index) { i = first_control_x + col * (control_width + 1) + (control_width - control_name_width) / 2; - wattrset(mixer_widget.window, attr_ctl_mark_focus); + wattrset(mixer_widget.window, attrs.ctl_mark_focus); mvwaddch(mixer_widget.window, name_y, i - 1, '<'); mvwaddch(mixer_widget.window, name_y, i + control_name_width, '>'); if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, attr_ctl_label_focus); + wattrset(mixer_widget.window, attrs.ctl_label_focus); else - wattrset(mixer_widget.window, attr_ctl_label_inactive); + wattrset(mixer_widget.window, attrs.ctl_label_inactive); } else { if (control->flags & IS_ACTIVE) - wattrset(mixer_widget.window, attr_ctl_label); + wattrset(mixer_widget.window, attrs.ctl_label); else - wattrset(mixer_widget.window, attr_ctl_label_inactive); + wattrset(mixer_widget.window, attrs.ctl_label_inactive); } display_string_centered_in_control(name_y, col, control->name, control_name_width); + clickable_set_relative(mixer_widget.window, -1, -control_name_width, 0, -2, + CMD_WITH_ARG(CMD_MIXER_FOCUS_CONTROL, control_index), -1); if (channel_name_y > name_y) { if (control->flags & IS_MULTICH) { switch (control->flags & MULTICH_MASK) { @@ -606,7 +625,7 @@ } } else { s = ""; - wattrset(mixer_widget.window, attr_mixer_frame); + wattrset(mixer_widget.window, attrs.mixer_frame); } display_string_centered_in_control(channel_name_y, col, s, control_name_width); @@ -615,7 +634,7 @@ static void display_scroll_indicators(void) { - int y0, y1, y; + int y0, y1; chtype left, right; if (screen_too_small) @@ -625,11 +644,13 @@ left = first_visible_control_index > 0 ? ACS_LARROW : ACS_VLINE; right = first_visible_control_index + visible_controls < controls_count ? ACS_RARROW : ACS_VLINE; - wattrset(mixer_widget.window, attr_mixer_frame); - for (y = y0; y <= y1; ++y) { - mvwaddch(mixer_widget.window, y, 0, left); - mvwaddch(mixer_widget.window, y, screen_cols - 1, right); - } + wattrset(mixer_widget.window, attrs.mixer_frame); + mvwvline(mixer_widget.window, y0, 0, left, y1 - y0 + 1); + mvwvline(mixer_widget.window, y0, screen_cols -1, right, y1 - y0 + 1); + clickable_set(y0, 0, y1, 0, + CMD_WITH_ARG(CMD_MIXER_PREVIOUS, visible_controls), -1); + clickable_set(y0, screen_cols - 1, y1, screen_cols - 1, + CMD_WITH_ARG(CMD_MIXER_NEXT, visible_controls), -1); } void display_controls(void) diff -Nru alsa-utils-1.2.2/alsamixer/mixer_widget.c alsa-utils-1.2.6/alsamixer/mixer_widget.c --- alsa-utils-1.2.2/alsamixer/mixer_widget.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/mixer_widget.c 2021-12-06 10:17:28.000000000 +0000 @@ -34,9 +34,11 @@ #include "proc_files.h" #include "card_select.h" #include "volume_mapping.h" +#include "mixer_clickable.h" #include "mixer_controls.h" #include "mixer_display.h" #include "mixer_widget.h" +#include "bindings.h" snd_mixer_t *mixer; char *mixer_device_name; @@ -53,10 +55,8 @@ bool control_values_changed; bool controls_changed; -enum channel_mask { - LEFT = 1, - RIGHT = 2, -}; +unsigned int mouse_wheel_step = 1; +bool mouse_wheel_focuses_control = 1; static int elem_callback(snd_mixer_elem_t *elem, unsigned int mask) { @@ -466,147 +466,159 @@ display_controls(); } +static int on_mouse_key() { + MEVENT m; + command_enum cmd = 0; + unsigned int channels = LEFT | RIGHT; + unsigned int index; + struct control *control; + struct clickable_rect *rect; + + if (getmouse(&m) == ERR) + return 0; + + if (m.bstate & ( + BUTTON1_PRESSED|BUTTON1_RELEASED| + BUTTON2_PRESSED|BUTTON2_RELEASED| + BUTTON3_PRESSED|BUTTON3_RELEASED)) + return 0; + + rect = clickable_find(m.y, m.x); + if (rect) + cmd = rect->command; + +#if NCURSES_MOUSE_VERSION > 1 + if (m.bstate & (BUTTON4_CLICKED|BUTTON4_PRESSED|BUTTON5_CLICKED|BUTTON5_PRESSED)) { + switch (cmd) { + case CMD_MIXER_MOUSE_CLICK_CONTROL_ENUM: + focus_control_index = rect->arg1; + return CMD_WITH_ARG(( + m.bstate & (BUTTON4_CLICKED|BUTTON4_PRESSED) + ? CMD_MIXER_CONTROL_UP + : CMD_MIXER_CONTROL_DOWN + ), 1); + + case CMD_MIXER_MOUSE_CLICK_VOLUME_BAR: + if (mouse_wheel_focuses_control) + focus_control_index = rect->arg1; + + default: + return CMD_WITH_ARG(( + m.bstate & (BUTTON4_CLICKED|BUTTON4_PRESSED) + ? CMD_MIXER_CONTROL_UP + : CMD_MIXER_CONTROL_DOWN + ), mouse_wheel_step); + } + } +#endif + + /* If the rectangle has got an argument (value != -1) it is used for + * setting `focus_control_index` */ + if (rect && rect->arg1 >= 0) + focus_control_index = rect->arg1; + + switch (cmd) { + case CMD_MIXER_MOUSE_CLICK_VOLUME_BAR: + if (m.bstate & (BUTTON3_CLICKED|BUTTON3_DOUBLE_CLICKED|BUTTON3_TRIPLE_CLICKED)) + channels = m.x - rect->x1 + 1; + return CMD_WITH_ARG(CMD_MIXER_CONTROL_SET_PERCENT_LEFT + channels - 1, + (100 * (rect->y2 - m.y) / (rect->y2 - rect->y1)) // volume + ); + + case CMD_MIXER_MOUSE_CLICK_MUTE: + if (m.bstate & (BUTTON3_CLICKED|BUTTON3_DOUBLE_CLICKED|BUTTON3_TRIPLE_CLICKED)) + channels = m.x - rect->x1 + 1; + return CMD_WITH_ARG(CMD_MIXER_TOGGLE_MUTE, channels); + + case CMD_MIXER_MOUSE_CLICK_CONTROL_ENUM: + control = get_focus_control(TYPE_ENUM); + if (control && + (snd_mixer_selem_get_enum_item(control->elem, 0, &index) >= 0)) { + return (index == 0 + ? CMD_WITH_ARG(CMD_MIXER_CONTROL_UP, 100) + : CMD_WITH_ARG(CMD_MIXER_CONTROL_DOWN, 1)); + } + break; + + default: + return cmd; // non-mouse command + } + + return 0; // failed mouse command +} + static void on_handle_key(int key) { - switch (key) { - case 27: - case KEY_CANCEL: - case KEY_F(10): + int arg; + command_enum cmd; + + if (key == KEY_MOUSE) + cmd = on_mouse_key(); + else if (key < ARRAY_SIZE(mixer_bindings)) + cmd = mixer_bindings[key]; + else + return; + + arg = CMD_GET_ARGUMENT(cmd); + cmd = CMD_GET_COMMAND(cmd); + + switch (cmd) { + case CMD_MIXER_CONTROL_DOWN_LEFT: + case CMD_MIXER_CONTROL_DOWN_RIGHT: + case CMD_MIXER_CONTROL_DOWN: + arg = (-arg); + case CMD_MIXER_CONTROL_UP_LEFT: + case CMD_MIXER_CONTROL_UP_RIGHT: + case CMD_MIXER_CONTROL_UP: + change_control_relative(arg, cmd % 4); + break; + case CMD_MIXER_CONTROL_SET_PERCENT_LEFT: + case CMD_MIXER_CONTROL_SET_PERCENT_RIGHT: + case CMD_MIXER_CONTROL_SET_PERCENT: + change_control_to_percent(arg, cmd % 4); + break; + case CMD_MIXER_CLOSE: mixer_widget.close(); break; - case KEY_F(1): - case KEY_HELP: - case 'H': - case 'h': - case '?': + case CMD_MIXER_HELP: show_help(); break; - case KEY_F(2): - case '/': + case CMD_MIXER_SYSTEM_INFORMATION: create_proc_files_list(); break; - case KEY_F(3): - set_view_mode(VIEW_MODE_PLAYBACK); - break; - case KEY_F(4): - set_view_mode(VIEW_MODE_CAPTURE); + case CMD_MIXER_TOGGLE_VIEW_MODE: + arg = (view_mode + 1) % VIEW_MODE_COUNT; + case CMD_MIXER_SET_VIEW_MODE: + set_view_mode((enum view_mode)(arg)); break; - case KEY_F(5): - set_view_mode(VIEW_MODE_ALL); - break; - case '\t': - set_view_mode((enum view_mode)((view_mode + 1) % VIEW_MODE_COUNT)); - break; - case KEY_F(6): - case 'S': - case 's': + case CMD_MIXER_SELECT_CARD: create_card_select_list(); break; - case KEY_REFRESH: - case 12: - case 'L': - case 'l': + case CMD_MIXER_REFRESH: clearok(mixer_widget.window, TRUE); display_controls(); break; - case KEY_LEFT: - case 'P': - case 'p': - if (focus_control_index > 0) { - --focus_control_index; - refocus_control(); - } - break; - case KEY_RIGHT: - case 'N': - case 'n': - if (focus_control_index < controls_count - 1) { - ++focus_control_index; - refocus_control(); - } - break; - case KEY_PPAGE: - change_control_relative(5, LEFT | RIGHT); + case CMD_MIXER_PREVIOUS: + arg = (-arg); + case CMD_MIXER_NEXT: + arg = focus_control_index + arg; + case CMD_MIXER_FOCUS_CONTROL: + focus_control_index = arg; + if (focus_control_index < 0) + focus_control_index = 0; + else if (focus_control_index >= controls_count) + focus_control_index = controls_count - 1; + refocus_control(); break; - case KEY_NPAGE: - change_control_relative(-5, LEFT | RIGHT); + case CMD_MIXER_TOGGLE_MUTE: + toggle_mute(arg); break; -#if 0 - case KEY_BEG: - case KEY_HOME: - change_control_to_percent(100, LEFT | RIGHT); + case CMD_MIXER_TOGGLE_CAPTURE: + toggle_capture(arg); break; -#endif - case KEY_LL: - case KEY_END: - change_control_to_percent(0, LEFT | RIGHT); - break; - case KEY_UP: - case '+': - case 'K': - case 'k': - case 'W': - case 'w': - change_control_relative(1, LEFT | RIGHT); - break; - case KEY_DOWN: - case '-': - case 'J': - case 'j': - case 'X': - case 'x': - change_control_relative(-1, LEFT | RIGHT); - break; - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - change_control_to_percent((key - '0') * 10, LEFT | RIGHT); - break; - case 'Q': - case 'q': - change_control_relative(1, LEFT); - break; - case 'Y': - case 'y': - case 'Z': - case 'z': - change_control_relative(-1, LEFT); - break; - case 'E': - case 'e': - change_control_relative(1, RIGHT); - break; - case 'C': - case 'c': - change_control_relative(-1, RIGHT); - break; - case 'M': - case 'm': - toggle_mute(LEFT | RIGHT); - break; - case 'B': - case 'b': - case '=': + case CMD_MIXER_BALANCE_CONTROL: balance_volumes(); break; - case '<': - case ',': - toggle_mute(LEFT); - break; - case '>': - case '.': - toggle_mute(RIGHT); - break; - case ' ': - toggle_capture(LEFT | RIGHT); - break; - case KEY_IC: - case ';': - toggle_capture(LEFT); - break; - case KEY_DC: - case '\'': - toggle_capture(RIGHT); - break; } } @@ -615,9 +627,9 @@ static const char title[] = " AlsaMixer v" SND_UTIL_VERSION_STR " "; widget_init(&mixer_widget, screen_lines, screen_cols, 0, 0, - attr_mixer_frame, WIDGET_BORDER); + attrs.mixer_frame, WIDGET_BORDER); if (screen_cols >= (sizeof(title) - 1) + 2) { - wattrset(mixer_widget.window, attr_mixer_active); + wattrset(mixer_widget.window, attrs.mixer_active); mvwaddstr(mixer_widget.window, 0, (screen_cols - (sizeof(title) - 1)) / 2, title); } init_mixer_layout(); diff -Nru alsa-utils-1.2.2/alsamixer/mixer_widget.h alsa-utils-1.2.6/alsamixer/mixer_widget.h --- alsa-utils-1.2.2/alsamixer/mixer_widget.h 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/mixer_widget.h 2021-12-06 10:17:28.000000000 +0000 @@ -12,6 +12,11 @@ VIEW_MODE_COUNT, }; +enum channel_mask { + LEFT = 1, + RIGHT = 2, +}; + extern snd_mixer_t *mixer; extern char *mixer_device_name; extern bool unplugged; @@ -27,6 +32,9 @@ extern bool control_values_changed; extern bool controls_changed; +extern unsigned int mouse_wheel_step; +extern bool mouse_wheel_focuses_control; + void create_mixer_object(struct snd_mixer_selem_regopt *selem_regopt); void create_mixer_widget(void); void mixer_shutdown(void); diff -Nru alsa-utils-1.2.2/alsamixer/proc_files.c alsa-utils-1.2.6/alsamixer/proc_files.c --- alsa-utils-1.2.2/alsamixer/proc_files.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/proc_files.c 2021-12-06 10:17:28.000000000 +0000 @@ -28,91 +28,32 @@ #include "widget.h" #include "textbox.h" #include "proc_files.h" +#include "menu_widget.h" static struct widget proc_widget; static ITEM *items[7]; static unsigned int items_count; static MENU *menu; -static void on_menu_key(int key) -{ - static const struct { - int key; - int request; - } key_map[] = { - { KEY_DOWN, REQ_DOWN_ITEM }, - { KEY_UP, REQ_UP_ITEM }, - { KEY_HOME, REQ_FIRST_ITEM }, - { KEY_NPAGE, REQ_SCR_DPAGE }, - { KEY_PPAGE, REQ_SCR_UPAGE }, - { KEY_BEG, REQ_FIRST_ITEM }, - { KEY_END, REQ_LAST_ITEM }, - }; - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(key_map); ++i) - if (key_map[i].key == key) { - menu_driver(menu, key_map[i].request); - break; - } -} - static void on_handle_key(int key) { ITEM *item; - switch (key) { - case 27: - case KEY_CANCEL: - proc_widget.close(); - break; - case 10: - case 13: - case KEY_ENTER: - item = current_item(menu); - if (item) - show_textfile(item_name(item)); - break; - default: - on_menu_key(key); - break; - } -} - -static bool create(void) -{ - int rows, columns; - const char *title; - - if (screen_lines < 3 || screen_cols < 20) { - proc_widget.close(); - beep(); - return FALSE; + switch (menu_widget_handle_key(menu, key)) { + case KEY_ENTER: + item = current_item(menu); + if (item) + show_textfile(item_name(item)); + break; + case KEY_CANCEL: + proc_widget.close(); + break; } - scale_menu(menu, &rows, &columns); - rows += 2; - columns += 2; - if (rows > screen_lines) - rows = screen_lines; - if (columns > screen_cols) - columns = screen_cols; - - widget_init(&proc_widget, rows, columns, SCREEN_CENTER, SCREEN_CENTER, - attr_menu, WIDGET_BORDER | WIDGET_SUBWINDOW); - - title = _("Select File"); - mvwprintw(proc_widget.window, 0, (columns - 2 - get_mbs_width(title)) / 2, " %s ", title); - set_menu_win(menu, proc_widget.window); - set_menu_sub(menu, proc_widget.subwindow); - return TRUE; } -static void on_window_size_changed(void) +static void create(void) { - unpost_menu(menu); - if (!create()) - return; - post_menu(menu); + menu_widget_create(&proc_widget, menu, _("Select File")); } static void on_close(void) @@ -139,7 +80,7 @@ static struct widget proc_widget = { .handle_key = on_handle_key, - .window_size_changed = on_window_size_changed, + .window_size_changed = create, .close = on_close, }; @@ -157,13 +98,10 @@ menu = new_menu(items); if (!menu) fatal_error("cannot create menu"); - set_menu_fore(menu, attr_menu_selected); - set_menu_back(menu, attr_menu); + set_menu_fore(menu, attrs.menu_selected); + set_menu_back(menu, attrs.menu); set_menu_mark(menu, NULL); menu_opts_off(menu, O_SHOWDESC); - if (!create()) - return; - - post_menu(menu); + create(); } diff -Nru alsa-utils-1.2.2/alsamixer/textbox.c alsa-utils-1.2.6/alsamixer/textbox.c --- alsa-utils-1.2.2/alsamixer/textbox.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/textbox.c 2021-12-06 10:17:28.000000000 +0000 @@ -32,8 +32,7 @@ #include "colors.h" #include "widget.h" #include "textbox.h" - -#define MAX_FILE_SIZE 1048576 +#include "bindings.h" static void create_text_box(const char *const *lines, unsigned int count, const char *title, int attrs); @@ -49,7 +48,7 @@ lines[1] = strerror(err); count = 2; } - create_text_box(lines, count, _("Error"), attr_errormsg); + create_text_box(lines, count, _("Error"), attrs.errormsg); } void show_alsa_error(const char *msg, int err) @@ -63,39 +62,7 @@ lines[1] = snd_strerror(err); count = 2; } - create_text_box(lines, count, _("Error"), attr_errormsg); -} - -static char *read_file(const char *file_name, unsigned int *file_size) -{ - FILE *f; - int err; - char *buf; - unsigned int allocated = 2048; - unsigned int bytes_read; - - f = fopen(file_name, "r"); - if (!f) { - err = errno; - buf = casprintf(_("Cannot open file \"%s\"."), file_name); - show_error(buf, err); - free(buf); - return NULL; - } - *file_size = 0; - buf = NULL; - do { - allocated *= 2; - buf = crealloc(buf, allocated); - bytes_read = fread(buf + *file_size, 1, allocated - *file_size, f); - *file_size += bytes_read; - } while (*file_size == allocated && allocated < MAX_FILE_SIZE); - fclose(f); - if (*file_size > 0 && buf[*file_size - 1] != '\n' && *file_size < allocated) { - buf[*file_size] = '\n'; - ++*file_size; - } - return buf; + create_text_box(lines, count, _("Error"), attrs.errormsg); } void show_textfile(const char *file_name) @@ -108,8 +75,12 @@ const char *start_line; buf = read_file(file_name, &file_size); - if (!buf) + if (!buf) { + int err = errno; + buf = casprintf(_("Cannot open file \"%s\"."), file_name); + show_error(buf, err); return; + } line_count = 0; for (i = 0; i < file_size; ++i) line_count += buf[i] == '\n'; @@ -125,14 +96,14 @@ if (buf[i] == '\t') buf[i] = ' '; } - create_text_box(lines, line_count, file_name, attr_textbox); + create_text_box(lines, line_count, file_name, attrs.textbox); free(lines); free(buf); } void show_text(const char *const *lines, unsigned int count, const char *title) { - create_text_box(lines, count, title, attr_textbox); + create_text_box(lines, count, title, attrs.textbox); } /**********************************************************************/ @@ -184,8 +155,7 @@ static void update_y_scroll_bar(void) { int length; - int begin, end; - int i; + int begin; if (max_scroll_y <= 0 || text_lines_count == 0) return; @@ -193,17 +163,14 @@ if (length >= text_box_y) return; begin = current_top * (text_box_y - length) / max_scroll_y; - end = begin + length; - for (i = 0; i < text_box_y; ++i) - mvwaddch(text_widget.window, i + 1, text_box_x + 1, - i >= begin && i < end ? ACS_BOARD : ' '); + mvwvline(text_widget.window, 1, text_box_x + 1, ' ', text_box_y); + mvwvline(text_widget.window, begin + 1, text_box_x + 1, ACS_BOARD, length); } static void update_x_scroll_bar(void) { int length; - int begin, end; - int i; + int begin; if (max_scroll_x <= 0 || max_line_width <= 0) return; @@ -211,10 +178,8 @@ if (length >= text_box_x) return; begin = current_left * (text_box_x - length) / max_scroll_x; - end = begin + length; - wmove(text_widget.window, text_box_y + 1, 1); - for (i = 0; i < text_box_x; ++i) - waddch(text_widget.window, i >= begin && i < end ? ACS_BOARD : ' '); + mvwhline(text_widget.window, text_box_y + 1, 1, ' ', text_box_x); + mvwhline(text_widget.window, text_box_y + 1, begin + 1, ACS_BOARD, length); } static void move_x(int delta) @@ -251,68 +216,41 @@ static void on_handle_key(int key) { - switch (key) { - case 10: - case 13: - case 27: - case KEY_CANCEL: - case KEY_ENTER: - case KEY_CLOSE: - case KEY_EXIT: + if (key >= ARRAY_SIZE(textbox_bindings)) + return; + + switch (textbox_bindings[key]) { + case CMD_TEXTBOX_CLOSE: text_widget.close(); break; - case KEY_DOWN: - case KEY_SF: - case 'J': - case 'j': - case 'X': - case 'x': + case CMD_TEXTBOX_DOWN: move_y(1); break; - case KEY_UP: - case KEY_SR: - case 'K': - case 'k': - case 'W': - case 'w': + case CMD_TEXTBOX_UP: move_y(-1); break; - case KEY_LEFT: - case 'H': - case 'h': - case 'P': - case 'p': + case CMD_TEXTBOX_LEFT: move_x(-1); break; - case KEY_RIGHT: - case 'L': - case 'l': - case 'N': - case 'n': + case CMD_TEXTBOX_RIGHT: move_x(1); break; - case KEY_NPAGE: - case ' ': + case CMD_TEXTBOX_PAGE_DOWN: move_y(text_box_y); break; - case KEY_PPAGE: - case KEY_BACKSPACE: - case 'B': - case 'b': + case CMD_TEXTBOX_PAGE_UP: move_y(-text_box_y); break; - case KEY_HOME: - case KEY_BEG: + case CMD_TEXTBOX_TOP: move_x(-max_scroll_x); break; - case KEY_LL: - case KEY_END: + case CMD_TEXTBOX_BOTTOM: move_x(max_scroll_x); break; - case '\t': + case CMD_TEXTBOX_PAGE_RIGHT: move_x(8); break; - case KEY_BTAB: + case CMD_TEXTBOX_PAGE_LEFT: move_x(-8); break; } diff -Nru alsa-utils-1.2.2/alsamixer/utils.c alsa-utils-1.2.6/alsamixer/utils.c --- alsa-utils-1.2.2/alsamixer/utils.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/utils.c 2021-12-06 10:17:28.000000000 +0000 @@ -16,13 +16,18 @@ * along with this program. If not, see . */ +#ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE +#endif #include "aconfig.h" #include #include #include #include +#include +#include #include "utils.h" +#include "mem.h" /* * mbs_at_width - compute screen position in a string @@ -109,3 +114,35 @@ } return max_width; } + +#define MAX_FILE_SIZE 1048576 +char *read_file(const char *file_name, unsigned int *file_size) +{ + FILE *f; + int err; + char *buf; + unsigned int allocated = 2048; + unsigned int bytes_read; + + f = fopen(file_name, "r"); + if (!f) { + err = errno; + errno = err; + return NULL; + } + *file_size = 0; + buf = NULL; + do { + allocated *= 2; + buf = crealloc(buf, allocated); + bytes_read = fread(buf + *file_size, 1, allocated - *file_size, f); + *file_size += bytes_read; + } while (*file_size == allocated && allocated < MAX_FILE_SIZE); + fclose(f); + if (*file_size > 0 && buf[*file_size - 1] != '\n' && *file_size < allocated) { + buf[*file_size] = '\n'; + ++*file_size; + } + return buf; +} + diff -Nru alsa-utils-1.2.2/alsamixer/utils.h alsa-utils-1.2.6/alsamixer/utils.h --- alsa-utils-1.2.2/alsamixer/utils.h 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/utils.h 2021-12-06 10:17:28.000000000 +0000 @@ -6,5 +6,6 @@ unsigned int get_mbs_width(const char *s); unsigned int get_max_mbs_width(const char *const *s, unsigned int count); const char *mbs_at_width(const char *s, int *width, int dir); +char *read_file(const char *file_name, unsigned int *file_size); #endif diff -Nru alsa-utils-1.2.2/alsamixer/widget.c alsa-utils-1.2.6/alsamixer/widget.c --- alsa-utils-1.2.2/alsamixer/widget.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsamixer/widget.c 2021-12-06 10:17:28.000000000 +0000 @@ -19,6 +19,8 @@ #include "aconfig.h" #include #include +#include +#include #include "die.h" #include "widget.h" @@ -27,10 +29,6 @@ static int cursor_visibility = -1; -static void widget_handle_key(int key) -{ -} - static void update_cursor_visibility(void) { const struct widget *active_widget; @@ -85,9 +83,6 @@ set_panel_userptr(widget->panel, widget); } - if (!widget->handle_key) - widget->handle_key = widget_handle_key; - if (old_window) delwin(old_window); @@ -127,6 +122,10 @@ { PANEL *panel, *below; const struct widget *widget; + struct winsize size; + + if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &size) == 0) + resize_term(size.ws_row, size.ws_col); getmaxyx(stdscr, screen_lines, screen_cols); if (tigetflag("xenl") != 1 && tigetflag("am") != 1) diff -Nru alsa-utils-1.2.2/alsaucm/89-alsa-ucm.rules.in alsa-utils-1.2.6/alsaucm/89-alsa-ucm.rules.in --- alsa-utils-1.2.2/alsaucm/89-alsa-ucm.rules.in 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsaucm/89-alsa-ucm.rules.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -SUBSYSTEM!="sound", GOTO="ucm_end" -ACTION!="change", GOTO="ucm_end" -KERNEL!="card*", GOTO="ucm_end" - -ATTRS{id}=="PAZ00", RUN+="@bindir@/alsaucm -c PAZ00 set _verb HiFi" -ATTRS{id}=="PAZ00", RUN+="@bindir@/alsaucm -c PAZ00 set _verb Record" - -LABEL="ucm_end" diff -Nru alsa-utils-1.2.2/alsaucm/Makefile.am alsa-utils-1.2.6/alsaucm/Makefile.am --- alsa-utils-1.2.2/alsaucm/Makefile.am 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsaucm/Makefile.am 2021-12-06 10:17:28.000000000 +0000 @@ -15,17 +15,6 @@ %.1: %.rst rst2man $< > $@ -udevrules_DATA = \ - 89-alsa-ucm.rules +EXTRA_DIST = alsaucm.rst -edit = \ - $(SED) -r -e 's,@bindir\@,$(bindir),g' \ - -e 's,@mydatadir\@,$(mydatadir),g' \ - < $< > $@ || rm $@ - -89-alsa-ucm.rules: 89-alsa-ucm.rules.in - $(edit) - -EXTRA_DIST = alsaucm.rst 89-alsa-ucm.rules.in - -CLEANFILES = alsaucm.1 89-alsa-ucm.rules +CLEANFILES = alsaucm.1 diff -Nru alsa-utils-1.2.2/alsaucm/Makefile.in alsa-utils-1.2.6/alsaucm/Makefile.in --- alsa-utils-1.2.2/alsaucm/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/alsaucm/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,7 +15,6 @@ @SET_MAKE@ - VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -94,7 +93,8 @@ subdir = alsaucm ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -107,8 +107,7 @@ CONFIG_HEADER = $(top_builddir)/include/aconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ - "$(DESTDIR)$(udevrulesdir)" +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am_alsaucm_OBJECTS = usecase.$(OBJEXT) dump.$(OBJEXT) alsaucm_OBJECTS = $(am_alsaucm_OBJECTS) @@ -179,7 +178,6 @@ man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) -DATA = $(udevrules_DATA) HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, @@ -260,8 +258,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -341,6 +339,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -358,16 +357,8 @@ AM_CPPFLAGS = \ -Wall -I$(top_srcdir)/include -udevrules_DATA = \ - 89-alsa-ucm.rules - -edit = \ - $(SED) -r -e 's,@bindir\@,$(bindir),g' \ - -e 's,@mydatadir\@,$(mydatadir),g' \ - < $< > $@ || rm $@ - -EXTRA_DIST = alsaucm.rst 89-alsa-ucm.rules.in -CLEANFILES = alsaucm.1 89-alsa-ucm.rules +EXTRA_DIST = alsaucm.rst +CLEANFILES = alsaucm.1 all: all-am .SUFFIXES: @@ -519,27 +510,6 @@ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -install-udevrulesDATA: $(udevrules_DATA) - @$(NORMAL_INSTALL) - @list='$(udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(udevrulesdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(udevrulesdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(udevrulesdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(udevrulesdir)" || exit $$?; \ - done - -uninstall-udevrulesDATA: - @$(NORMAL_UNINSTALL) - @list='$(udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(udevrulesdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique @@ -628,9 +598,9 @@ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) $(HEADERS) +all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(udevrulesdir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -687,7 +657,7 @@ info-am: -install-data-am: install-man install-udevrulesDATA +install-data-am: install-man install-dvi: install-dvi-am @@ -733,8 +703,7 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-man \ - uninstall-udevrulesDATA +uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 @@ -748,12 +717,11 @@ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-man1 install-pdf install-pdf-am install-ps \ - install-ps-am install-strip install-udevrulesDATA installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-binPROGRAMS uninstall-man \ - uninstall-man1 uninstall-udevrulesDATA + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-man uninstall-man1 .PRECIOUS: Makefile @@ -761,9 +729,6 @@ %.1: %.rst rst2man $< > $@ -89-alsa-ucm.rules: 89-alsa-ucm.rules.in - $(edit) - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru alsa-utils-1.2.2/alsaucm/alsaucm.rst alsa-utils-1.2.6/alsaucm/alsaucm.rst --- alsa-utils-1.2.2/alsaucm/alsaucm.rst 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsaucm/alsaucm.rst 2021-12-06 10:17:28.000000000 +0000 @@ -122,7 +122,7 @@ the value of the `IDENTIFIER` argument can can be: - ``_devstatus/{device}`` - - ``_modtstaus/{device}`` + - ``_modstatus/{device}`` ``set`` `IDENTIFIER` `VALUE` set string value diff -Nru alsa-utils-1.2.2/alsaucm/usecase.c alsa-utils-1.2.6/alsaucm/usecase.c --- alsa-utils-1.2.2/alsaucm/usecase.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/alsaucm/usecase.c 2021-12-06 10:17:28.000000000 +0000 @@ -58,7 +58,9 @@ /* set/get */ OM_SET, OM_GET, + OM_GET_VAL, OM_GETI, + OM_GETI_VAL, /* misc */ OM_HELP, @@ -82,7 +84,9 @@ { OM_LIST2, 1, 1, "list" }, { OM_SET, 2, 1, "set" }, { OM_GET, 1, 1, "get" }, + { OM_GET_VAL, 1, 1, "getval" }, { OM_GETI, 1, 1, "geti" }, + { OM_GETI_VAL, 1, 1, "getival" }, { OM_DUMP, 1, 1, "dump" }, { OM_HELP, 0, 0, "help" }, { OM_QUIT, 0, 0, "quit" }, @@ -130,6 +134,8 @@ *line == '\n')) line++; c = *line; + if (c == '\0') + return 0; if (c == '\"' || c == '\'') { start = ++line; while (*line && *line != c) @@ -326,6 +332,7 @@ } break; case OM_GET: + case OM_GET_VAL: err = snd_use_case_get(context->uc_mgr, argv[0], &str); if (err < 0) { fprintf(stderr, @@ -334,10 +341,14 @@ snd_strerror(err)); return err; } - printf(" %s=%s\n", argv[0], str); + if (cmd->code == OM_GET) + printf(" %s=%s\n", argv[0], str); + else + printf("%s\n", str); free((void *)str); break; case OM_GETI: + case OM_GETI_VAL: err = snd_use_case_geti(context->uc_mgr, argv[0], &lval); if (err < 0) { fprintf(stderr, @@ -346,7 +357,10 @@ snd_strerror(err)); return lval; } - printf(" %s=%li\n", argv[0], lval); + if (cmd->code == OM_GETI) + printf(" %s=%li\n", argv[0], lval); + else + printf("%li\n", lval); break; case OM_QUIT: context->do_exit = 1; diff -Nru alsa-utils-1.2.2/amidi/Makefile.in alsa-utils-1.2.6/amidi/Makefile.in --- alsa-utils-1.2.2/amidi/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/amidi/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ subdir = amidi ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -254,8 +255,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -335,6 +336,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/amidi/amidi.c alsa-utils-1.2.6/amidi/amidi.c --- alsa-utils-1.2.2/amidi/amidi.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/amidi/amidi.c 2021-12-06 10:17:28.000000000 +0000 @@ -36,11 +36,13 @@ #include #include #include +#include #include "aconfig.h" #include "version.h" #define NSEC_PER_SEC 1000000000L +static int do_print_timestamp = 0; static int do_device_list, do_rawmidi_list; static char *port_name = "default"; static char *send_file_name; @@ -80,6 +82,10 @@ "-r, --receive=file write received data into a file\n" "-S, --send-hex=\"...\" send hexadecimal bytes\n" "-d, --dump print received data as hexadecimal bytes\n" + "-T, --timestamp=... adds a timestamp in front of each dumped message\n" + " realtime\n" + " monotonic\n" + " raw\n" "-t, --timeout=seconds exits when no data has been received\n" " for the specified duration\n" "-a, --active-sensing include active sensing bytes\n" @@ -356,7 +362,7 @@ /* * prints MIDI commands, formatting them nicely */ -static void print_byte(unsigned char byte) +static void print_byte(unsigned char byte, struct timespec *ts) { static enum { STATE_UNKNOWN, @@ -426,7 +432,18 @@ if (running_status) fputs("\n ", stdout); } - printf("%c%02X", newline ? '\n' : ' ', byte); + + if (newline) { + printf("\n"); + + /* Nanoseconds does not make a lot of sense for serial MIDI (the + * 31250 bps one) but I'm not sure about MIDI over USB. + */ + if (do_print_timestamp) + printf("%lld.%.9ld) ", (long long)ts->tv_sec, ts->tv_nsec); + } + + printf("%02X", byte); } static void sig_handler(int dummy) @@ -454,7 +471,7 @@ int main(int argc, char *argv[]) { - static const char short_options[] = "hVlLp:s:r:S::dt:aci:"; + static const char short_options[] = "hVlLp:s:r:S::dt:aci:T:"; static const struct option long_options[] = { {"help", 0, NULL, 'h'}, {"version", 0, NULL, 'V'}, @@ -465,6 +482,7 @@ {"receive", 1, NULL, 'r'}, {"send-hex", 2, NULL, 'S'}, {"dump", 0, NULL, 'd'}, + {"timestamp", 1, NULL, 'T'}, {"timeout", 1, NULL, 't'}, {"active-sensing", 0, NULL, 'a'}, {"clock", 0, NULL, 'c'}, @@ -475,6 +493,7 @@ int ignore_active_sensing = 1; int ignore_clock = 1; int do_send_hex = 0; + clockid_t cid = CLOCK_REALTIME; struct itimerspec itimerspec = { .it_interval = { 0, 0 } }; while ((c = getopt_long(argc, argv, short_options, @@ -509,6 +528,19 @@ case 'd': dump = 1; break; + case 'T': + do_print_timestamp = 1; + if (optarg == NULL) + error("Clock type missing"); + else if (strcasecmp(optarg, "realtime") == 0) + cid = CLOCK_REALTIME; + else if (strcasecmp(optarg, "monotonic") == 0) + cid = CLOCK_MONOTONIC; + else if (strcasecmp(optarg, "raw") == 0) + cid = CLOCK_MONOTONIC_RAW; + else + error("Clock type not known"); + break; case 't': if (optarg) timeout = atof(optarg); @@ -644,10 +676,12 @@ goto _exit; } } + for (;;) { unsigned char buf[256]; int i, length; unsigned short revents; + struct timespec ts; err = poll(pfds, npfds, -1); if (stop || (err < 0 && errno == EINTR)) @@ -657,6 +691,11 @@ break; } + if (clock_gettime(cid, &ts) < 0) { + error("clock_getres (%d) failed: %s", cid, strerror(errno)); + break; + } + err = snd_rawmidi_poll_descriptors_revents(input, &pfds[1], npfds - 1, &revents); if (err < 0) { error("cannot get poll events: %s", snd_strerror(errno)); @@ -692,7 +731,8 @@ write(receive_file, buf, length); if (dump) { for (i = 0; i < length; ++i) - print_byte(buf[i]); + print_byte(buf[i], &ts); + fflush(stdout); } diff -Nru alsa-utils-1.2.2/amixer/Makefile.am alsa-utils-1.2.6/amixer/Makefile.am --- alsa-utils-1.2.2/amixer/Makefile.am 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/amixer/Makefile.am 2021-12-06 10:17:28.000000000 +0000 @@ -5,7 +5,7 @@ # CFLAGS += -g -Wall bin_PROGRAMS = amixer -amixer_SOURCES = amixer.c ../alsamixer/volume_mapping.c -noinst_HEADERS = amixer.h +amixer_SOURCES = amixer.c volume_mapping.c +noinst_HEADERS = amixer.h volume_mapping.h man_MANS = amixer.1 EXTRA_DIST = amixer.1 diff -Nru alsa-utils-1.2.2/amixer/Makefile.in alsa-utils-1.2.6/amixer/Makefile.in --- alsa-utils-1.2.2/amixer/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/amixer/Makefile.in 2021-12-06 11:44:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -93,7 +93,8 @@ subdir = amixer ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -130,10 +131,6 @@ am__depfiles_remade = ./$(DEPDIR)/amixer.Po \ ./$(DEPDIR)/volume_mapping.Po am__mv = mv -f -AM_V_lt = $(am__v_lt_@AM_V@) -am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) -am__v_lt_0 = --silent -am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) @@ -263,8 +260,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -344,6 +341,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -358,8 +356,8 @@ AM_CFLAGS = -D_GNU_SOURCE AM_CPPFLAGS = -I$(top_srcdir)/include LDADD = -lm -amixer_SOURCES = amixer.c ../alsamixer/volume_mapping.c -noinst_HEADERS = amixer.h +amixer_SOURCES = amixer.c volume_mapping.c +noinst_HEADERS = amixer.h volume_mapping.h man_MANS = amixer.1 EXTRA_DIST = amixer.1 all: all-am @@ -470,20 +468,6 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -volume_mapping.o: ../alsamixer/volume_mapping.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT volume_mapping.o -MD -MP -MF $(DEPDIR)/volume_mapping.Tpo -c -o volume_mapping.o `test -f '../alsamixer/volume_mapping.c' || echo '$(srcdir)/'`../alsamixer/volume_mapping.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/volume_mapping.Tpo $(DEPDIR)/volume_mapping.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../alsamixer/volume_mapping.c' object='volume_mapping.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o volume_mapping.o `test -f '../alsamixer/volume_mapping.c' || echo '$(srcdir)/'`../alsamixer/volume_mapping.c - -volume_mapping.obj: ../alsamixer/volume_mapping.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT volume_mapping.obj -MD -MP -MF $(DEPDIR)/volume_mapping.Tpo -c -o volume_mapping.obj `if test -f '../alsamixer/volume_mapping.c'; then $(CYGPATH_W) '../alsamixer/volume_mapping.c'; else $(CYGPATH_W) '$(srcdir)/../alsamixer/volume_mapping.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/volume_mapping.Tpo $(DEPDIR)/volume_mapping.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='../alsamixer/volume_mapping.c' object='volume_mapping.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o volume_mapping.obj `if test -f '../alsamixer/volume_mapping.c'; then $(CYGPATH_W) '../alsamixer/volume_mapping.c'; else $(CYGPATH_W) '$(srcdir)/../alsamixer/volume_mapping.c'; fi` install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ diff -Nru alsa-utils-1.2.2/amixer/amixer.1 alsa-utils-1.2.6/amixer/amixer.1 --- alsa-utils-1.2.2/amixer/amixer.1 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/amixer/amixer.1 2021-12-06 10:17:28.000000000 +0000 @@ -44,11 +44,12 @@ The parameters \fIcap, nocap, mute, unmute, toggle\fP are used to change capture (recording) and muting for the group specified. -The optional modifiers can be put as extra parameters to specify -the stream direction or channels to apply. +The optional modifiers can be put as extra parameters before the value to +specify the stream direction or channels to apply. The modifiers \fIplayback\fP and \fIcapture\fP specify the stream, -and the modifiers \fIfront, rear, center, woofer\fP are used to specify -channels to be changed. +and the modifiers \fIfront, frontleft, frontright, frontcenter, center, +rear, rearright, rearleft, woofer\fP are used to specify channels to be +changed. A simple mixer control must be specified. Only one device can be controlled at a time. @@ -79,6 +80,16 @@ Shows the card control contents. The identifier has same syntax as for the \fIcset\fP command. +.SH ADVANCED COMMANDS + +.TP +\fIsevents\fP +Shows the events for the simple mixer controls. + +.TP +\fIevents\fP +Shows the events for the mixer controls. + .SH OPTIONS .TP diff -Nru alsa-utils-1.2.2/amixer/amixer.c alsa-utils-1.2.6/amixer/amixer.c --- alsa-utils-1.2.2/amixer/amixer.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/amixer/amixer.c 2021-12-06 10:17:28.000000000 +0000 @@ -81,6 +81,9 @@ printf(" contents show contents of all controls for given card\n"); printf(" cset cID P set control contents for one control\n"); printf(" cget cID get control contents for one control\n"); + printf("\nAvailable advanced commands:\n"); + printf(" sevents show the mixer events for simple controls\n"); + printf(" events show the mixer events for simple controls\n"); return 0; } @@ -192,16 +195,22 @@ int tmp; if (range == 0) - return 0; + return min; val -= min; tmp = rint((double)val/(double)range * 100); return tmp; } -/* Function to convert from percentage to volume. val = percentage */ +/* Function to convert from percentage to volume. perc = percentage */ +static long convert_prange1(long perc, long min, long max) +{ + long tmp; -#define convert_prange1(val, min, max) \ - ceil((val) * ((max) - (min)) * 0.01 + (min)) + tmp = rint((double)perc * (double)(max - min) * 0.01); + if (tmp == 0 && perc > 0) + tmp++; + return tmp + min; +} struct volume_ops { int (*get_range)(snd_mixer_elem_t *elem, long *min, long *max); @@ -1596,7 +1605,8 @@ if (res >= 0) { printf("Poll ok: %i\n", res); res = snd_hctl_handle_events(handle); - assert(res > 0); + if (res < 0) + printf("ERR: %s (%d)\n", snd_strerror(res), res); } } snd_hctl_close(handle); @@ -1765,7 +1775,7 @@ int main(int argc, char *argv[]) { - int morehelp, level = 0; + int badopt, retval, level = 0; int read_stdin = 0; static const struct option long_option[] = { @@ -1784,7 +1794,7 @@ {NULL, 0, NULL, 0}, }; - morehelp = 0; + badopt = 0; while (1) { int c; @@ -1799,10 +1809,14 @@ int i; i = snd_card_get_index(optarg); if (i >= 0 && i < 32) +#if defined(SND_LIB_VER) && SND_LIB_VER(1, 2, 5) <= SND_LIB_VERSION + sprintf(card, "sysdefault:%i", i); +#else sprintf(card, "hw:%i", i); +#endif else { - fprintf(stderr, "Invalid card number.\n"); - morehelp++; + fprintf(stderr, "Invalid card number '%s'.\n", optarg); + badopt++; } } break; @@ -1824,7 +1838,7 @@ break; case 'v': printf("amixer version " SND_UTIL_VERSION_STR "\n"); - return 1; + return 0; case 'a': smixer_level = 1; memset(&smixer_options, 0, sizeof(smixer_options)); @@ -1835,7 +1849,7 @@ smixer_options.abstract = SND_MIXER_SABSTRACT_BASIC; else { fprintf(stderr, "Select correct abstraction level (none or basic)...\n"); - morehelp++; + badopt++; } break; case 's': @@ -1848,49 +1862,55 @@ std_vol_type = VOL_MAP; break; default: - fprintf(stderr, "Invalid switch or option needs an argument.\n"); - morehelp++; + fprintf(stderr, "Invalid switch or option -%c needs an argument.\n", c); + badopt++; } } - if (morehelp) { - help(); + if (badopt) return 1; - } + smixer_options.device = card; - if (read_stdin) - return exec_stdin(); + if (read_stdin) { + retval = exec_stdin(); + goto finish; + } if (argc - optind <= 0) { - return selems(LEVEL_BASIC | level) ? 1 : 0; + retval = selems(LEVEL_BASIC | level) ? 1 : 0; + goto finish; } if (!strcmp(argv[optind], "help")) { - return help() ? 1 : 0; + retval = help() ? 1 : 0; } else if (!strcmp(argv[optind], "info")) { - return info() ? 1 : 0; + retval = info() ? 1 : 0; } else if (!strcmp(argv[optind], "controls")) { - return controls(level) ? 1 : 0; + retval = controls(level) ? 1 : 0; } else if (!strcmp(argv[optind], "contents")) { - return controls(LEVEL_BASIC | level) ? 1 : 0; + retval = controls(LEVEL_BASIC | level) ? 1 : 0; } else if (!strcmp(argv[optind], "scontrols") || !strcmp(argv[optind], "simple")) { - return selems(level) ? 1 : 0; + retval = selems(level) ? 1 : 0; } else if (!strcmp(argv[optind], "scontents")) { - return selems(LEVEL_BASIC | level) ? 1 : 0; + retval = selems(LEVEL_BASIC | level) ? 1 : 0; } else if (!strcmp(argv[optind], "sset") || !strcmp(argv[optind], "set")) { - return sset(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL, 0, 0) ? 1 : 0; + retval = sset(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL, 0, 0) ? 1 : 0; } else if (!strcmp(argv[optind], "sget") || !strcmp(argv[optind], "get")) { - return sset(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL, 1, 0) ? 1 : 0; + retval = sset(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL, 1, 0) ? 1 : 0; } else if (!strcmp(argv[optind], "cset")) { - return cset(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL, 0, 0) ? 1 : 0; + retval = cset(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL, 0, 0) ? 1 : 0; } else if (!strcmp(argv[optind], "cget")) { - return cset(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL, 1, 0) ? 1 : 0; + retval = cset(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL, 1, 0) ? 1 : 0; } else if (!strcmp(argv[optind], "events")) { - return events(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL); + retval = events(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL); } else if (!strcmp(argv[optind], "sevents")) { - return sevents(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL); + retval = sevents(argc - optind - 1, argc - optind > 1 ? argv + optind + 1 : NULL); } else { fprintf(stderr, "amixer: Unknown command '%s'...\n", argv[optind]); + retval = 0; } - return 0; +finish: + snd_config_update_free_global(); + + return retval; } diff -Nru alsa-utils-1.2.2/amixer/volume_mapping.c alsa-utils-1.2.6/amixer/volume_mapping.c --- alsa-utils-1.2.2/amixer/volume_mapping.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/amixer/volume_mapping.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2010 Clemens Ladisch + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +/* + * The functions in this file map the value ranges of ALSA mixer controls onto + * the interval 0..1. + * + * The mapping is designed so that the position in the interval is proportional + * to the volume as a human ear would perceive it (i.e., the position is the + * cubic root of the linear sample multiplication factor). For controls with + * a small range (24 dB or less), the mapping is linear in the dB values so + * that each step has the same size visually. Only for controls without dB + * information, a linear mapping of the hardware volume register values is used + * (this is the same algorithm as used in the old alsamixer). + * + * When setting the volume, 'dir' is the rounding direction: + * -1/0/1 = down/nearest/up. + */ + +#define _ISOC99_SOURCE /* lrint() */ +#include "aconfig.h" +#include +#include +#include "volume_mapping.h" + +#define MAX_LINEAR_DB_SCALE 24 + +static inline bool use_linear_dB_scale(long dBmin, long dBmax) +{ + return dBmax - dBmin <= MAX_LINEAR_DB_SCALE * 100; +} + +static long lrint_dir(double x, int dir) +{ + if (dir > 0) + return lrint(ceil(x)); + else if (dir < 0) + return lrint(floor(x)); + else + return lrint(x); +} + +enum ctl_dir { PLAYBACK, CAPTURE }; + +static int (* const get_dB_range[2])(snd_mixer_elem_t *, long *, long *) = { + snd_mixer_selem_get_playback_dB_range, + snd_mixer_selem_get_capture_dB_range, +}; +static int (* const get_raw_range[2])(snd_mixer_elem_t *, long *, long *) = { + snd_mixer_selem_get_playback_volume_range, + snd_mixer_selem_get_capture_volume_range, +}; +static int (* const get_dB[2])(snd_mixer_elem_t *, snd_mixer_selem_channel_id_t, long *) = { + snd_mixer_selem_get_playback_dB, + snd_mixer_selem_get_capture_dB, +}; +static int (* const get_raw[2])(snd_mixer_elem_t *, snd_mixer_selem_channel_id_t, long *) = { + snd_mixer_selem_get_playback_volume, + snd_mixer_selem_get_capture_volume, +}; +static int (* const set_dB[2])(snd_mixer_elem_t *, snd_mixer_selem_channel_id_t, long, int) = { + snd_mixer_selem_set_playback_dB, + snd_mixer_selem_set_capture_dB, +}; +static int (* const set_raw[2])(snd_mixer_elem_t *, snd_mixer_selem_channel_id_t, long) = { + snd_mixer_selem_set_playback_volume, + snd_mixer_selem_set_capture_volume, +}; + +static double get_normalized_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel, + enum ctl_dir ctl_dir) +{ + long min, max, value; + double normalized, min_norm; + int err; + + err = get_dB_range[ctl_dir](elem, &min, &max); + if (err < 0 || min >= max) { + err = get_raw_range[ctl_dir](elem, &min, &max); + if (err < 0 || min == max) + return 0; + + err = get_raw[ctl_dir](elem, channel, &value); + if (err < 0) + return 0; + + return (value - min) / (double)(max - min); + } + + err = get_dB[ctl_dir](elem, channel, &value); + if (err < 0) + return 0; + + if (use_linear_dB_scale(min, max)) + return (value - min) / (double)(max - min); + + normalized = pow(10, (value - max) / 6000.0); + if (min != SND_CTL_TLV_DB_GAIN_MUTE) { + min_norm = pow(10, (min - max) / 6000.0); + normalized = (normalized - min_norm) / (1 - min_norm); + } + + return normalized; +} + +static int set_normalized_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel, + double volume, + int dir, + enum ctl_dir ctl_dir) +{ + long min, max, value; + double min_norm; + int err; + + err = get_dB_range[ctl_dir](elem, &min, &max); + if (err < 0 || min >= max) { + err = get_raw_range[ctl_dir](elem, &min, &max); + if (err < 0) + return err; + + value = lrint_dir(volume * (max - min), dir) + min; + return set_raw[ctl_dir](elem, channel, value); + } + + if (use_linear_dB_scale(min, max)) { + value = lrint_dir(volume * (max - min), dir) + min; + return set_dB[ctl_dir](elem, channel, value, dir); + } + + if (min != SND_CTL_TLV_DB_GAIN_MUTE) { + min_norm = pow(10, (min - max) / 6000.0); + volume = volume * (1 - min_norm) + min_norm; + } + value = lrint_dir(6000.0 * log10(volume), dir) + max; + return set_dB[ctl_dir](elem, channel, value, dir); +} + +double get_normalized_playback_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel) +{ + return get_normalized_volume(elem, channel, PLAYBACK); +} + +double get_normalized_capture_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel) +{ + return get_normalized_volume(elem, channel, CAPTURE); +} + +int set_normalized_playback_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel, + double volume, + int dir) +{ + return set_normalized_volume(elem, channel, volume, dir, PLAYBACK); +} + +int set_normalized_capture_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel, + double volume, + int dir) +{ + return set_normalized_volume(elem, channel, volume, dir, CAPTURE); +} diff -Nru alsa-utils-1.2.2/amixer/volume_mapping.h alsa-utils-1.2.6/amixer/volume_mapping.h --- alsa-utils-1.2.2/amixer/volume_mapping.h 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/amixer/volume_mapping.h 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,19 @@ +#ifndef VOLUME_MAPPING_H_INCLUDED +#define VOLUME_MAPPING_H_INCLUDED + +#include + +double get_normalized_playback_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel); +double get_normalized_capture_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel); +int set_normalized_playback_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel, + double volume, + int dir); +int set_normalized_capture_volume(snd_mixer_elem_t *elem, + snd_mixer_selem_channel_id_t channel, + double volume, + int dir); + +#endif diff -Nru alsa-utils-1.2.2/aplay/Makefile.in alsa-utils-1.2.6/aplay/Makefile.in --- alsa-utils-1.2.2/aplay/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/aplay/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -93,7 +93,8 @@ subdir = aplay ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -259,8 +260,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -340,6 +341,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/aplay/aplay.1 alsa-utils-1.2.6/aplay/aplay.1 --- alsa-utils-1.2.2/aplay/aplay.1 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/aplay/aplay.1 2021-12-06 10:17:28.000000000 +0000 @@ -62,7 +62,7 @@ The available format shortcuts are: .nf \-f cd (16 bit little endian, 44100, stereo) [\-f S16_LE \-c2 \-r44100] -\-f cdr (16 bit big endian, 44100, stereo) [\-f S16_BE \-c2 \-f44100] +\-f cdr (16 bit big endian, 44100, stereo) [\-f S16_BE \-c2 \-r44100] \-f dat (16 bit little endian, 48000, stereo) [\-f S16_LE \-c2 \-r48000] .fi If no format is given U8 is used. @@ -79,7 +79,7 @@ Either '-d' or '-s' option is available exclusively. .TP \fI\-s, \-\-samples=#\fP -Interrupt after tranmission of # PCM frames. +Interrupt after transmission of # PCM frames. A value of zero means infinity. The default is zero, so if this options is omitted then the record/playback process will run until it is killed. Either '-d' or '-s' option is available exclusively. diff -Nru alsa-utils-1.2.2/aplay/aplay.c alsa-utils-1.2.6/aplay/aplay.c --- alsa-utils-1.2.2/aplay/aplay.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/aplay/aplay.c 2021-12-06 10:17:28.000000000 +0000 @@ -525,7 +525,7 @@ }; char *pcm_name = "default"; int tmp, err, c; - int do_device_list = 0, do_pcm_list = 0; + int do_device_list = 0, do_pcm_list = 0, force_sample_format = 0; snd_pcm_info_t *info; FILE *direction; @@ -612,6 +612,7 @@ } break; case 'f': + force_sample_format = 1; if (strcasecmp(optarg, "cd") == 0 || strcasecmp(optarg, "cdr") == 0) { if (strcasecmp(optarg, "cdr") == 0) rhwparams.format = SND_PCM_FORMAT_S16_BE; @@ -844,6 +845,14 @@ } } + if (!force_sample_format && + isatty(fileno(stdin)) && + stream == SND_PCM_STREAM_CAPTURE && + snd_pcm_format_width(rhwparams.format) <= 8) + fprintf(stderr, "Warning: Some sources (like microphones) may produce inaudiable results\n" + " with 8-bit sampling. Use '-f' argument to increase resolution\n" + " e.g. '-f S16_LE'.\n"); + chunk_size = 1024; hwparams = rhwparams; @@ -1284,7 +1293,7 @@ } if (i >= hw_chmap->channels) { char buf[256]; - error(_("Channel %d doesn't match with hw_parmas"), ch); + error(_("Channel %d doesn't match with hw_params"), ch); snd_pcm_chmap_print(hw_chmap, sizeof(buf), buf); fprintf(stderr, "hardware chmap = %s\n", buf); free(hw_chmap); @@ -1528,6 +1537,19 @@ tcsetattr(fileno(stdin), TCSANOW, &term); } +static char wait_for_input(void) +{ + struct pollfd pfd; + unsigned char b; + + do { + pfd.fd = fileno(stdin); + pfd.events = POLLIN; + poll(&pfd, 1, -1); + } while (read(fileno(stdin), &b, 1) != 1); + return b; +} + static void do_pause(void) { int err; @@ -1546,7 +1568,7 @@ return; } while (1) { - while (read(fileno(stdin), &b, 1) != 1); + b = wait_for_input(); if (b == ' ' || b == '\r') { while (read(fileno(stdin), &b, 1) == 1); if (snd_pcm_state(handle) == SND_PCM_STATE_SUSPENDED) @@ -1571,7 +1593,7 @@ while (read(fileno(stdin), &b, 1) == 1); fprintf(stderr, _("\r=== PAUSE === ")); fflush(stderr); - do_pause(); + do_pause(); fprintf(stderr, " \r"); fflush(stderr); } @@ -1651,7 +1673,8 @@ prg_exit(EXIT_FAILURE); } return; /* ok, data should be accepted again */ - } if (snd_pcm_status_get_state(status) == SND_PCM_STATE_DRAINING) { + } + if (snd_pcm_status_get_state(status) == SND_PCM_STATE_DRAINING) { if (verbose) { fprintf(stderr, _("Status(DRAINING):\n")); snd_pcm_status_dump(status, log); @@ -1735,10 +1758,12 @@ if (c) memset(line + bar_length + 6 + 1, '#', p); else - memset(line + bar_length - p - 1, '#', p); - p = maxperc[c] * bar_length / 100; - if (p > bar_length) - p = bar_length; + memset(line + bar_length - p, '#', p); + p = maxperc[c] * bar_length / 100 - 1; + if (p < 0) + p = 0; + else if (p >= bar_length) + p = bar_length - 1; if (c) line[bar_length + 6 + 1 + p] = '+'; else @@ -1765,12 +1790,12 @@ } /* peak handler */ -static void compute_max_peak(u_char *data, size_t count) +static void compute_max_peak(u_char *data, size_t samples) { signed int val, max, perc[2], max_peak[2]; - static int run = 0; - size_t ocount = count; - int format_little_endian = snd_pcm_format_little_endian(hwparams.format); + static int run = 0; + size_t osamples = samples; + int format_little_endian = snd_pcm_format_little_endian(hwparams.format); int ichans, c; if (vumeter == VUMETER_STEREO) @@ -1784,7 +1809,7 @@ signed char *valp = (signed char *)data; signed char mask = snd_pcm_format_silence(hwparams.format); c = 0; - while (count-- > 0) { + while (samples-- > 0) { val = *valp++ ^ mask; val = abs(val); if (max_peak[c] < val) @@ -1799,16 +1824,16 @@ signed short mask = snd_pcm_format_silence_16(hwparams.format); signed short sval; - count /= 2; c = 0; - while (count-- > 0) { + while (samples-- > 0) { if (format_little_endian) sval = le16toh(*valp); else sval = be16toh(*valp); - sval = abs(sval) ^ mask; - if (max_peak[c] < sval) - max_peak[c] = sval; + sval ^= mask; + val = abs(sval); + if (max_peak[c] < val) + max_peak[c] = val; valp++; if (vumeter == VUMETER_STEREO) c = !c; @@ -1819,19 +1844,19 @@ unsigned char *valp = data; signed int mask = snd_pcm_format_silence_32(hwparams.format); - count /= 3; c = 0; - while (count-- > 0) { + while (samples-- > 0) { if (format_little_endian) { val = valp[0] | (valp[1]<<8) | (valp[2]<<16); } else { val = (valp[0]<<16) | (valp[1]<<8) | valp[2]; } + val ^= mask; /* Correct signed bit in 32-bit value */ if (val & (1<<(bits_per_sample-1))) { val |= 0xff<<24; /* Negate upper bits too */ } - val = abs(val) ^ mask; + val = abs(val); if (max_peak[c] < val) max_peak[c] = val; valp += 3; @@ -1844,14 +1869,17 @@ signed int *valp = (signed int *)data; signed int mask = snd_pcm_format_silence_32(hwparams.format); - count /= 4; c = 0; - while (count-- > 0) { + while (samples-- > 0) { if (format_little_endian) val = le32toh(*valp); else val = be32toh(*valp); - val = abs(val) ^ mask; + val ^= mask; + if (val == 0x80000000U) + val = 0x7fffffff; + else + val = abs(val); if (max_peak[c] < val) max_peak[c] = val; valp++; @@ -1872,6 +1900,8 @@ max = 0x7fffffff; for (c = 0; c < ichans; c++) { + if (max_peak[c] > max) + max_peak[c] = max; if (bits_per_sample > 16) perc[c] = max_peak[c] / (max / 100); else @@ -1895,8 +1925,8 @@ print_vu_meter(perc, maxperc); fflush(stderr); } - else if(verbose==3) { - fprintf(stderr, _("Max peak (%li samples): 0x%08x "), (long)ocount, max_peak[0]); + else if (verbose==3) { + fprintf(stderr, _("Max peak (%li samples): 0x%08x "), (long)osamples, max_peak[0]); for (val = 0; val < 20; val++) if (val <= perc[0] / 5) putc('#', stderr); @@ -1917,22 +1947,46 @@ static snd_pcm_sframes_t minavail, mindelay; static snd_pcm_sframes_t badavail = 0, baddelay = 0; snd_pcm_sframes_t outofrange; - snd_pcm_sframes_t avail, delay; + snd_pcm_sframes_t avail, delay, savail, sdelay; + snd_pcm_status_t *status; int err; + snd_pcm_status_alloca(&status); err = snd_pcm_avail_delay(handle, &avail, &delay); if (err < 0) return; + err = snd_pcm_status(handle, status); + if (err < 0) + return; + savail = snd_pcm_status_get_avail(status); + sdelay = snd_pcm_status_get_delay(status); outofrange = (test_coef * (snd_pcm_sframes_t)buffer_frames) / 2; if (avail > outofrange || avail < -outofrange || delay > outofrange || delay < -outofrange) { - badavail = avail; baddelay = delay; - availsum = delaysum = samples = 0; - maxavail = maxdelay = 0; - minavail = mindelay = buffer_frames * 16; - fprintf(stderr, _("Suspicious buffer position (%li total): " - "avail = %li, delay = %li, buffer = %li\n"), - ++counter, (long)avail, (long)delay, (long)buffer_frames); + badavail = avail; baddelay = delay; + availsum = delaysum = samples = 0; + maxavail = maxdelay = 0; + minavail = mindelay = buffer_frames * 16; + fprintf(stderr, _("Suspicious buffer position (%li total): " + "avail = %li, delay = %li, buffer = %li\n"), + ++counter, (long)avail, (long)delay, (long)buffer_frames); + } else if (savail > outofrange || savail < -outofrange || + sdelay > outofrange || sdelay < -outofrange) { + badavail = savail; baddelay = sdelay; + availsum = delaysum = samples = 0; + maxavail = maxdelay = 0; + minavail = mindelay = buffer_frames * 16; + fprintf(stderr, _("Suspicious status buffer position (%li total): " + "avail = %li, delay = %li, buffer = %li\n"), + ++counter, (long)savail, (long)sdelay, (long)buffer_frames); + } else if (stream == SND_PCM_STREAM_CAPTURE && avail > delay) { + fprintf(stderr, _("Suspicious buffer position avail > delay (%li total): " + "avail = %li, delay = %li\n"), + ++counter, (long)avail, (long)delay); + } else if (stream == SND_PCM_STREAM_CAPTURE && savail > sdelay) { + fprintf(stderr, _("Suspicious status buffer position avail > delay (%li total): " + "avail = %li, delay = %li\n"), + ++counter, (long)savail, (long)sdelay); } else if (verbose) { time(&now); if (tmr == (time_t) -1) { @@ -1943,19 +1997,27 @@ } if (avail > maxavail) maxavail = avail; + if (savail > maxavail) + maxavail = savail; if (delay > maxdelay) maxdelay = delay; + if (sdelay > maxdelay) + maxdelay = sdelay; if (avail < minavail) minavail = avail; + if (savail < minavail) + minavail = savail; if (delay < mindelay) mindelay = delay; + if (sdelay < mindelay) + mindelay = sdelay; availsum += avail; delaysum += delay; samples++; - if (avail != 0 && now != tmr) { + if ((maxavail != 0 || maxdelay != 0) && now != tmr) { fprintf(stderr, "BUFPOS: avg%li/%li " "min%li/%li max%li/%li (%li) (%li:%li/%li)\n", - (long)(availsum / samples), + (long)(availsum / samples), (long)(delaysum / samples), (long)minavail, (long)mindelay, (long)maxavail, (long)maxdelay, @@ -1964,6 +2026,10 @@ tmr = now; } } + if (verbose == 1) { + fprintf(stderr, _("Status(R/W) (standalone avail=%li delay=%li):\n"), (long)avail, (long)delay); + snd_pcm_status_dump(status, log); + } } /* @@ -2135,7 +2201,9 @@ count = chunk_size; } - while (count > 0 && !in_aborting) { + while (count > 0) { + if (in_aborting) + goto abort; if (test_position) do_test_position(); check_stdin(); @@ -2161,6 +2229,7 @@ data += r * bits_per_frame / 8; } } +abort: return rcount; } @@ -2174,7 +2243,9 @@ count = chunk_size; } - while (count > 0 && !in_aborting) { + while (count > 0) { + if (in_aborting) + goto abort; unsigned int channel; void *bufs[channels]; size_t offset = result; @@ -2206,6 +2277,7 @@ count -= r; } } +abort: return rcount; } @@ -2492,7 +2564,9 @@ } } /* while(1) */ __end: - voc_pcm_flush(); + if (!in_aborting) { + voc_pcm_flush(); + } free(buf); } /* that was a big one, perhaps somebody split it :-) */ @@ -2807,9 +2881,11 @@ written += r; l = 0; } - snd_pcm_nonblock(handle, 0); - snd_pcm_drain(handle); - snd_pcm_nonblock(handle, nonblock); + if (!in_aborting) { + snd_pcm_nonblock(handle, 0); + snd_pcm_drain(handle); + snd_pcm_nonblock(handle, nonblock); + } } static int read_header(int *loaded, int header_size) @@ -3037,6 +3113,7 @@ /* get a copy of the original filename */ strncpy(buf, name, sizeof(buf)); + buf[sizeof(buf)-1] = '\0'; /* separate extension from filename */ s = buf + strlen(buf); @@ -3199,11 +3276,12 @@ size_t c = (rest <= (off64_t)chunk_bytes) ? (size_t)rest : chunk_bytes; size_t f = c * 8 / bits_per_frame; - if (pcm_read(audiobuf, f) != f) { + size_t read = pcm_read(audiobuf, f); + size_t save; + if (read != f) in_aborting = 1; - break; - } - if (xwrite(fd, audiobuf, c) != c) { + save = read * bits_per_frame / 8; + if (xwrite(fd, audiobuf, save) != save) { perror(name); in_aborting = 1; break; @@ -3263,7 +3341,7 @@ do { r = safe_read(fds[0], bufs[0], expected); if (r < 0) { - perror(names[channel]); + perror(names[0]); prg_exit(EXIT_FAILURE); } for (channel = 1; channel < channels; ++channel) { @@ -3283,9 +3361,11 @@ r = r * bits_per_frame / 8; count -= r; } - snd_pcm_nonblock(handle, 0); - snd_pcm_drain(handle); - snd_pcm_nonblock(handle, nonblock); + if (!in_aborting) { + snd_pcm_nonblock(handle, 0); + snd_pcm_drain(handle); + snd_pcm_nonblock(handle, nonblock); + } } static void capturev_go(int* fds, unsigned int channels, off64_t count, int rtype, char **names) diff -Nru alsa-utils-1.2.2/aplay/arecord.1 alsa-utils-1.2.6/aplay/arecord.1 --- alsa-utils-1.2.2/aplay/arecord.1 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/aplay/arecord.1 2021-12-06 10:17:28.000000000 +0000 @@ -62,7 +62,7 @@ The available format shortcuts are: .nf \-f cd (16 bit little endian, 44100, stereo) [\-f S16_LE \-c2 \-r44100] -\-f cdr (16 bit big endian, 44100, stereo) [\-f S16_BE \-c2 \-f44100] +\-f cdr (16 bit big endian, 44100, stereo) [\-f S16_BE \-c2 \-r44100] \-f dat (16 bit little endian, 48000, stereo) [\-f S16_LE \-c2 \-r48000] .fi If no format is given U8 is used. @@ -79,7 +79,7 @@ Either '-d' or '-s' option is available exclusively. .TP \fI\-s, \-\-samples=#\fP -Interrupt after tranmission of # PCM frames. +Interrupt after transmission of # PCM frames. A value of zero means infinity. The default is zero, so if this options is omitted then the record/playback process will run until it is killed. Either '-d' or '-s' option is available exclusively. diff -Nru alsa-utils-1.2.2/axfer/Makefile.in alsa-utils-1.2.6/axfer/Makefile.in --- alsa-utils-1.2.2/axfer/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/axfer/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -95,7 +95,8 @@ subdir = axfer ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -337,8 +338,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -418,6 +419,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/axfer/axfer-transfer.1 alsa-utils-1.2.6/axfer/axfer-transfer.1 --- alsa-utils-1.2.2/axfer/axfer-transfer.1 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/axfer/axfer-transfer.1 2021-12-06 10:17:28.000000000 +0000 @@ -375,7 +375,7 @@ software parameter of PCM substream. In blocking mode, the value is used as threshold of the number of available audio data frames in buffer of PCM substream to wake up process blocked by I/O operation. In non\-blocking mode, -any I/O operation returns \-EAGAIN untill the available number of audio data frame reaches the threshold. +any I/O operation returns \-EAGAIN until the available number of audio data frame reaches the threshold. This option has an effect in cases neither .I \-\-mmap diff -Nru alsa-utils-1.2.2/axfer/container.c alsa-utils-1.2.6/axfer/container.c --- alsa-utils-1.2.2/axfer/container.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/axfer/container.c 2021-12-06 10:17:28.000000000 +0000 @@ -143,8 +143,8 @@ return 0; } -int container_parser_init(struct container_context *cntr, - const char *const path, unsigned int verbose) +int container_parser_init(struct container_context *cntr, int fd, + unsigned int verbose) { const struct container_parser *parsers[] = { [CONTAINER_FORMAT_RIFF_WAVE] = &container_parser_riff_wave, @@ -157,8 +157,7 @@ int err; assert(cntr); - assert(path); - assert(path[0] != '\0'); + assert(fd >= 0); // Detect forgotten to destruct. assert(cntr->fd == 0); @@ -166,9 +165,10 @@ memset(cntr, 0, sizeof(*cntr)); - // Open a target descriptor. - if (!strcmp(path, "-")) { - cntr->fd = fileno(stdin); + cntr->fd = fd; + + cntr->stdio = (cntr->fd == fileno(stdin)); + if (cntr->stdio) { if (isatty(cntr->fd)) { fprintf(stderr, "A terminal is referred for standard input. " @@ -176,16 +176,12 @@ "should be referred instead.\n"); return -EIO; } - err = set_nonblock_flag(cntr->fd); - if (err < 0) - return err; - cntr->stdio = true; - } else { - cntr->fd = open(path, O_RDONLY | O_NONBLOCK); - if (cntr->fd < 0) - return -errno; } + err = set_nonblock_flag(cntr->fd); + if (err < 0) + return err; + // 4 bytes are enough to detect supported containers. err = container_recursive_read(cntr, cntr->magic, sizeof(cntr->magic)); if (err < 0) @@ -225,9 +221,8 @@ return 0; } -int container_builder_init(struct container_context *cntr, - const char *const path, enum container_format format, - unsigned int verbose) +int container_builder_init(struct container_context *cntr, int fd, + enum container_format format, unsigned int verbose) { const struct container_builder *builders[] = { [CONTAINER_FORMAT_RIFF_WAVE] = &container_builder_riff_wave, @@ -239,8 +234,7 @@ int err; assert(cntr); - assert(path); - assert(path[0] != '\0'); + assert(fd >= 0); // Detect forgotten to destruct. assert(cntr->fd == 0); @@ -248,11 +242,10 @@ memset(cntr, 0, sizeof(*cntr)); - // Open a target descriptor. - if (path == NULL || *path == '\0') - return -EINVAL; - if (!strcmp(path, "-")) { - cntr->fd = fileno(stdout); + cntr->fd = fd; + + cntr->stdio = (cntr->fd == fileno(stdout)); + if (cntr->stdio) { if (isatty(cntr->fd)) { fprintf(stderr, "A terminal is referred for standard output. " @@ -260,17 +253,12 @@ "should be referred instead.\n"); return -EIO; } - err = set_nonblock_flag(cntr->fd); - if (err < 0) - return err; - cntr->stdio = true; - } else { - cntr->fd = open(path, O_RDWR | O_NONBLOCK | O_CREAT | O_TRUNC, - 0644); - if (cntr->fd < 0) - return -errno; } + err = set_nonblock_flag(cntr->fd); + if (err < 0) + return err; + builder = builders[format]; // Allocate private data for the builder. @@ -463,7 +451,6 @@ { assert(cntr); - close(cntr->fd); if (cntr->private_data) free(cntr->private_data); diff -Nru alsa-utils-1.2.2/axfer/container.h alsa-utils-1.2.6/axfer/container.h --- alsa-utils-1.2.2/axfer/container.h 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/axfer/container.h 2021-12-06 10:17:28.000000000 +0000 @@ -11,7 +11,6 @@ #define _LARGEFILE64_SOURCE #include -#include #include #include @@ -61,11 +60,10 @@ const char *const container_suffix_from_format(enum container_format format); enum container_format container_format_from_path(const char *path); -int container_parser_init(struct container_context *cntr, - const char *const path, unsigned int verbose); -int container_builder_init(struct container_context *cntr, - const char *const path, enum container_format format, - unsigned int verbose); +int container_parser_init(struct container_context *cntr, int fd, + unsigned int verbose); +int container_builder_init(struct container_context *cntr, int fd, + enum container_format format, unsigned int verbose); void container_context_destroy(struct container_context *cntr); int container_context_pre_process(struct container_context *cntr, snd_pcm_format_t *format, diff -Nru alsa-utils-1.2.2/axfer/subcmd-transfer.c alsa-utils-1.2.6/axfer/subcmd-transfer.c --- alsa-utils-1.2.2/axfer/subcmd-transfer.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/axfer/subcmd-transfer.c 2021-12-06 10:17:28.000000000 +0000 @@ -19,6 +19,8 @@ struct container_context *cntrs; unsigned int cntr_count; + int *cntr_fds; + // NOTE: To handling Unix signal. bool interrupted; int signal; @@ -146,6 +148,20 @@ return xfer_context_init(&ctx->xfer, xfer_type, direction, argc, argv); } +static int allocate_containers(struct context *ctx, unsigned int count) +{ + ctx->cntrs = calloc(count, sizeof(*ctx->cntrs)); + if (ctx->cntrs == NULL) + return -ENOMEM; + ctx->cntr_count = count; + + ctx->cntr_fds = calloc(count, sizeof(*ctx->cntr_fds)); + if (ctx->cntr_fds == NULL) + return -ENOMEM; + + return 0; +} + static int capture_pre_process(struct context *ctx, snd_pcm_access_t *access, snd_pcm_uframes_t *frames_per_buffer, uint64_t *total_frame_count) @@ -164,10 +180,9 @@ return err; // Prepare for containers. - ctx->cntrs = calloc(ctx->xfer.path_count, sizeof(*ctx->cntrs)); - if (ctx->cntrs == NULL) - return -ENOMEM; - ctx->cntr_count = ctx->xfer.path_count; + err = allocate_containers(ctx, ctx->xfer.path_count); + if (err < 0) + return err; if (ctx->cntr_count > 1) channels = 1; @@ -176,10 +191,20 @@ *total_frame_count = 0; for (i = 0; i < ctx->cntr_count; ++i) { + const char *path = ctx->xfer.paths[i]; + int fd; uint64_t frame_count; - err = container_builder_init(ctx->cntrs + i, - ctx->xfer.paths[i], + if (!strcmp(path, "-")) { + fd = fileno(stdout); + } else { + fd = open(path, O_RDWR | O_CREAT | O_TRUNC, 0644); + if (fd < 0) + return -errno; + } + ctx->cntr_fds[i] = fd; + + err = container_builder_init(ctx->cntrs + i, ctx->cntr_fds[i], ctx->xfer.cntr_format, ctx->xfer.verbose > 1); if (err < 0) @@ -212,19 +237,28 @@ int err; // Prepare for containers. - ctx->cntrs = calloc(ctx->xfer.path_count, sizeof(*ctx->cntrs)); - if (ctx->cntrs == NULL) - return -ENOMEM; - ctx->cntr_count = ctx->xfer.path_count; + err = allocate_containers(ctx, ctx->xfer.path_count); + if (err < 0) + return err; for (i = 0; i < ctx->cntr_count; ++i) { + const char *path = ctx->xfer.paths[i]; + int fd; snd_pcm_format_t format; unsigned int channels; unsigned int rate; uint64_t frame_count; - err = container_parser_init(ctx->cntrs + i, - ctx->xfer.paths[i], + if (!strcmp(path, "-")) { + fd = fileno(stdin); + } else { + fd = open(path, O_RDONLY); + if (fd < 0) + return -errno; + } + ctx->cntr_fds[i] = fd; + + err = container_parser_init(ctx->cntrs + i, ctx->cntr_fds[i], ctx->xfer.verbose > 1); if (err < 0) return err; @@ -421,6 +455,12 @@ free(ctx->cntrs); } + if (ctx->cntr_fds) { + for (i = 0; i < ctx->cntr_count; ++i) + close(ctx->cntr_fds[i]); + free(ctx->cntr_fds); + } + mapper_context_post_process(&ctx->mapper); mapper_context_destroy(&ctx->mapper); } diff -Nru alsa-utils-1.2.2/axfer/test/Makefile.in alsa-utils-1.2.6/axfer/test/Makefile.in --- alsa-utils-1.2.2/axfer/test/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/axfer/test/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ subdir = axfer/test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -448,8 +449,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -529,6 +530,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/axfer/test/container-test.c alsa-utils-1.2.6/axfer/test/container-test.c --- alsa-utils-1.2.2/axfer/test/container-test.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/axfer/test/container-test.c 2021-12-06 10:17:28.000000000 +0000 @@ -6,11 +6,20 @@ // // Licensed under the terms of the GNU General Public License, version 2. +#include +#ifdef HAVE_MEMFD_CREATE +#define _GNU_SOURCE +#endif + #include "../container.h" #include "../misc.h" #include "generator.h" +#ifdef HAVE_MEMFD_CREATE +#include +#endif + #include #include #include @@ -24,8 +33,8 @@ bool verbose; }; -static void test_builder(struct container_context *cntr, - enum container_format format, const char *const name, +static void test_builder(struct container_context *cntr, int fd, + enum container_format format, snd_pcm_access_t access, snd_pcm_format_t sample_format, unsigned int samples_per_frame, @@ -41,7 +50,7 @@ uint64_t total_frame_count; int err; - err = container_builder_init(cntr, name, format, verbose); + err = container_builder_init(cntr, fd, format, verbose); assert(err == 0); sample = sample_format; @@ -71,8 +80,8 @@ container_context_destroy(cntr); } -static void test_parser(struct container_context *cntr, - enum container_format format, const char *const name, +static void test_parser(struct container_context *cntr, int fd, + enum container_format format, snd_pcm_access_t access, snd_pcm_format_t sample_format, unsigned int samples_per_frame, unsigned int frames_per_second, @@ -86,7 +95,7 @@ unsigned int handled_frame_count; int err; - err = container_parser_init(cntr, name, verbose); + err = container_parser_init(cntr, fd, verbose); assert(err == 0); sample = sample_format; @@ -142,30 +151,46 @@ if (buf == NULL) return -ENOMEM; - // Remove a result of a previous trial. - unlink(name); - for (i = 0; i < ARRAY_SIZE(entries); ++i) { + int fd; + off64_t pos; + frames_per_second = entries[i]; - test_builder(&trial->cntr, trial->format, name, access, +#ifdef HAVE_MEMFD_CREATE + fd = memfd_create(name, 0); +#else + fd = open(name, O_RDWR | O_CREAT | O_TRUNC, 0644); +#endif + if (fd < 0) { + err = -errno; + break; + } + + test_builder(&trial->cntr, fd, trial->format, access, sample_format, samples_per_frame, frames_per_second, frame_buffer, frame_count, trial->verbose); - test_parser(&trial->cntr, trial->format, name, access, + pos = lseek64(fd, 0, SEEK_SET); + if (pos < 0) { + err = -errno; + break; + } + + test_parser(&trial->cntr, fd, trial->format, access, sample_format, samples_per_frame, frames_per_second, buf, frame_count, trial->verbose); err = memcmp(buf, frame_buffer, size); assert(err == 0); - unlink(name); + close(fd); } free(buf); - return 0; + return err; } int main(int argc, const char *argv[]) @@ -275,7 +300,7 @@ for (i = begin; i < end; ++i) { err = generator_context_init(&gen, access_mask, sample_format_masks[i], - 1, 128, 23, 4500, 1024, + 1, 32, 23, 3000, 512, sizeof(struct container_trial)); if (err >= 0) { trial = gen.private_data; diff -Nru alsa-utils-1.2.2/axfer/test/mapper-test.c alsa-utils-1.2.6/axfer/test/mapper-test.c --- alsa-utils-1.2.2/axfer/test/mapper-test.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/axfer/test/mapper-test.c 2021-12-06 10:17:28.000000000 +0000 @@ -6,11 +6,20 @@ // // Licensed under the terms of the GNU General Public License, version 2. +#include +#ifdef HAVE_MEMFD_CREATE +#define _GNU_SOURCE +#endif + #include "../mapper.h" #include "../misc.h" #include "generator.h" +#ifdef HAVE_MEMFD_CREATE +#include +#endif + #include #include #include @@ -63,10 +72,9 @@ unsigned int frames_per_second, unsigned int frames_per_buffer, void *frame_buffer, unsigned int frame_count, - unsigned int cntr_count) + int *cntr_fds, unsigned int cntr_count) { struct container_context *cntrs = trial->cntrs; - char **paths = trial->paths; enum container_format cntr_format = trial->cntr_format; unsigned int bytes_per_sample; uint64_t total_frame_count; @@ -78,8 +86,7 @@ unsigned int channels; unsigned int rate; - err = container_builder_init(cntrs + i, paths[i], cntr_format, - 0); + err = container_builder_init(cntrs + i, cntr_fds[i], cntr_format, 0); if (err < 0) goto end; @@ -156,10 +163,9 @@ unsigned int frames_per_second, unsigned int frames_per_buffer, void *frame_buffer, unsigned int frame_count, - unsigned int cntr_count) + int *cntr_fds, unsigned int cntr_count) { struct container_context *cntrs = trial->cntrs; - char **paths = trial->paths; unsigned int bytes_per_sample; uint64_t total_frame_count; int i; @@ -170,7 +176,7 @@ unsigned int channels; unsigned int rate; - err = container_parser_init(cntrs + i, paths[i], 0); + err = container_parser_init(cntrs + i, cntr_fds[i], 0); if (err < 0) goto end; @@ -218,6 +224,7 @@ void *check_buffer, unsigned int frame_count, unsigned int cntr_count) { + int *cntr_fds; unsigned int frames_per_buffer; int i; int err; @@ -225,18 +232,46 @@ // Use a buffer aligned by typical size of page frame. frames_per_buffer = ((frame_count + 4096) / 4096) * 4096; + cntr_fds = calloc(cntr_count, sizeof(*cntr_fds)); + if (cntr_fds == NULL) + return -ENOMEM; + + for (i = 0; i < cntr_count; ++i) { + const char *path = trial->paths[i]; + +#ifdef HAVE_MEMFD_CREATE + cntr_fds[i] = memfd_create(path, 0); +#else + cntr_fds[i] = open(path, O_RDWR | O_CREAT | O_TRUNC, 0644); +#endif + if (cntr_fds[i] < 0) { + err = -errno; + goto end; + } + } + err = test_demux(trial, access, sample_format, samples_per_frame, frames_per_second, frames_per_buffer, frame_buffer, - frame_count, cntr_count); + frame_count, cntr_fds, cntr_count); if (err < 0) goto end; + for (i = 0; i < cntr_count; ++i) { + off64_t pos = lseek64(cntr_fds[i], 0, SEEK_SET); + if (pos != 0) { + err = -EIO; + goto end; + } + } + err = test_mux(trial, access, sample_format, samples_per_frame, frames_per_second, frames_per_buffer, check_buffer, - frame_count, cntr_count); + frame_count, cntr_fds, cntr_count); end: for (i = 0; i < cntr_count; ++i) - unlink(trial->paths[i]); + close(cntr_fds[i]); + + free(cntr_fds); return err; } diff -Nru alsa-utils-1.2.2/axfer/xfer-libasound-timer-mmap.c alsa-utils-1.2.6/axfer/xfer-libasound-timer-mmap.c --- alsa-utils-1.2.2/axfer/xfer-libasound-timer-mmap.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/axfer/xfer-libasound-timer-mmap.c 2021-12-06 10:17:28.000000000 +0000 @@ -171,7 +171,8 @@ // exactly the mechanism yet. err = xfer_libasound_wait_event(state, timeout_msec, &revents); - if (err < 0) + // MEMO: timeout is expected since the above call is just to measure time elapse. + if (err < 0 && err != -ETIMEDOUT) return err; if (revents & POLLERR) { // TODO: error reporting. diff -Nru alsa-utils-1.2.2/bat/Makefile.in alsa-utils-1.2.6/bat/Makefile.in --- alsa-utils-1.2.2/bat/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/bat/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -100,7 +100,8 @@ subdir = bat ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -320,8 +321,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -401,6 +402,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/bat/alsabat.1 alsa-utils-1.2.6/bat/alsabat.1 --- alsa-utils-1.2.2/bat/alsabat.1 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/bat/alsabat.1 2021-12-06 10:17:28.000000000 +0000 @@ -24,8 +24,8 @@ The hardware testing configuration may require the use of an analog cable connecting target to tester machines or a cable to create an analog -loopback if no loopback mode is not available on the sound hardware that -is being tested. +loopback if no loopback mode is available on the sound hardware that is +being tested. An analog loopback cable can be used to connect the "line in" to "line out" jacks to create a loopback. If only headphone and mic jacks (or combo jack) are available then the following simple circuit can be used to create an diff -Nru alsa-utils-1.2.2/bat/tests/Makefile.in alsa-utils-1.2.6/bat/tests/Makefile.in --- alsa-utils-1.2.2/bat/tests/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/bat/tests/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,7 +90,8 @@ subdir = bat/tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -242,8 +243,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -323,6 +324,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/bat/tests/asound_state/Makefile.in alsa-utils-1.2.6/bat/tests/asound_state/Makefile.in --- alsa-utils-1.2.2/bat/tests/asound_state/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/bat/tests/asound_state/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,7 +90,8 @@ subdir = bat/tests/asound_state ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -182,8 +183,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -263,6 +264,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/compile alsa-utils-1.2.6/compile --- alsa-utils-1.2.2/compile 2020-02-19 12:07:14.000000000 +0000 +++ alsa-utils-1.2.6/compile 2021-12-06 11:44:44.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -53,7 +53,7 @@ MINGW*) file_conv=mingw ;; - CYGWIN*) + CYGWIN* | MSYS*) file_conv=cygwin ;; *) @@ -67,7 +67,7 @@ mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; - cygwin/*) + cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) diff -Nru alsa-utils-1.2.2/config.guess alsa-utils-1.2.6/config.guess --- alsa-utils-1.2.2/config.guess 2020-02-19 12:07:14.000000000 +0000 +++ alsa-utils-1.2.6/config.guess 2021-12-06 11:44:44.000000000 +0000 @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-03-08' +timestamp='2018-08-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -84,8 +84,6 @@ exit 1 fi -trap 'exit 1' 1 2 15 - # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -96,34 +94,39 @@ # Portable tmp directory creation inspired by the Autoconf team. -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > "$dummy.c" ; - for c in cc gcc c89 c99 ; do - if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' +tmp= +# shellcheck disable=SC2172 +trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15 +trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0 + +set_cc_for_build() { + : "${TMPDIR=/tmp}" + # shellcheck disable=SC2039 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } + dummy=$tmp/dummy + case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in + ,,) echo "int x;" > "$dummy.c" + for driver in cc gcc c89 c99 ; do + if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then + CC_FOR_BUILD="$driver" + break + fi + done + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; + esac +} # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then +if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi @@ -138,7 +141,7 @@ # We could probably try harder. LIBC=gnu - eval "$set_cc_for_build" + set_cc_for_build cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) @@ -199,7 +202,7 @@ os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval "$set_cc_for_build" + set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then @@ -237,7 +240,7 @@ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi}" + echo "$machine-${os}${release}${abi-}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` @@ -389,20 +392,15 @@ echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval "$set_cc_for_build" - SUN_ARCH=i386 - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != no_compiler_found ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH=x86_64 - fi - fi - echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" + UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" + case `isainfo -b` in + 32) + echo i386-pc-solaris2"$UNAME_REL" + ;; + 64) + echo x86_64-pc-solaris2"$UNAME_REL" + ;; + esac exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -482,7 +480,7 @@ echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ @@ -579,7 +577,7 @@ exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include @@ -660,7 +658,7 @@ esac fi if [ "$HP_ARCH" = "" ]; then - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE @@ -700,7 +698,7 @@ esac if [ "$HP_ARCH" = hppa2.0w ] then - eval "$set_cc_for_build" + set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler @@ -726,7 +724,7 @@ echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include int @@ -840,6 +838,17 @@ *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; + arm:FreeBSD:*:*) + UNAME_PROCESSOR=`uname -p` + set_cc_for_build + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabi + else + echo "${UNAME_PROCESSOR}"-unknown-freebsd"`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`"-gnueabihf + fi + exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in @@ -894,8 +903,8 @@ # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; - i*86:Minix:*:*) - echo "$UNAME_MACHINE"-pc-minix + *:Minix:*:*) + echo "$UNAME_MACHINE"-unknown-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" @@ -922,7 +931,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then @@ -971,7 +980,7 @@ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) - eval "$set_cc_for_build" + set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} @@ -1285,7 +1294,7 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval "$set_cc_for_build" + set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi @@ -1358,6 +1367,7 @@ # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. + # shellcheck disable=SC2154 if test "$cputype" = 386; then UNAME_MACHINE=i386 else diff -Nru alsa-utils-1.2.2/config.rpath alsa-utils-1.2.6/config.rpath --- alsa-utils-1.2.2/config.rpath 2020-02-19 12:07:10.000000000 +0000 +++ alsa-utils-1.2.6/config.rpath 2021-12-06 11:44:41.000000000 +0000 @@ -2,7 +2,7 @@ # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # -# Copyright 1996-2016 Free Software Foundation, Inc. +# Copyright 1996-2020 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # diff -Nru alsa-utils-1.2.2/config.sub alsa-utils-1.2.6/config.sub --- alsa-utils-1.2.2/config.sub 2020-02-19 12:07:14.000000000 +0000 +++ alsa-utils-1.2.6/config.sub 2021-12-06 11:44:44.000000000 +0000 @@ -2,7 +2,7 @@ # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. -timestamp='2018-05-05' +timestamp='2018-08-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -110,16 +110,20 @@ exit 1;; esac -# Spilt fields of configuration type +# Split fields of configuration type IFS="-" read -r field1 field2 field3 field4 <&2 + exit 1 + ;; *-*-*-*) basic_machine=$field1-$field2 - os=-$field3-$field4 + os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two @@ -132,1227 +136,1133 @@ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova*) basic_machine=$field1 - os=-$maybe_os + os=$maybe_os ;; android-linux) basic_machine=$field1-unknown - os=-linux-android + os=linux-android ;; *) basic_machine=$field1-$field2 - os=-$field3 + os=$field3 ;; esac ;; *-*) - basic_machine=$field1 - os=-$field2 + # A lone config we happen to match not fitting any patern + case $field1-$field2 in + decstation-3100) + basic_machine=mips-dec + os= + ;; + *-*) + # Second component is usually, but not always the OS + case $field2 in + # Prevent following clause from handling this valid os + sun*os*) + basic_machine=$field1 + os=$field2 + ;; + # Manufacturers + dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ + | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ + | unicom* | ibm* | next | hp | isi* | apollo | altos* \ + | convergent* | ncr* | news | 32* | 3600* | 3100* \ + | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ + | ultra | tti* | harris | dolphin | highlevel | gould \ + | cbm | ns | masscomp | apple | axis | knuth | cray \ + | microblaze* | sim | cisco \ + | oki | wec | wrs | winbond) + basic_machine=$field1-$field2 + os= + ;; + *) + basic_machine=$field1 + os=$field2 + ;; + esac + ;; + esac ;; *) - basic_machine=$1 - os= - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint + # Convert single-component short-hands not valid as part of + # multi-component configurations. + case $field1 in + 386bsd) + basic_machine=i386-pc + os=bsd + ;; + a29khif) + basic_machine=a29k-amd + os=udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=scout + ;; + alliant) + basic_machine=fx80-alliant + os= + ;; + altos | altos3068) + basic_machine=m68k-altos + os= + ;; + am29k) + basic_machine=a29k-none + os=bsd + ;; + amdahl) + basic_machine=580-amdahl + os=sysv + ;; + amiga) + basic_machine=m68k-unknown + os= + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=bsd + ;; + aros) + basic_machine=i386-pc + os=aros + ;; + aux) + basic_machine=m68k-apple + os=aux + ;; + balance) + basic_machine=ns32k-sequent + os=dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=linux + ;; + cegcc) + basic_machine=arm-unknown + os=cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=bsd + ;; + convex-c2) + basic_machine=c2-convex + os=bsd + ;; + convex-c32) + basic_machine=c32-convex + os=bsd + ;; + convex-c34) + basic_machine=c34-convex + os=bsd + ;; + convex-c38) + basic_machine=c38-convex + os=bsd + ;; + cray) + basic_machine=j90-cray + os=unicos + ;; + crds | unos) + basic_machine=m68k-crds + os= + ;; + da30) + basic_machine=m68k-da30 + os= + ;; + decstation | pmax | pmin | dec3100 | decstatn) + basic_machine=mips-dec + os= + ;; + delta88) + basic_machine=m88k-motorola + os=sysv3 + ;; + dicos) + basic_machine=i686-pc + os=dicos + ;; + djgpp) + basic_machine=i586-pc + os=msdosdjgpp + ;; + ebmon29k) + basic_machine=a29k-amd + os=ebmon + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=ose + ;; + gmicro) + basic_machine=tron-gmicro + os=sysv + ;; + go32) + basic_machine=i386-pc + os=go32 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=hms + ;; + harris) + basic_machine=m88k-harris + os=sysv3 + ;; + hp300) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=hpux + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=proelf + ;; + i386mach) + basic_machine=i386-mach + os=mach + ;; + vsta) + basic_machine=i386-pc + os=vsta + ;; + isi68 | isi) + basic_machine=m68k-isi + os=sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=linux + ;; + magnum | m3230) + basic_machine=mips-mips + os=sysv + ;; + merlin) + basic_machine=ns32k-utek + os=sysv + ;; + mingw64) + basic_machine=x86_64-pc + os=mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=mingw32ce + ;; + monitor) + basic_machine=m68k-rom68k + os=coff + ;; + morphos) + basic_machine=powerpc-unknown + os=morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=moxiebox + ;; + msdos) + basic_machine=i386-pc + os=msdos + ;; + msys) + basic_machine=i686-pc + os=msys + ;; + mvs) + basic_machine=i370-ibm + os=mvs + ;; + nacl) + basic_machine=le32-unknown + os=nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=sysv4 + ;; + netbsd386) + basic_machine=i386-pc + os=netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=newsos + ;; + news1000) + basic_machine=m68030-sony + os=newsos + ;; + necv70) + basic_machine=v70-nec + os=sysv + ;; + nh3000) + basic_machine=m68k-harris + os=cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=cxux + ;; + nindy960) + basic_machine=i960-intel + os=nindy + ;; + mon960) + basic_machine=i960-intel + os=mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=nonstopux + ;; + os400) + basic_machine=powerpc-ibm + os=os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=ose + ;; + os68k) + basic_machine=m68k-none + os=os68k + ;; + paragon) + basic_machine=i860-intel + os=osf + ;; + parisc) + basic_machine=hppa-unknown + os=linux + ;; + pw32) + basic_machine=i586-unknown + os=pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=rdos + ;; + rdos32) + basic_machine=i386-pc + os=rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=coff + ;; + sa29200) + basic_machine=a29k-amd + os=udi + ;; + sei) + basic_machine=mips-sei + os=seiux + ;; + sequent) + basic_machine=i386-sequent + os= + ;; + sps7) + basic_machine=m68k-bull + os=sysv2 + ;; + st2000) + basic_machine=m68k-tandem + os= + ;; + stratus) + basic_machine=i860-stratus + os=sysv4 + ;; + sun2) + basic_machine=m68000-sun + os= + ;; + sun2os3) + basic_machine=m68000-sun + os=sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=sunos4 + ;; + sun3) + basic_machine=m68k-sun + os= + ;; + sun3os3) + basic_machine=m68k-sun + os=sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=sunos4 + ;; + sun4) + basic_machine=sparc-sun + os= + ;; + sun4os3) + basic_machine=sparc-sun + os=sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=solaris2 + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + os= + ;; + sv1) + basic_machine=sv1-cray + os=unicos + ;; + symmetry) + basic_machine=i386-sequent + os=dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=unicos + ;; + t90) + basic_machine=t90-cray + os=unicos + ;; + toad1) + basic_machine=pdp10-xkl + os=tops20 + ;; + tpf) + basic_machine=s390x-ibm + os=tpf + ;; + udi29k) + basic_machine=a29k-amd + os=udi + ;; + ultra3) + basic_machine=a29k-nyu + os=sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=none + ;; + vaxv) + basic_machine=vax-dec + os=sysv + ;; + vms) + basic_machine=vax-dec + os=vms + ;; + vxworks960) + basic_machine=i960-wrs + os=vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=vxworks + ;; + xbox) + basic_machine=i686-pc + os=mingw32 + ;; + ymp) + basic_machine=ymp-cray + os=unicos + ;; + *) + basic_machine=$1 + os= + ;; + esac ;; esac -# Decode aliases for certain CPU-COMPANY combinations. +# Decode 1-component or ad-hoc basic machines case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arceb \ - | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \ - | avr | avr32 \ - | ba \ - | be32 | be64 \ - | bfin \ - | c4x | c8051 | clipper | csky \ - | d10v | d30v | dlx | dsp16xx \ - | e2k | epiphany \ - | fido | fr30 | frv | ft32 \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia16 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa32r6 | mipsisa32r6el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64r6 | mipsisa64r6el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nds32 | nds32le | nds32be \ - | nfp \ - | nios | nios2 | nios2eb | nios2el \ - | ns16k | ns32k \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pru \ - | pyramid \ - | riscv32 | riscv64 \ - | rl78 | rx \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu \ - | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ - | ubicom32 \ - | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ - | visium \ - | wasm32 \ - | x86 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - c54x) - basic_machine=tic54x-unknown - ;; - c55x) - basic_machine=tic55x-unknown - ;; - c6x) - basic_machine=tic6x-unknown - ;; - leon|leon[3-9]) - basic_machine=sparc-$basic_machine - ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) + # Here we handle the default manufacturer of certain CPU types. It is in + # some cases the only manufacturer, in others, it is the most popular. + w89k) + cpu=hppa1.1 + vendor=winbond ;; - m9s12z | m68hcs12z | hcs12z | s12z) - basic_machine=s12z-unknown - os=-none + op50n) + cpu=hppa1.1 + vendor=oki ;; - ms1) - basic_machine=mt-unknown + op60c) + cpu=hppa1.1 + vendor=oki ;; - - strongarm | thumb | xscale) - basic_machine=arm-unknown + ibm*) + cpu=i370 + vendor=ibm ;; - xgate) - basic_machine=$basic_machine-unknown - os=-none + orion105) + cpu=clipper + vendor=highlevel ;; - xscaleeb) - basic_machine=armeb-unknown + mac | mpw | mac-mpw) + cpu=m68k + vendor=apple ;; - - xscaleel) - basic_machine=armel-unknown + pmac | pmac-mpw) + cpu=powerpc + vendor=apple ;; - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | ba-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | e2k-* | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa32r6-* | mipsisa32r6el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64r6-* | mipsisa64r6el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nfp-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pru-* \ - | pyramid-* \ - | riscv32-* | riscv64-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | visium-* \ - | wasm32-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-pc - os=-bsd - ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att + cpu=m68000 + vendor=att ;; 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - asmjs) - basic_machine=asmjs-unknown - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + cpu=we32k + vendor=att ;; bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c54x-*) - basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c55x-*) - basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c6x-*) - basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16 | cr16-*) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec + cpu=powerpc + vendor=ibm + os=cnk ;; decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 + cpu=pdp10 + vendor=dec + os=tops10 ;; decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 + cpu=pdp10 + vendor=dec + os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx + cpu=m68k + vendor=motorola ;; dpx2*) - basic_machine=m68k-bull - os=-sysv3 - ;; - e500v[12]) - basic_machine=powerpc-unknown - os=$os"spe" - ;; - e500v[12]-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=$os"spe" - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd + cpu=m68k + vendor=bull + os=sysv3 ;; encore | umax | mmax) - basic_machine=ns32k-encore + cpu=ns32k + vendor=encore ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose + elxsi) + cpu=elxsi + vendor=elxsi + os=${os:-bsd} ;; fx2800) - basic_machine=i860-alliant + cpu=i860 + vendor=alliant ;; genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 + cpu=ns32k + vendor=ns ;; h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp + cpu=m68000 + vendor=hp ;; hp9k3[2-9][0-9]) - basic_machine=m68k-hp + cpu=m68k + vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp + cpu=hppa1.0 + vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp + cpu=hppa1.1 + vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm + cpu=hppa1.0 + vendor=hp ;; i*86v32) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv32 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv32 ;; i*86v4*) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv4 + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv4 ;; i*86v) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-sysv + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=sysv ;; i*86sol2) - basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - vsta) - basic_machine=i386-unknown - os=-vsta + cpu=`echo "$1" | sed -e 's/86.*/86/'` + vendor=pc + os=solaris2 + ;; + j90 | j90-cray) + cpu=j90 + vendor=cray + os=${os:-unicos} ;; iris | iris4d) - basic_machine=mips-sgi + cpu=mips + vendor=sgi case $os in - -irix*) + irix*) ;; *) - os=-irix4 + os=irix4 ;; esac ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - leon-*|leon[3-9]-*) - basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; miniframe) - basic_machine=m68000-convergent + cpu=m68000 + vendor=convergent ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - moxiebox) - basic_machine=moxie-unknown - os=-moxiebox - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` - ;; - msys) - basic_machine=i686-pc - os=-msys - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - nacl) - basic_machine=le32-unknown - os=-nacl - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos + *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) + cpu=m68k + vendor=atari + os=mint ;; news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv + cpu=mips + vendor=sony + os=newsos ;; next | m*-next) - basic_machine=m68k-next + cpu=m68k + vendor=next case $os in - -nextstep* ) + nextstep* ) ;; - -ns2*) - os=-nextstep2 + ns2*) + os=nextstep2 ;; *) - os=-nextstep3 + os=nextstep3 ;; esac ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - nsv-tandem) - basic_machine=nsv-tandem - ;; - nsx-tandem) - basic_machine=nsx-tandem + cpu=np1 + vendor=gould ;; op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k + cpu=hppa1.1 + vendor=oki + os=proelf ;; pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` - os=-linux + cpu=hppa1.1 + vendor=hitachi + os=hiuxwe2 ;; pbd) - basic_machine=sparc-tti + cpu=sparc + vendor=tti ;; pbb) - basic_machine=m68k-tti + cpu=m68k + vendor=tti ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 + pc532) + cpu=ns32k + vendor=pc532 ;; - pc98) - basic_machine=i386-pc + pn) + cpu=pn + vendor=gould ;; - pc98-*) - basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` + power) + cpu=power + vendor=ibm ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc + ps2) + cpu=i386 + vendor=ibm ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc + rm[46]00) + cpu=mips + vendor=siemens ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc + rtpc | rtpc-*) + cpu=romp + vendor=ibm ;; - pentium4) - basic_machine=i786-pc + sde) + cpu=mipsisa32 + vendor=sde + os=${os:-elf} ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` + simso-wrs) + cpu=sparclite + vendor=wrs + os=vxworks ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + tower | tower-32) + cpu=m68k + vendor=ncr ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` + vpp*|vx|vx-*) + cpu=f301 + vendor=fujitsu ;; - pentium4-*) - basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` + w65) + cpu=w65 + vendor=wdc ;; - pn) - basic_machine=pn-gould + w89k-*) + cpu=hppa1.1 + vendor=winbond + os=proelf ;; - power) basic_machine=power-ibm + none) + cpu=none + vendor=none ;; - ppc | ppcbe) basic_machine=powerpc-unknown + leon|leon[3-9]) + cpu=sparc + vendor=$basic_machine ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` + leon-*|leon[3-9]-*) + cpu=sparc + vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; - ppcle | powerpclittle) - basic_machine=powerpcle-unknown + + *-*) + IFS="-" read -r cpu vendor <&2 - exit 1 + # Recognize the cannonical CPU types that are allowed with any + # company name. + case $cpu in + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | abacus \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ + | alphapca5[67] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[lb]e | arme[lb] | armv* \ + | avr | avr32 \ + | asmjs \ + | ba \ + | be32 | be64 \ + | bfin | bs2000 \ + | c[123]* | c30 | [cjt]90 | c4x \ + | c8051 | clipper | craynv | csky | cydra \ + | d10v | d30v | dlx | dsp16xx \ + | e2k | elxsi | epiphany \ + | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ + | h8300 | h8500 \ + | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i*86 | i860 | i960 | ia16 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle \ + | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \ + | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \ + | m88110 | m88k | maxq | mb | mcore | mep | metag \ + | microblaze | microblazeel \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mmix \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nfp \ + | nios | nios2 | nios2eb | nios2el \ + | none | np1 | ns16k | ns32k \ + | open8 \ + | or1k* \ + | or32 \ + | orion \ + | pdp10 | pdp11 | pj | pjl | pn | power \ + | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ + | pru \ + | pyramid \ + | riscv | riscv32 | riscv64 \ + | rl78 | romp | rs6000 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ + | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ + | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ + | spu \ + | tahoe \ + | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ + | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ + | vax \ + | visium \ + | wasm32 \ + | we32k \ + | x86 | x86_64 | xc16x | xgate | xps100 \ + | xstormy16 | xtensa* \ + | ymp \ + | z8k | z80) + ;; + + *) + echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2 + exit 1 + ;; + esac ;; esac # Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` +case $vendor in + digital*) + vendor=dec ;; - *-commodore*) - basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` + commodore*) + vendor=cbm ;; *) ;; @@ -1365,200 +1275,240 @@ case $os in # First match some system type aliases that might get confused # with valid system types. - # -solaris* is a basic system type, with this one exception. - -auroraux) - os=-auroraux + # solaris* is a basic system type, with this one exception. + auroraux) + os=auroraux ;; - -solaris1 | -solaris1.*) + bluegene*) + os=cnk + ;; + solaris1 | solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; - -solaris) - os=-solaris2 + solaris) + os=solaris2 ;; - -unixware*) - os=-sysv4.2uw + unixware*) + os=sysv4.2uw ;; - -gnu/linux*) + gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) - -es1800*) - os=-ose + es1800*) + os=ose + ;; + # Some version numbers need modification + chorusos*) + os=chorusos + ;; + isc) + os=isc2.2 + ;; + sco6) + os=sco5v6 + ;; + sco5) + os=sco3.2v5 + ;; + sco4) + os=sco3.2v4 + ;; + sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + ;; + sco3.2v[4-9]* | sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + ;; + scout) + # Don't match below + ;; + sco*) + os=sco3.2v2 + ;; + psos*) + os=psos ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* | -cloudabi* | -sortix* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \ - | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ - | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ - | -midnightbsd*) + # sysv* is not here because it comes later, after sysvr4. + gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ + | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\ + | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ + | sym* | kopensolaris* | plan9* \ + | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ + | aos* | aros* | cloudabi* | sortix* \ + | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ + | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ + | knetbsd* | mirbsd* | netbsd* \ + | bitrig* | openbsd* | solidbsd* | libertybsd* \ + | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \ + | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ + | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ + | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \ + | chorusrdb* | cegcc* | glidix* \ + | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ + | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \ + | linux-newlib* | linux-musl* | linux-uclibc* \ + | uxpv* | beos* | mpeix* | udk* | moxiebox* \ + | interix* | uwin* | mks* | rhapsody* | darwin* \ + | openstep* | oskit* | conix* | pw32* | nonstopux* \ + | storm-chaos* | tops10* | tenex* | tops20* | its* \ + | os2* | vos* | palmos* | uclinux* | nucleus* \ + | morphos* | superux* | rtmk* | windiss* \ + | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ + | skyos* | haiku* | rdos* | toppers* | drops* | es* \ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) + qnx*) + case $cpu in + x86 | i*86) ;; *) - os=-nto$os + os=nto-$os ;; esac ;; - -nto-qnx*) + hiux*) + os=hiuxwe2 ;; - -nto*) + nto-qnx*) + ;; + nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; - -sim | -xray | -os68k* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + sim | xray | os68k* | v88r* \ + | windows* | osx | abug | netware* | os9* \ + | macos* | mpw* | magic* | mmixware* | mon960* | lnews*) + ;; + linux-dietlibc) + os=linux-dietlibc + ;; + linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; - -mac*) + lynx*178) + os=lynxos178 + ;; + lynx*5) + os=lynxos5 + ;; + lynx*) + os=lynxos + ;; + mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; - -linux-dietlibc) - os=-linux-dietlibc + opened*) + os=openedition ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` + os400*) + os=os400 ;; - -sunos5*) + sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; - -sunos6*) + sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; - -opened*) - os=-openedition + wince*) + os=wince ;; - -os400*) - os=-os400 + utek*) + os=bsd ;; - -wince*) - os=-wince + dynix*) + os=bsd ;; - -utek*) - os=-bsd + acis*) + os=aos ;; - -dynix*) - os=-bsd + atheos*) + os=atheos ;; - -acis*) - os=-aos + syllable*) + os=syllable ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd + 386bsd) + os=bsd ;; - -ctix* | -uts*) - os=-sysv + ctix* | uts*) + os=sysv ;; - -nova*) - os=-rtmk-nova + nova*) + os=rtmk-nova ;; - -ns2) - os=-nextstep2 + ns2) + os=nextstep2 ;; - -nsk*) - os=-nsk + nsk*) + os=nsk ;; # Preserve the version number of sinix5. - -sinix5.*) + sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; - -sinix*) - os=-sysv4 + sinix*) + os=sysv4 ;; - -tpf*) - os=-tpf + tpf*) + os=tpf ;; - -triton*) - os=-sysv3 + triton*) + os=sysv3 ;; - -oss*) - os=-sysv3 + oss*) + os=sysv3 ;; - -svr4*) - os=-sysv4 + svr4*) + os=sysv4 ;; - -svr3) - os=-sysv3 + svr3) + os=sysv3 ;; - -sysvr4) - os=-sysv4 + sysvr4) + os=sysv4 ;; - # This must come after -sysvr4. - -sysv*) + # This must come after sysvr4. + sysv*) ;; - -ose*) - os=-ose + ose*) + os=ose ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) + os=mint ;; - -zvmoe) - os=-zvmoe + zvmoe) + os=zvmoe ;; - -dicos*) - os=-dicos + dicos*) + os=dicos ;; - -pikeos*) + pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. - case $basic_machine in + case $cpu in arm*) - os=-eabi + os=eabi ;; *) - os=-elf + os=elf ;; esac ;; - -nacl*) + nacl*) ;; - -ios) + ios) ;; - -none) + none) ;; - -*-eabi) - case $basic_machine in - arm*) - ;; - esac + *-eabi) ;; *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; @@ -1575,254 +1525,261 @@ # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. -case $basic_machine in +case $cpu-$vendor in score-*) - os=-elf + os=elf ;; spu-*) - os=-elf + os=elf ;; *-acorn) - os=-riscix1.2 + os=riscix1.2 ;; arm*-rebel) - os=-linux + os=linux ;; arm*-semi) - os=-aout + os=aout ;; c4x-* | tic4x-*) - os=-coff + os=coff ;; c8051-*) - os=-elf + os=elf + ;; + clipper-intergraph) + os=clix ;; hexagon-*) - os=-elf + os=elf ;; tic54x-*) - os=-coff + os=coff ;; tic55x-*) - os=-coff + os=coff ;; tic6x-*) - os=-coff + os=coff ;; # This must come before the *-dec entry. pdp10-*) - os=-tops20 + os=tops20 ;; pdp11-*) - os=-none + os=none ;; *-dec | vax-*) - os=-ultrix4.2 + os=ultrix4.2 ;; m68*-apollo) - os=-domain + os=domain ;; i386-sun) - os=-sunos4.0.2 + os=sunos4.0.2 ;; m68000-sun) - os=-sunos3 + os=sunos3 ;; m68*-cisco) - os=-aout + os=aout ;; mep-*) - os=-elf + os=elf ;; mips*-cisco) - os=-elf + os=elf ;; mips*-*) - os=-elf + os=elf ;; or32-*) - os=-coff + os=coff ;; *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 + os=sysv3 ;; sparc-* | *-sun) - os=-sunos4.1.1 + os=sunos4.1.1 ;; pru-*) - os=-elf + os=elf ;; *-be) - os=-beos + os=beos ;; *-ibm) - os=-aix + os=aix ;; *-knuth) - os=-mmixware + os=mmixware ;; *-wec) - os=-proelf + os=proelf ;; *-winbond) - os=-proelf + os=proelf ;; *-oki) - os=-proelf + os=proelf ;; *-hp) - os=-hpux + os=hpux ;; *-hitachi) - os=-hiux + os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv + os=sysv ;; *-cbm) - os=-amigaos + os=amigaos ;; *-dg) - os=-dgux + os=dgux ;; *-dolphin) - os=-sysv3 + os=sysv3 ;; m68k-ccur) - os=-rtu + os=rtu ;; m88k-omron*) - os=-luna + os=luna ;; *-next) - os=-nextstep + os=nextstep ;; *-sequent) - os=-ptx + os=ptx ;; *-crds) - os=-unos + os=unos ;; *-ns) - os=-genix + os=genix ;; i370-*) - os=-mvs + os=mvs ;; *-gould) - os=-sysv + os=sysv ;; *-highlevel) - os=-bsd + os=bsd ;; *-encore) - os=-bsd + os=bsd ;; *-sgi) - os=-irix + os=irix ;; *-siemens) - os=-sysv4 + os=sysv4 ;; *-masscomp) - os=-rtu + os=rtu ;; f30[01]-fujitsu | f700-fujitsu) - os=-uxpv + os=uxpv ;; *-rom68k) - os=-coff + os=coff ;; *-*bug) - os=-coff + os=coff ;; *-apple) - os=-macos + os=macos ;; *-atari*) - os=-mint + os=mint + ;; + *-wrs) + os=vxworks ;; *) - os=-none + os=none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) +case $vendor in + unknown) case $os in - -riscix*) + riscix*) vendor=acorn ;; - -sunos*) + sunos*) vendor=sun ;; - -cnk*|-aix*) + cnk*|-aix*) vendor=ibm ;; - -beos*) + beos*) vendor=be ;; - -hpux*) + hpux*) vendor=hp ;; - -mpeix*) + mpeix*) vendor=hp ;; - -hiux*) + hiux*) vendor=hitachi ;; - -unos*) + unos*) vendor=crds ;; - -dgux*) + dgux*) vendor=dg ;; - -luna*) + luna*) vendor=omron ;; - -genix*) + genix*) vendor=ns ;; - -mvs* | -opened*) + clix*) + vendor=intergraph + ;; + mvs* | opened*) vendor=ibm ;; - -os400*) + os400*) vendor=ibm ;; - -ptx*) + ptx*) vendor=sequent ;; - -tpf*) + tpf*) vendor=ibm ;; - -vxsim* | -vxworks* | -windiss*) + vxsim* | vxworks* | windiss*) vendor=wrs ;; - -aux*) + aux*) vendor=apple ;; - -hms*) + hms*) vendor=hitachi ;; - -mpw* | -macos*) + mpw* | macos*) vendor=apple ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) vendor=atari ;; - -vos*) + vos*) vendor=stratus ;; esac - basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac -echo "$basic_machine$os" +echo "$cpu-$vendor-$os" exit # Local variables: diff -Nru alsa-utils-1.2.2/configure alsa-utils-1.2.6/configure --- alsa-utils-1.2.2/configure 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/configure 2021-12-06 11:44:46.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for alsa-utils 1.2.2. +# Generated by GNU Autoconf 2.69 for alsa-utils 1.2.6. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='alsa-utils' PACKAGE_TARNAME='alsa-utils' -PACKAGE_VERSION='1.2.2' -PACKAGE_STRING='alsa-utils 1.2.2' +PACKAGE_VERSION='1.2.6' +PACKAGE_STRING='alsa-utils 1.2.6' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -730,11 +730,11 @@ CFLAGS CC XGETTEXT_EXTRA_OPTIONS +MSGMERGE_FOR_MSGFMT_OPTION MSGMERGE XGETTEXT_015 XGETTEXT GMSGFMT_015 -MSGFMT_015 GMSGFMT MSGFMT GETTEXT_MACRO_VERSION @@ -789,6 +789,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -898,6 +899,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1150,6 +1152,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1287,7 +1298,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1400,7 +1411,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures alsa-utils 1.2.2 to adapt to many kinds of systems. +\`configure' configures alsa-utils 1.2.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1440,6 +1451,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1470,7 +1482,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of alsa-utils 1.2.2:";; + short | recursive ) echo "Configuration of alsa-utils 1.2.6:";; esac cat <<\_ACEOF @@ -1622,7 +1634,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -alsa-utils configure 1.2.2 +alsa-utils configure 1.2.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1987,7 +1999,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by alsa-utils $as_me 1.2.2, which was +It was created by alsa-utils $as_me 1.2.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2853,7 +2865,7 @@ # Define the identity of the package. PACKAGE='alsa-utils' - VERSION='1.2.2' + VERSION='1.2.6' cat >>confdefs.h <<_ACEOF @@ -3056,7 +3068,7 @@ - GETTEXT_MACRO_VERSION=0.19 + GETTEXT_MACRO_VERSION=0.20 @@ -3171,12 +3183,7 @@ - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac - - case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in + case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; esac @@ -3328,7 +3335,15 @@ fi - test -n "$localedir" || localedir='${datadir}/locale' + if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' + else + if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' + else + MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' + fi + fi test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= @@ -4465,6 +4480,7 @@ + # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes @@ -4485,38 +4501,12 @@ } fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 +$as_echo_n "checking for ld... " >&6; } +elif test "$GCC" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` - while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } @@ -4524,44 +4514,129 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if ${acl_cv_path_LD+:} false; then : +if test -n "$LD"; then + # Let the user override the test with a path. + : +else + if ${acl_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else - if test -z "$LD"; then - acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$acl_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 &5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; esac fi - done - IFS="$acl_save_ifs" + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + # The compiler produces 64-bit code. Add option '-b64' so that the + # linker groks 64-bit object files. + case "$acl_cv_path_LD " in + *" -b64 "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; + esac + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + sparc64-*-netbsd*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + else - acl_cv_path_LD="$LD" # Let the user override the test with a path. + # The compiler produces 32-bit code. Add option '-m elf32_sparc' + # so that the linker groks 32-bit object files. + case "$acl_cv_path_LD " in + *" -m elf32_sparc "*) ;; + *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; + esac + fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + esac + fi -LD="$acl_cv_path_LD" + LD="$acl_cv_path_LD" +fi if test -n "$LD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${acl_cv_prog_gnu_ld+:} false; then : @@ -4617,6 +4692,265 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 +$as_echo_n "checking 32-bit host C ABI... " >&6; } +if ${gl_cv_host_cpu_c_abi_32bit+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$gl_cv_host_cpu_c_abi"; then + case "$gl_cv_host_cpu_c_abi" in + i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) + gl_cv_host_cpu_c_abi_32bit=yes ;; + x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) + gl_cv_host_cpu_c_abi_32bit=no ;; + *) + gl_cv_host_cpu_c_abi_32bit=unknown ;; + esac + else + case "$host_cpu" in + + # CPUs that only support a 32-bit ABI. + arc \ + | bfin \ + | cris* \ + | csky \ + | epiphany \ + | ft32 \ + | h8300 \ + | m68k \ + | microblaze | microblazeel \ + | nds32 | nds32le | nds32be \ + | nios2 | nios2eb | nios2el \ + | or1k* \ + | or32 \ + | sh | sh1234 | sh1234elb \ + | tic6x \ + | xtensa* ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + # CPUs that only support a 64-bit ABI. + alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ + | mmix ) + gl_cv_host_cpu_c_abi_32bit=no + ;; + + i[34567]86 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) \ + && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef _ILP32 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=yes +else + gl_cv_host_cpu_c_abi_32bit=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi_32bit=yes + ;; + + riscv32 | riscv64 ) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_host_cpu_c_abi_32bit=no +else + gl_cv_host_cpu_c_abi_32bit=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ;; + + *) + gl_cv_host_cpu_c_abi_32bit=unknown + ;; + esac + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 +$as_echo "$gl_cv_host_cpu_c_abi_32bit" >&6; } + + HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4887,67 +5221,152 @@ - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -$as_echo_n "checking for 64-bit host... " >&6; } -if ${gl_cv_solaris_64bit+:} false; then : + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 +$as_echo_n "checking for ELF binary format... " >&6; } +if ${gl_cv_elf+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#ifdef _LP64 -sixtyfour bits -#endif +#ifdef __ELF__ + Extensible Linking Format + #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sixtyfour bits" >/dev/null 2>&1; then : - gl_cv_solaris_64bit=yes + $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : + gl_cv_elf=yes else - gl_cv_solaris_64bit=no + gl_cv_elf=no fi rm -f conftest* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 -$as_echo "$gl_cv_solaris_64bit" >&6; } - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 +$as_echo "$gl_cv_elf" >&6; } + if test $gl_cv_elf; then + # Extract the ELF class of a file (5th byte) in decimal. + # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + if od -A x < /dev/null >/dev/null 2>/dev/null; then + # Use POSIX od. + func_elfclass () + { + od -A n -t d1 -j 4 -N 1 + } + else + # Use BSD hexdump. + func_elfclass () + { + dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' + echo + } + fi + case $HOST_CPU_C_ABI_32BIT in + yes) + # 32-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + } + ;; + no) + # 64-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + } + ;; + *) + # Unknown. + acl_is_expected_elfclass () + { + : + } + ;; + esac + else + acl_is_expected_elfclass () + { + : + } + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 +$as_echo_n "checking for the common suffixes of directories in the library search path... " >&6; } +if ${acl_cv_libdirstems+:} false; then : + $as_echo_n "(cached) " >&6 +else + acl_libdirstem=lib + acl_libdirstem2= + acl_libdirstem3= + case "$host_os" in + solaris*) + if test $HOST_CPU_C_ABI_32BIT = no; then + acl_libdirstem2=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem3=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; + esac + fi + ;; + *) + searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test $HOST_CPU_C_ABI_32BIT != no; then + # 32-bit or unknown ABI. + if test -d /usr/lib32; then + acl_libdirstem2=lib32 + fi + fi + if test $HOST_CPU_C_ABI_32BIT != yes; then + # 64-bit or unknown ABI. + if test -d /usr/lib64; then + acl_libdirstem3=lib64 + fi + fi + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; + */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib32 ) acl_libdirstem2=lib32 ;; + */lib64 ) acl_libdirstem3=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + if test $HOST_CPU_C_ABI_32BIT = yes; then + # 32-bit ABI. + acl_libdirstem3= + fi + if test $HOST_CPU_C_ABI_32BIT = no; then + # 64-bit ABI. + acl_libdirstem2= + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 +$as_echo "$acl_cv_libdirstems" >&6; } + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` + acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` @@ -4968,6 +5387,8 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -4988,6 +5409,8 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -4995,15 +5418,19 @@ else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" fi fi fi + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi LIBICONV= LTLIBICONV= INCICONV= @@ -5049,45 +5476,51 @@ shrext= fi if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" - found_so="$dir/$f" - break + found_a="$dir/$libname.$acl_libext" fi - done + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi fi fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi + done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do @@ -5104,7 +5537,7 @@ -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else @@ -5114,14 +5547,14 @@ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do - if test -f "$dir/$f"; then + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break @@ -5131,7 +5564,7 @@ fi fi if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi @@ -5153,7 +5586,8 @@ if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= @@ -5232,6 +5666,13 @@ fi additional_includedir="$basedir/include" ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = 'iconv'; then + LIBICONV_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then @@ -5277,12 +5718,14 @@ for dep in $dependency_libs; do case "$dep" in -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -5301,14 +5744,14 @@ exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir" fi fi haveit= @@ -5322,14 +5765,14 @@ exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir" fi fi fi @@ -5436,8 +5879,6 @@ - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : @@ -5472,9 +5913,9 @@ $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 -$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } -if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 +$as_echo_n "checking for CFLocaleCopyPreferredLanguages... " >&6; } +if ${gt_cv_func_CFLocaleCopyPreferredLanguages+:} false; then : $as_echo_n "(cached) " >&6 else gt_save_LIBS="$LIBS" @@ -5485,29 +5926,30 @@ int main () { -CFLocaleCopyCurrent(); +CFLocaleCopyPreferredLanguages(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - gt_cv_func_CFLocaleCopyCurrent=yes + gt_cv_func_CFLocaleCopyPreferredLanguages=yes else - gt_cv_func_CFLocaleCopyCurrent=no + gt_cv_func_CFLocaleCopyPreferredLanguages=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$gt_save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 -$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 +$as_echo "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then -$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h +$as_echo "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h fi INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" fi @@ -5795,15 +6237,27 @@ #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ - if (/* Try standardized names. */ - iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) - /* Try IRIX, OSF/1 names. */ - && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) - /* Try AIX names. */ - && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) - /* Try HP-UX names. */ - && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - result |= 16; + { + /* Try standardized names. */ + iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); + /* Try IRIX, OSF/1 names. */ + iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); + /* Try AIX names. */ + iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); + /* Try HP-UX names. */ + iconv_t cd4 = iconv_open ("utf8", "eucJP"); + if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) + && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) + result |= 16; + if (cd1 != (iconv_t)(-1)) + iconv_close (cd1); + if (cd2 != (iconv_t)(-1)) + iconv_close (cd2); + if (cd3 != (iconv_t)(-1)) + iconv_close (cd3); + if (cd4 != (iconv_t)(-1)) + iconv_close (cd4); + } return result; ; @@ -5856,7 +6310,6 @@ - use_additional=yes acl_save_prefix="$prefix" @@ -5866,6 +6319,8 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -5886,6 +6341,8 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" @@ -5893,15 +6350,19 @@ else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" fi fi fi + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi LIBINTL= LTLIBINTL= INCINTL= @@ -5947,45 +6408,51 @@ shrext= fi if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" - found_so="$dir/$f" - break + found_a="$dir/$libname.$acl_libext" fi - done + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi fi fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi + done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBINTL; do @@ -6002,7 +6469,7 @@ -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else @@ -6012,14 +6479,14 @@ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do - if test -f "$dir/$f"; then + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break @@ -6029,7 +6496,7 @@ fi fi if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi @@ -6051,7 +6518,8 @@ if test "X$found_so" != "X"; then if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" else haveit= @@ -6130,6 +6598,13 @@ fi additional_includedir="$basedir/include" ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = 'intl'; then + LIBINTL_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then @@ -6175,12 +6650,14 @@ for dep in $dependency_libs; do case "$dep" in -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -6199,14 +6676,14 @@ exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir" fi fi haveit= @@ -6220,14 +6697,14 @@ exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir" fi fi fi @@ -6310,7 +6787,6 @@ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 $as_echo_n "checking for GNU gettext in libintl... " >&6; } if eval \${$gt_func_gnugettext_libintl+:} false; then : @@ -7584,7 +8060,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking required libasound headers version" >&5 $as_echo_n "checking required libasound headers version... " >&6; } -min_alsa_version=1.0.27 +min_alsa_version=1.2.5 no_alsa="" alsa_min_major_version=`echo $min_alsa_version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` @@ -7595,7 +8071,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $alsa_min_major_version.$alsa_min_minor_version.$alsa_min_micro_version" >&5 $as_echo "$alsa_min_major_version.$alsa_min_minor_version.$alsa_min_micro_version" >&6; } - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7667,7 +8142,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -7717,7 +8191,6 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu - fi if test "x$enable_alsatest" = "xyes"; then @@ -8163,6 +8636,20 @@ fi +# Test programs for axfer use shm by memfd_create(2). If not supported, open(2) is used alternatively. +ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create" +if test "x$ac_cv_func_memfd_create" = xyes; then : + have_memfd_create="yes" +else + have_memfd_create="no" +fi + +if test x$have_memfd_create = xyes; then : + +$as_echo "#define HAVE_MEMFD_CREATE 1" >>confdefs.h + +fi + if test "$have_pcm" = "yes"; then HAVE_PCM_TRUE= HAVE_PCM_FALSE='#' @@ -10896,7 +11383,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by alsa-utils $as_me 1.2.2, which was +This file was extended by alsa-utils $as_me 1.2.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10962,7 +11449,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -alsa-utils config.status 1.2.2 +alsa-utils config.status 1.2.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -11082,9 +11569,8 @@ # INIT-COMMANDS # # Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" @@ -11765,14 +12251,11 @@ if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) @@ -11924,7 +12407,9 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. Try re-running configure with the + for automatic dependency tracking. If GNU make was not used, consider + re-running the configure script with MAKE=\"gmake\" (or whatever is + necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } diff -Nru alsa-utils-1.2.2/configure.ac alsa-utils-1.2.6/configure.ac --- alsa-utils-1.2.2/configure.ac 2020-02-19 12:07:12.000000000 +0000 +++ alsa-utils-1.2.6/configure.ac 2021-12-06 11:44:42.000000000 +0000 @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(alsa-utils, 1.2.2) +AC_INIT(alsa-utils, 1.2.6) AC_CONFIG_SRCDIR([aplay/aplay.c]) AC_PREFIX_DEFAULT(/usr) AM_INIT_AUTOMAKE @@ -19,7 +19,7 @@ AC_PROG_LN_S AC_PROG_SED PKG_PROG_PKG_CONFIG -AM_PATH_ALSA(1.0.27) +AM_PATH_ALSA(1.2.5) if test "x$enable_alsatest" = "xyes"; then AC_CHECK_FUNC([snd_ctl_elem_add_enumerated], , [AC_ERROR([No user enum control support in alsa-lib])]) @@ -62,6 +62,11 @@ AS_IF([test x"$have_ffado" = xyes], [AC_DEFINE([WITH_FFADO], [1], [Define if FFADO library is available])]) +# Test programs for axfer use shm by memfd_create(2). If not supported, open(2) is used alternatively. +AC_CHECK_FUNC([memfd_create], [have_memfd_create="yes"], [have_memfd_create="no"]) +AS_IF([test x$have_memfd_create = xyes], + [AC_DEFINE([HAVE_MEMFD_CREATE], [1], [Define if Linux kernel supports memfd_create system call])]) + AM_CONDITIONAL(HAVE_PCM, test "$have_pcm" = "yes") AM_CONDITIONAL(HAVE_MIXER, test "$have_mixer" = "yes") AM_CONDITIONAL(HAVE_RAWMIDI, test "$have_rawmidi" = "yes") diff -Nru alsa-utils-1.2.2/debian/changelog alsa-utils-1.2.6/debian/changelog --- alsa-utils-1.2.2/debian/changelog 2021-06-23 22:53:42.000000000 +0000 +++ alsa-utils-1.2.6/debian/changelog 2024-04-17 19:53:31.000000000 +0000 @@ -1,58 +1,73 @@ -alsa-utils (1.2.2-1ubuntu2.1~18.04.sav0) bionic; urgency=medium +alsa-utils (1.2.6-1ubuntu1~18.04.sav0) bionic; urgency=low * Backport to Bionic * debian/control: Set debhelper-compat (= 11) BD - -- Rob Savoury Wed, 23 Jun 2021 15:53:42 -0700 + -- Rob Savoury Wed, 17 Apr 2024 12:53:31 -0700 -alsa-utils (1.2.2-1ubuntu2.1) focal; urgency=medium +alsa-utils (1.2.6-1ubuntu1) jammy; urgency=low - * d/p/0013-aplay-try-to-use-16-bit-format-to-increase-capture-q.patch - - aplay: try to use 16-bit format to increase capture quality - (LP: #1923841) + * Merge from Debian unstable. Remaining changes: + - add 4 patches unset_pulse_internal.patch, + add_extra_volume_defaults.patch, vmware_audio_volume.patch, + create_run_alsa.patch - -- Kai-Heng Feng Wed, 14 Apr 2021 21:38:30 +0800 + -- Hui Wang Wed, 12 Jan 2022 15:13:36 +0000 -alsa-utils (1.2.2-1ubuntu2) focal; urgency=medium +alsa-utils (1.2.6-1) unstable; urgency=medium - * d/p/0001-alsactl-init-iterate-through-all-cards-for-the-initi.patch - * d/p/0002-alsactl-add-initial-support-for-UCM-init.patch - * d/p/0003-alsactl-redirect-alsa-lib-errors.patch - * d/p/0004-alsactl-add-D-argument-to-execute-also-the-UCM-defau.patch - * d/p/0005-alsactl-use-the-right-priority-for-syslog-messages.patch - * d/p/0006-alsactl-allow-to-compile-alsactl-without-UCM-support.patch - * d/p/0007-alsactl-ucm-rename-_once-command-to-_boot-command.patch - * d/p/0008-alsaucm-remove-custom-rules-alsactl-is-UCM-aware-now.patch - Make alsactl support _boot section defined in the ucm, then the - mixer values defined in the _boot section for Dell soundwire audio - machines could be executed at the first booting. (LP: #1899745) + * New upstream release. + * Import upstream signing key and configure watch file to check for + sigs. + * Update copyright years. - -- Hui Wang Fri, 16 Oct 2020 17:50:30 +0200 + -- Jordi Mallach Wed, 12 Jan 2022 10:42:19 +0100 -alsa-utils (1.2.2-1ubuntu1) focal; urgency=medium +alsa-utils (1.2.5.1-1ubuntu1) jammy; urgency=low - * Resynchronize on Debian + * Merge from Debian unstable. Remaining changes: + - Pick the change of 1.2.4-1ubuntu1 and minor changes on it, + drop 2 patches alsa-info_call_home.patch and + udev_test_alsactl.patch since unstable already has them, + and refresh the patch unset_pulse_internal.patch. - -- Sebastien Bacher Wed, 04 Mar 2020 17:46:27 +0100 + -- Hui Wang Sat, 09 Oct 2021 17:14:15 +0000 -alsa-utils (1.2.2-1) unstable; urgency=medium +alsa-utils (1.2.5.1-1) unstable; urgency=low + [ Jordi Mallach ] * New upstream release. - * Update Standards-Version to 4.5.0. - * Demote dialog from Depends to Suggests (since we don't ship alsaconf, - it's only used by alsa-info), and drop the whiptail alternative - (closes: #931293). - * Install alsa-info.sh.1 manpage as alsa-info.8. - * Patch alsa-info.sh.1 to fix references to the command without a suffix, - and move it to section 8 (closes: #921595). - * Drop do-not-check-for-sys-kernel-uevent_helper.patch, fixed upstream. - * Refresh all patches. - * Require libatopology-dev (>= 1.2.2), as configure.ac checks for - the availability of snd_tplg_save. + * Add additional upstream metadata entries. + * Refresh patches. + * Update to Standards-Version 4.6.0, no changes needed. - -- Jordi Mallach Sat, 29 Feb 2020 18:08:26 +0100 + [ Debian Janitor ] + * Set upstream metadata fields: Repository. + * Fix day-of-week for changelog entry 1.0.20-1. + + -- Jordi Mallach Thu, 26 Aug 2021 17:54:15 +0200 + +alsa-utils (1.2.4-1ubuntu4) impish; urgency=medium + + * No-change rebuild to build packages with zstd compression. + + -- Matthias Klose Thu, 07 Oct 2021 12:09:19 +0200 -alsa-utils (1.2.1-1ubuntu1) focal; urgency=medium +alsa-utils (1.2.4-1ubuntu3) hirsute; urgency=medium + + * d/p/0013-aplay-try-to-use-16-bit-format-to-increase-capture-q.patch + - aplay: try to use 16-bit format to increase capture quality + (LP: #1923841) + + -- Kai-Heng Feng Wed, 14 Apr 2021 16:27:22 +0800 + +alsa-utils (1.2.4-1ubuntu2) hirsute; urgency=medium + + * No-change rebuild to drop the udeb package. + + -- Matthias Klose Mon, 22 Feb 2021 10:30:00 +0100 + +alsa-utils (1.2.4-1ubuntu1) hirsute; urgency=medium * Resynchronize on Debian, remaining changes: - Move init script volume settings to new alsactl database: @@ -76,7 +91,50 @@ - Put the daemon file in /var/lib/alsa - Create /run/alsa directory so that systemd services don't fail - -- dann frazier Wed, 29 Jan 2020 14:58:17 -0700 + -- Sebastien Bacher Mon, 11 Jan 2021 16:38:25 +0100 + +alsa-utils (1.2.4-1) unstable; urgency=medium + + * New upstream release. + * Update Standards-Version to 4.5.1. + + -- Jordi Mallach Mon, 07 Dec 2020 22:46:08 +0100 + +alsa-utils (1.2.3-1) unstable; urgency=medium + + * New upstream release. + * Update debhelper compat to v13. + + -- Jordi Mallach Thu, 20 Aug 2020 21:03:08 +0200 + +alsa-utils (1.2.2-2) unstable; urgency=medium + + [ Sandro Tosi ] + * Switch b-d from python-docutils to python3-docutils; Closes: #942905 + + [ Jordi Mallach ] + * Avoid alsa-info calling home to check for updates unless explicitly + invoked with --update (closes: #962073). Thanks to Christoph Berg for + reporting this. + + -- Jordi Mallach Tue, 30 Jun 2020 07:21:29 +0200 + +alsa-utils (1.2.2-1) unstable; urgency=medium + + * New upstream release. + * Update Standards-Version to 4.5.0. + * Demote dialog from Depends to Suggests (since we don't ship alsaconf, + it's only used by alsa-info), and drop the whiptail alternative + (closes: #931293). + * Install alsa-info.sh.1 manpage as alsa-info.8. + * Patch alsa-info.sh.1 to fix references to the command without a suffix, + and move it to section 8 (closes: #921595). + * Drop do-not-check-for-sys-kernel-uevent_helper.patch, fixed upstream. + * Refresh all patches. + * Require libatopology-dev (>= 1.2.2), as configure.ac checks for + the availability of snd_tplg_save. + + -- Jordi Mallach Sat, 29 Feb 2020 18:08:26 +0100 alsa-utils (1.2.1-1) unstable; urgency=medium @@ -99,12 +157,6 @@ -- Jordi Mallach Tue, 05 Nov 2019 16:48:13 +0100 -alsa-utils (1.1.9-0ubuntu1) eoan; urgency=medium - - * New upstream version - - -- Sebastien Bacher Tue, 13 Aug 2019 20:29:26 +0200 - alsa-utils (1.1.8-3) unstable; urgency=medium * Don't run alsa services paralell @@ -115,34 +167,6 @@ -- Elimar Riesebieter Sun, 14 Apr 2019 05:25:25 +0200 -alsa-utils (1.1.8-2ubuntu1) eoan; urgency=medium - - * Resynchronize on Debian (lp: #1787359), remaining changes: - - Move init script volume settings to new alsactl database: - + Set sane level for 'Speaker' and 'Headphone', needed for Dell Mini 9 - and Dell E series - + ute PC Beep on hda cards that support it during initial volume setup - + Mute *Analog/Digital Control for Creative cards by default - + Default Digital Input Source to be Digital Mic 1 so that users - with digital mic will be able to use it out of the box - + Mute "IEC958 Optical Raw" by default - + Set sane level for headphone 1 for Dell Studio XPS with 2.6.30 - + Prefer built-in digital mics on newer Dells - + Unmute 'Line HP Swap' for Dove boards - + Set reasonable volume levels for VMWare guests using snd.ens1371 - - debian/README.init.cs4236: Include in /usr/share/doc/alsa-utils so that - users of snd-cs4236 (e.g., ThinkPad 600) can have audible sound - - debian/patches/unset_pulse_internal.patch: We don't want alsamixer to - show the pulse mixer by default, since it can be controlled from - pulseaudio itself - - Add udev rule to apply UCM profiles for panda and equivalent hardware - - Add Vcs-Bzr field - - Put the daemon file in /var/lib/alsa - - Create /run/alsa directory so that systemd services don't fail - * Revert the previous change from Debian (done in salsa as well now) - - -- Sebastien Bacher Wed, 20 Feb 2019 16:23:24 +0100 - alsa-utils (1.1.8-2) unstable; urgency=medium * Introduce Fix-alsactl-to-restore-config.patch. Don't rely on undocumented @@ -668,7 +692,7 @@ - move the modprobe.d files to the new .conf suffix. * Don't use rm -v, no need to be verbose. - -- Jordi Mallach Tue, 25 May 2009 21:25:58 +0200 + -- Jordi Mallach Mon, 25 May 2009 21:25:58 +0200 alsa-utils (1.0.19-2) unstable; urgency=low @@ -1893,3 +1917,4 @@ * Initial release -- Wichert Akkerman Sun, 7 Jun 1998 16:53:01 +0200 + diff -Nru alsa-utils-1.2.2/debian/control alsa-utils-1.2.6/debian/control --- alsa-utils-1.2.2/debian/control 2021-06-23 22:53:42.000000000 +0000 +++ alsa-utils-1.2.6/debian/control 2024-04-17 19:53:31.000000000 +0000 @@ -13,10 +13,10 @@ libncursesw5-dev, libsamplerate-dev, pkg-config, - python-docutils, + python3-docutils, systemd, xmlto -Standards-Version: 4.5.0 +Standards-Version: 4.6.0 Homepage: https://www.alsa-project.org/ Vcs-Git: https://salsa.debian.org/alsa-team/alsa-utils.git Vcs-Browser: https://salsa.debian.org/alsa-team/alsa-utils diff -Nru alsa-utils-1.2.2/debian/copyright alsa-utils-1.2.6/debian/copyright --- alsa-utils-1.2.2/debian/copyright 2020-01-16 14:00:32.000000000 +0000 +++ alsa-utils-1.2.6/debian/copyright 2022-01-12 15:13:34.000000000 +0000 @@ -8,17 +8,17 @@ the pkg-alsa project at alioth.debian.org. Files: * -Copyright: 1998-2016 Jarsolav Kysela and others +Copyright: 1998-2022 Jarsolav Kysela and others License: GPL-2 Files: alsaucm/* -Copyright: 1998-2016 Jarsolav Kysela and others +Copyright: 1998-2022 Jarsolav Kysela and others License: LGPL-2+ Files: debian/* Copyright: 1998-1999 Wichert Akkerman 1999-2002 Masato Taruishi - 2002-2016 Debian ALSA Maintainers + 2002-2022 Debian ALSA Maintainers License: GPL-2 License: GPL-2 diff -Nru alsa-utils-1.2.2/debian/patches/0001-alsactl-init-iterate-through-all-cards-for-the-initi.patch alsa-utils-1.2.6/debian/patches/0001-alsactl-init-iterate-through-all-cards-for-the-initi.patch --- alsa-utils-1.2.2/debian/patches/0001-alsactl-init-iterate-through-all-cards-for-the-initi.patch 2020-10-16 15:33:50.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/0001-alsactl-init-iterate-through-all-cards-for-the-initi.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,50 +0,0 @@ -From 0f8eb1677ff2975ac622db35c3667901d4f351fa Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 14 May 2020 18:14:31 +0200 -Subject: [PATCH 1/8] alsactl: init - iterate through all cards for the initial - settings - -The generic initialization code returns error code 99 (-99). Take -all those codes equal or above (bellow) this value as non-fatal. - -Signed-off-by: Jaroslav Kysela -(cherry picked from commit 598488c4af555c31c234ea2e88e52cb39a2c045a) -Signed-off-by: Hui Wang ---- - alsactl/init_parse.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/alsactl/init_parse.c b/alsactl/init_parse.c -index c048fd3..12bffa5 100644 ---- a/alsactl/init_parse.c -+++ b/alsactl/init_parse.c -@@ -1745,7 +1745,7 @@ static int parse(struct space *space, const char *filename) - int init(const char *filename, const char *cardname) - { - struct space *space; -- int err = 0, card, first; -+ int err = 0, lasterr = 0, card, first; - - sysfs_init(); - if (!cardname) { -@@ -1767,11 +1767,17 @@ int init(const char *filename, const char *cardname) - space->rootdir = new_root_dir(filename); - if (space->rootdir != NULL) - err = parse(space, filename); -+ if (err <= -99) { /* non-fatal errors */ -+ if (lasterr == 0) -+ lasterr = err; -+ err = 0; -+ } - free_space(space); - } - if (err < 0) - break; - } -+ err = lasterr; - } else { - card = snd_card_get_index(cardname); - if (card < 0) { --- -2.25.1 - diff -Nru alsa-utils-1.2.2/debian/patches/0002-alsactl-add-initial-support-for-UCM-init.patch alsa-utils-1.2.6/debian/patches/0002-alsactl-add-initial-support-for-UCM-init.patch --- alsa-utils-1.2.2/debian/patches/0002-alsactl-add-initial-support-for-UCM-init.patch 2020-10-16 15:33:50.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/0002-alsactl-add-initial-support-for-UCM-init.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,116 +0,0 @@ -From 13ea068eb744f17288900fce180a9ccd4e910c6b Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 14 May 2020 17:12:08 +0200 -Subject: [PATCH 2/8] alsactl: add initial support for UCM init - -Signed-off-by: Jaroslav Kysela -(cherry picked from commit 4bea8fe3a73cd2df8dcad1c8a14c35bab7b21073) -Signed-off-by: Hui Wang ---- - alsactl/Makefile.am | 4 ++-- - alsactl/alsactl.h | 1 + - alsactl/init_parse.c | 6 ++++++ - alsactl/init_ucm.c | 40 ++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 49 insertions(+), 2 deletions(-) - create mode 100644 alsactl/init_ucm.c - -diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am -index e9ab2eb..c1031ac 100644 ---- a/alsactl/Makefile.am -+++ b/alsactl/Makefile.am -@@ -9,8 +9,8 @@ EXTRA_DIST=alsactl.1 alsactl_init.xml - - AM_CFLAGS = -D_GNU_SOURCE - --alsactl_SOURCES=alsactl.c state.c lock.c utils.c init_parse.c daemon.c \ -- monitor.c -+alsactl_SOURCES=alsactl.c state.c lock.c utils.c init_parse.c init_ucm.c \ -+ daemon.c monitor.c - - alsactl_CFLAGS=$(AM_CFLAGS) -D__USE_GNU \ - -DSYS_ASOUNDRC=\"$(ASOUND_STATE_DIR)/asound.state\" \ -diff --git a/alsactl/alsactl.h b/alsactl/alsactl.h -index 69b539c..6e96e78 100644 ---- a/alsactl/alsactl.h -+++ b/alsactl/alsactl.h -@@ -25,6 +25,7 @@ void dbg_(const char *fcn, long line, const char *fmt, ...); - #endif - - int init(const char *file, const char *cardname); -+int init_ucm(int cardno); - int state_lock(const char *file, int timeout); - int state_unlock(int fd, const char *file); - int save_state(const char *file, const char *cardname); -diff --git a/alsactl/init_parse.c b/alsactl/init_parse.c -index 12bffa5..f176a7a 100644 ---- a/alsactl/init_parse.c -+++ b/alsactl/init_parse.c -@@ -1762,6 +1762,9 @@ int init(const char *filename, const char *cardname) - break; - } - first = 0; -+ err = init_ucm(card); -+ if (err == 0) -+ continue; - err = init_space(&space, card); - if (err == 0) { - space->rootdir = new_root_dir(filename); -@@ -1784,6 +1787,9 @@ int init(const char *filename, const char *cardname) - error("Cannot find soundcard '%s'...", cardname); - goto error; - } -+ err = init_ucm(card); -+ if (err == 0) -+ return 0; - memset(&space, 0, sizeof(space)); - err = init_space(&space, card); - if (err == 0) { -diff --git a/alsactl/init_ucm.c b/alsactl/init_ucm.c -new file mode 100644 -index 0000000..833a1f9 ---- /dev/null -+++ b/alsactl/init_ucm.c -@@ -0,0 +1,40 @@ -+/* -+ * Advanced Linux Sound Architecture Control Program - UCM Initialization -+ * Copyright (c) by Jaroslav Kysela -+ * -+ * -+ * 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 of the License, 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, write to the Free Software -+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+ -+/* -+ * Keep it as simple as possible. Execute commands from the SectionOnce only. -+ */ -+int init_ucm(int cardno) -+{ -+ snd_use_case_mgr_t *uc_mgr; -+ char id[32]; -+ int err; -+ -+ snprintf(id, sizeof(id), "hw:%d", cardno); -+ err = snd_use_case_mgr_open(&uc_mgr, id); -+ if (err < 0) -+ return err; -+ err = snd_use_case_set(uc_mgr, "_once", NULL); -+ snd_use_case_mgr_close(uc_mgr); -+ return err; -+} --- -2.25.1 - diff -Nru alsa-utils-1.2.2/debian/patches/0003-alsactl-redirect-alsa-lib-errors.patch alsa-utils-1.2.6/debian/patches/0003-alsactl-redirect-alsa-lib-errors.patch --- alsa-utils-1.2.2/debian/patches/0003-alsactl-redirect-alsa-lib-errors.patch 2020-10-16 15:34:00.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/0003-alsactl-redirect-alsa-lib-errors.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -From 8c733bfaadd1e04b97b836d7ea824080ba5269ad Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 14 May 2020 19:09:45 +0200 -Subject: [PATCH 3/8] alsactl: redirect alsa-lib errors - -Signed-off-by: Jaroslav Kysela -(cherry picked from commit 8fb4016a175f5e83c6ec363528c9ba6332a262ef) -Signed-off-by: Hui Wang ---- - alsactl/alsactl.c | 2 ++ - alsactl/alsactl.h | 1 + - alsactl/utils.c | 16 ++++++++++++++++ - 3 files changed, 19 insertions(+) - -Index: alsa-utils-1.2.2/alsactl/alsactl.c -=================================================================== ---- alsa-utils-1.2.2.orig/alsactl/alsactl.c -+++ alsa-utils-1.2.2/alsactl/alsactl.c -@@ -356,6 +356,8 @@ int main(int argc, char *argv[]) - syslog(LOG_INFO, "alsactl " SND_UTIL_VERSION_STR " daemon started"); - } - -+ snd_lib_error_set_handler(error_handler); -+ - if (!strcmp(cmd, "init")) { - res = init(initfile, cardname); - snd_config_update_free_global(); -Index: alsa-utils-1.2.2/alsactl/alsactl.h -=================================================================== ---- alsa-utils-1.2.2.orig/alsactl/alsactl.h -+++ alsa-utils-1.2.2/alsactl/alsactl.h -@@ -11,6 +11,7 @@ void info_(const char *fcn, long line, c - void error_(const char *fcn, long line, const char *fmt, ...); - void cerror_(const char *fcn, long line, int cond, const char *fmt, ...); - void dbg_(const char *fcn, long line, const char *fmt, ...); -+void error_handler(const char *file, int line, const char *function, int err, const char *fmt, ...); - - #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) - #define info(...) do { info_(__func__, __LINE__, __VA_ARGS__); } while (0) -Index: alsa-utils-1.2.2/alsactl/utils.c -=================================================================== ---- alsa-utils-1.2.2.orig/alsactl/utils.c -+++ alsa-utils-1.2.2/alsactl/utils.c -@@ -177,3 +177,19 @@ void dbg_(const char *fcn, long line, co - } - va_end(ap); - } -+ -+void error_handler(const char *file, int line, const char *function, int err, const char *fmt, ...) -+{ -+ char buf[2048]; -+ va_list arg; -+ -+ va_start(arg, fmt); -+ vsnprintf(buf, sizeof(buf), fmt, arg); -+ va_end(arg); -+ if (use_syslog) -+ syslog(LOG_ERR, "alsa-lib %s:%i:(%s) %s%s%s\n", file, line, function, -+ buf, err ? ": " : "", err ? snd_strerror(err) : ""); -+ else -+ fprintf(stderr, "alsa-lib %s:%i:(%s) %s%s%s\n", file, line, function, -+ buf, err ? ": " : "", err ? snd_strerror(err) : ""); -+} diff -Nru alsa-utils-1.2.2/debian/patches/0004-alsactl-add-D-argument-to-execute-also-the-UCM-defau.patch alsa-utils-1.2.6/debian/patches/0004-alsactl-add-D-argument-to-execute-also-the-UCM-defau.patch --- alsa-utils-1.2.2/debian/patches/0004-alsactl-add-D-argument-to-execute-also-the-UCM-defau.patch 2020-10-16 15:34:03.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/0004-alsactl-add-D-argument-to-execute-also-the-UCM-defau.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,214 +0,0 @@ -From 516cfb74741a188806b5531a870fea8f389a6b18 Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 14 May 2020 19:34:18 +0200 -Subject: [PATCH 4/8] alsactl: add -D argument to execute also the UCM defaults - section - -Signed-off-by: Jaroslav Kysela -(cherry picked from commit b68e854d287e93602c3511fa501c2a4824d3b865) -Signed-off-by: Hui Wang ---- - alsactl/alsactl.1 | 5 +++++ - alsactl/alsactl.c | 9 +++++++-- - alsactl/alsactl.h | 10 ++++++---- - alsactl/init_parse.c | 6 +++--- - alsactl/init_ucm.c | 12 +++++++++++- - alsactl/state.c | 10 +++++----- - 6 files changed, 37 insertions(+), 15 deletions(-) - -Index: alsa-utils-1.2.2/alsactl/alsactl.1 -=================================================================== ---- alsa-utils-1.2.2.orig/alsactl/alsactl.1 -+++ alsa-utils-1.2.2/alsactl/alsactl.1 -@@ -142,6 +142,11 @@ Set the process priority (see 'man nice' - \fI\-c, \-\-sched-idle\fP - Set the process scheduling policy to idle (SCHED_IDLE). - -+.TP -+\fI\-D, \-\-ucm-defaults\fP -+Execute also the 'defaults' section from the UCM configuration. The standard -+behaviour is to execute only 'once' section. -+ - .SH FILES - \fI/var/lib/alsa/asound.state\fP (or whatever file you specify with the - \fB\-f\fP flag) is used to store current settings for your -Index: alsa-utils-1.2.2/alsactl/alsactl.c -=================================================================== ---- alsa-utils-1.2.2.orig/alsactl/alsactl.c -+++ alsa-utils-1.2.2/alsactl/alsactl.c -@@ -96,6 +96,7 @@ static struct arg args[] = { - { 's', "syslog", "use syslog for messages" }, - { INTARG | 'n', "nice", "set the process priority (see 'man nice')" }, - { 'c', "sched-idle", "set the process scheduling policy to idle (SCHED_IDLE)" }, -+{ 'D', "ucm-defaults", "execute also the UCM 'defaults' section" }, - { HEADER, NULL, "Available commands:" }, - { CARDCMD, "store", "save current driver setup for one or each soundcards" }, - { EMPCMD, NULL, " to configuration file" }, -@@ -193,6 +194,7 @@ int main(int argc, char *argv[]) - int daemoncmd = 0; - int use_nice = NO_NICE; - int sched_idle = 0; -+ int initflags = 0; - struct arg *a; - struct option *o; - int i, j, k, res; -@@ -265,6 +267,9 @@ int main(int argc, char *argv[]) - case 'I': - init_fallback = 0; - break; -+ case 'D': -+ initflags |= FLAG_UCM_DEFAULTS; -+ break; - case 'r': - statefile = optarg; - break; -@@ -359,7 +364,7 @@ int main(int argc, char *argv[]) - snd_lib_error_set_handler(error_handler); - - if (!strcmp(cmd, "init")) { -- res = init(initfile, cardname); -+ res = init(initfile, initflags, cardname); - snd_config_update_free_global(); - } else if (!strcmp(cmd, "store")) { - res = save_state(cfgfile, cardname); -@@ -368,7 +373,7 @@ int main(int argc, char *argv[]) - !strcmp(cmd, "nrestore")) { - if (removestate) - remove(statefile); -- res = load_state(cfgfile, initfile, cardname, init_fallback); -+ res = load_state(cfgfile, initfile, initflags, cardname, init_fallback); - if (!strcmp(cmd, "rdaemon")) { - do_nice(use_nice, sched_idle); - res = state_daemon(cfgfile, cardname, period, pidfile); -Index: alsa-utils-1.2.2/alsactl/alsactl.h -=================================================================== ---- alsa-utils-1.2.2.orig/alsactl/alsactl.h -+++ alsa-utils-1.2.2/alsactl/alsactl.h -@@ -25,13 +25,15 @@ void error_handler(const char *file, int - #define dbg(args...) do { dbg_(__func__, __LINE__, ##args); } while (0) - #endif - --int init(const char *file, const char *cardname); --int init_ucm(int cardno); -+#define FLAG_UCM_DEFAULTS (1<<0) -+ -+int init(const char *file, int flags, const char *cardname); -+int init_ucm(int flags, int cardno); - int state_lock(const char *file, int timeout); - int state_unlock(int fd, const char *file); - int save_state(const char *file, const char *cardname); --int load_state(const char *file, const char *initfile, const char *cardname, -- int do_init); -+int load_state(const char *file, const char *initfile, int initflags, -+ const char *cardname, int do_init); - int power(const char *argv[], int argc); - int monitor(const char *name); - int state_daemon(const char *file, const char *cardname, int period, -Index: alsa-utils-1.2.2/alsactl/init_parse.c -=================================================================== ---- alsa-utils-1.2.2.orig/alsactl/init_parse.c -+++ alsa-utils-1.2.2/alsactl/init_parse.c -@@ -1742,7 +1742,7 @@ static int parse(struct space *space, co - return err ? err : -abs(space->exit_code); - } - --int init(const char *filename, const char *cardname) -+int init(const char *filename, int flags, const char *cardname) - { - struct space *space; - int err = 0, lasterr = 0, card, first; -@@ -1762,7 +1762,7 @@ int init(const char *filename, const cha - break; - } - first = 0; -- err = init_ucm(card); -+ err = init_ucm(flags, card); - if (err == 0) - continue; - err = init_space(&space, card); -@@ -1787,7 +1787,7 @@ int init(const char *filename, const cha - error("Cannot find soundcard '%s'...", cardname); - goto error; - } -- err = init_ucm(card); -+ err = init_ucm(flags, card); - if (err == 0) - return 0; - memset(&space, 0, sizeof(space)); -Index: alsa-utils-1.2.2/alsactl/init_ucm.c -=================================================================== ---- alsa-utils-1.2.2.orig/alsactl/init_ucm.c -+++ alsa-utils-1.2.2/alsactl/init_ucm.c -@@ -19,12 +19,14 @@ - * - */ - -+#include -+#include "alsactl.h" - #include - - /* - * Keep it as simple as possible. Execute commands from the SectionOnce only. - */ --int init_ucm(int cardno) -+int init_ucm(int flags, int cardno) - { - snd_use_case_mgr_t *uc_mgr; - char id[32]; -@@ -35,6 +37,14 @@ int init_ucm(int cardno) - if (err < 0) - return err; - err = snd_use_case_set(uc_mgr, "_once", NULL); -+ if (err < 0) -+ goto _error; -+ if ((flags & FLAG_UCM_DEFAULTS) != 0) { -+ err = snd_use_case_set(uc_mgr, "_defaults", NULL); -+ if (err < 0) -+ goto _error; -+ } -+_error: - snd_use_case_mgr_close(uc_mgr); - return err; - } -Index: alsa-utils-1.2.2/alsactl/state.c -=================================================================== ---- alsa-utils-1.2.2.orig/alsactl/state.c -+++ alsa-utils-1.2.2/alsactl/state.c -@@ -1645,8 +1645,8 @@ out: - return err; - } - --int load_state(const char *file, const char *initfile, const char *cardname, -- int do_init) -+int load_state(const char *file, const char *initfile, int initflags, -+ const char *cardname, int do_init) - { - int err, finalerr = 0; - snd_config_t *config; -@@ -1704,7 +1704,7 @@ single: - if (!do_init) - break; - sprintf(cardname1, "%i", card); -- err = init(initfile, cardname1); -+ err = init(initfile, initflags, cardname1); - if (err < 0) { - finalerr = err; - initfailed(card, "init", err); -@@ -1743,7 +1743,7 @@ single: - /* do a check if controls matches state file */ - if (do_init && set_controls(card, config, 0)) { - sprintf(cardname1, "%i", card); -- err = init(initfile, cardname1); -+ err = init(initfile, initflags, cardname1); - if (err < 0) { - initfailed(card, "init", err); - finalerr = err; -@@ -1766,7 +1766,7 @@ single: - } - /* do a check if controls matches state file */ - if (do_init && set_controls(cardno, config, 0)) { -- err = init(initfile, cardname); -+ err = init(initfile, initflags, cardname); - if (err < 0) { - initfailed(cardno, "init", err); - finalerr = err; diff -Nru alsa-utils-1.2.2/debian/patches/0005-alsactl-use-the-right-priority-for-syslog-messages.patch alsa-utils-1.2.6/debian/patches/0005-alsactl-use-the-right-priority-for-syslog-messages.patch --- alsa-utils-1.2.2/debian/patches/0005-alsactl-use-the-right-priority-for-syslog-messages.patch 2020-10-16 15:33:50.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/0005-alsactl-use-the-right-priority-for-syslog-messages.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -From 2b8bd3315237d4c63c983d02124bbe191a7ab92f Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 14 May 2020 19:41:40 +0200 -Subject: [PATCH 5/8] alsactl: use the right priority for syslog messages - -Signed-off-by: Jaroslav Kysela -(cherry picked from commit 0adca4cac7f02ec07cf7b2042110125eb1052b60) -Signed-off-by: Hui Wang ---- - alsactl/utils.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/alsactl/utils.c b/alsactl/utils.c -index fb59e0e..9d4166f 100644 ---- a/alsactl/utils.c -+++ b/alsactl/utils.c -@@ -111,7 +111,7 @@ static void syslog_(int prio, const char *fcn, long line, - buf[sizeof(buf)-1] = '\0'; - vsnprintf(buf + strlen(buf), sizeof(buf)-strlen(buf), fmt, ap); - buf[sizeof(buf)-1] = '\0'; -- syslog(LOG_INFO, "%s", buf); -+ syslog(prio, "%s", buf); - } - - void info_(const char *fcn, long line, const char *fmt, ...) --- -2.25.1 - diff -Nru alsa-utils-1.2.2/debian/patches/0006-alsactl-allow-to-compile-alsactl-without-UCM-support.patch alsa-utils-1.2.6/debian/patches/0006-alsactl-allow-to-compile-alsactl-without-UCM-support.patch --- alsa-utils-1.2.2/debian/patches/0006-alsactl-allow-to-compile-alsactl-without-UCM-support.patch 2020-10-16 15:33:50.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/0006-alsactl-allow-to-compile-alsactl-without-UCM-support.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -From dfbe27348f7d7a02deea8a209670e0fc64cf2b60 Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 14 May 2020 19:54:04 +0200 -Subject: [PATCH 6/8] alsactl: allow to compile alsactl without UCM support - -Signed-off-by: Jaroslav Kysela -(cherry picked from commit 570ea6c455d1fe82c597e4ef9d5edbf07d6723dd) -Signed-off-by: Hui Wang ---- - alsactl/alsactl.c | 2 ++ - alsactl/init_ucm.c | 13 +++++++++++++ - 2 files changed, 15 insertions(+) - -diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c -index 5d7b450..e66e7d3 100644 ---- a/alsactl/alsactl.c -+++ b/alsactl/alsactl.c -@@ -96,7 +96,9 @@ static struct arg args[] = { - { 's', "syslog", "use syslog for messages" }, - { INTARG | 'n', "nice", "set the process priority (see 'man nice')" }, - { 'c', "sched-idle", "set the process scheduling policy to idle (SCHED_IDLE)" }, -+#ifdef HAVE_ALSA_USE_CASE_H - { 'D', "ucm-defaults", "execute also the UCM 'defaults' section" }, -+#endif - { HEADER, NULL, "Available commands:" }, - { CARDCMD, "store", "save current driver setup for one or each soundcards" }, - { EMPCMD, NULL, " to configuration file" }, -diff --git a/alsactl/init_ucm.c b/alsactl/init_ucm.c -index 9c05300..f6a43c5 100644 ---- a/alsactl/init_ucm.c -+++ b/alsactl/init_ucm.c -@@ -19,8 +19,12 @@ - * - */ - -+#include "aconfig.h" - #include - #include "alsactl.h" -+ -+#ifdef HAVE_ALSA_USE_CASE_H -+ - #include - - /* -@@ -48,3 +52,12 @@ _error: - snd_use_case_mgr_close(uc_mgr); - return err; - } -+ -+#else -+ -+int init_ucm(int flags, int cardno) -+{ -+ return 0; -+} -+ -+#endif --- -2.25.1 - diff -Nru alsa-utils-1.2.2/debian/patches/0007-alsactl-ucm-rename-_once-command-to-_boot-command.patch alsa-utils-1.2.6/debian/patches/0007-alsactl-ucm-rename-_once-command-to-_boot-command.patch --- alsa-utils-1.2.2/debian/patches/0007-alsactl-ucm-rename-_once-command-to-_boot-command.patch 2020-10-16 15:33:50.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/0007-alsactl-ucm-rename-_once-command-to-_boot-command.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,28 +0,0 @@ -From 6a7cd0213093d4ee8cd601e9a6d0d782dbdd96ee Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Mon, 25 May 2020 19:21:25 +0200 -Subject: [PATCH 7/8] alsactl: ucm - rename _once command to _boot command - -Signed-off-by: Jaroslav Kysela -(backported from commit f8a2aad5bbdb0430c0b9cd1d4d8a3b81fa5e1df1) -Signed-off-by: Hui Wang ---- - alsactl/init_ucm.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/alsactl/init_ucm.c b/alsactl/init_ucm.c -index f6a43c5..6468c9d 100644 ---- a/alsactl/init_ucm.c -+++ b/alsactl/init_ucm.c -@@ -40,7 +40,7 @@ int init_ucm(int flags, int cardno) - err = snd_use_case_mgr_open(&uc_mgr, id); - if (err < 0) - return err; -- err = snd_use_case_set(uc_mgr, "_once", NULL); -+ err = snd_use_case_set(uc_mgr, "_boot", NULL); - if (err < 0) - goto _error; - if ((flags & FLAG_UCM_DEFAULTS) != 0) { --- -2.25.1 - diff -Nru alsa-utils-1.2.2/debian/patches/0008-alsaucm-remove-custom-rules-alsactl-is-UCM-aware-now.patch alsa-utils-1.2.6/debian/patches/0008-alsaucm-remove-custom-rules-alsactl-is-UCM-aware-now.patch --- alsa-utils-1.2.2/debian/patches/0008-alsaucm-remove-custom-rules-alsactl-is-UCM-aware-now.patch 2020-10-16 15:33:50.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/0008-alsaucm-remove-custom-rules-alsactl-is-UCM-aware-now.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -From 7f2d0437362b7dcfc918e89172f2ac02d3a9f8cc Mon Sep 17 00:00:00 2001 -From: Jaroslav Kysela -Date: Thu, 28 May 2020 21:00:18 +0200 -Subject: [PATCH 8/8] alsaucm: remove custom rules, alsactl is UCM aware now - -Signed-off-by: Jaroslav Kysela -(cherry picked from commit d3d01ee7cf0de4a07e893f34ca49b5281f593530) -Signed-off-by: Hui Wang ---- - alsaucm/89-alsa-ucm.rules.in | 8 -------- - alsaucm/Makefile.am | 15 ++------------- - 2 files changed, 2 insertions(+), 21 deletions(-) - delete mode 100644 alsaucm/89-alsa-ucm.rules.in - -diff --git a/alsaucm/89-alsa-ucm.rules.in b/alsaucm/89-alsa-ucm.rules.in -deleted file mode 100644 -index 52a7616..0000000 ---- a/alsaucm/89-alsa-ucm.rules.in -+++ /dev/null -@@ -1,8 +0,0 @@ --SUBSYSTEM!="sound", GOTO="ucm_end" --ACTION!="change", GOTO="ucm_end" --KERNEL!="card*", GOTO="ucm_end" -- --ATTRS{id}=="PAZ00", RUN+="@bindir@/alsaucm -c PAZ00 set _verb HiFi" --ATTRS{id}=="PAZ00", RUN+="@bindir@/alsaucm -c PAZ00 set _verb Record" -- --LABEL="ucm_end" -diff --git a/alsaucm/Makefile.am b/alsaucm/Makefile.am -index ae02fc3..2010fc0 100644 ---- a/alsaucm/Makefile.am -+++ b/alsaucm/Makefile.am -@@ -15,17 +15,6 @@ AM_CPPFLAGS = \ - %.1: %.rst - rst2man $< > $@ - --udevrules_DATA = \ -- 89-alsa-ucm.rules -+EXTRA_DIST = alsaucm.rst - --edit = \ -- $(SED) -r -e 's,@bindir\@,$(bindir),g' \ -- -e 's,@mydatadir\@,$(mydatadir),g' \ -- < $< > $@ || rm $@ -- --89-alsa-ucm.rules: 89-alsa-ucm.rules.in -- $(edit) -- --EXTRA_DIST = alsaucm.rst 89-alsa-ucm.rules.in -- --CLEANFILES = alsaucm.1 89-alsa-ucm.rules -+CLEANFILES = alsaucm.1 --- -2.25.1 - diff -Nru alsa-utils-1.2.2/debian/patches/0020-aplay-try-to-use-16-bit-format-to-increase-capture-q.patch alsa-utils-1.2.6/debian/patches/0020-aplay-try-to-use-16-bit-format-to-increase-capture-q.patch --- alsa-utils-1.2.2/debian/patches/0020-aplay-try-to-use-16-bit-format-to-increase-capture-q.patch 2021-04-14 13:38:30.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/0020-aplay-try-to-use-16-bit-format-to-increase-capture-q.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,183 +0,0 @@ -From: Hui Wang -Date: Fri, 23 Oct 2020 16:47:10 +0800 -Subject: aplay: try to use 16-bit format to increase capture quality - -Recently users reported a bug, I tested it and found it is a common -issue on Laptop or Desktop machines. - -The issue is users plug a headset and use "arecord test.wav" to -record a sound with default input volume, the recorded sound has -poor quality and nearly can't distinguish it is the sound we want -to record. - -This is because the input volume is low and the default format is U8. -The driver records sound with 16bit, because the input volume is low, -most of samples are within (-256,+256), when converting 16bit to U8, -those samples will be 0x7f. This is called quantization noise and we -could only workaround it by increase the input volume or adding -f to -arecord. - -But users want to record a better quality sound with default input -volume (after installing a new OS, the volume is the default volume), -and they don't want to add parameters to the arecord because most of -new linux users just use "arecord test.wav". - -So this patch tries to change the default format from U8 to S16_LE/BE. -If the machine doesn't support S16_LE/BE, it still uses U8 as default -format. - -Signed-off-by: Hui Wang -Signed-off-by: Jaroslav Kysela -Signed-off-by: Kai-Heng Feng ---- - aplay/aplay.c | 43 ++++++++++++++++++++++++++++++++++--------- - 1 file changed, 34 insertions(+), 9 deletions(-) - -diff --git a/aplay/aplay.c b/aplay/aplay.c -index 08395f6..680663a 100644 ---- a/aplay/aplay.c -+++ b/aplay/aplay.c -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -94,6 +95,7 @@ enum { - VUMETER_STEREO - }; - -+static snd_pcm_format_t default_format = DEFAULT_FORMAT; - static char *command; - static snd_pcm_t *handle; - static struct { -@@ -468,6 +470,24 @@ static long parse_long(const char *str, int *err) - return val; - } - -+static void try_to_adjust_default_format_16bit(void) -+{ -+ snd_pcm_hw_params_t *params; -+ int err; -+ -+ snd_pcm_hw_params_alloca(¶ms); -+ err = snd_pcm_hw_params_any(handle, params); -+ if (err < 0) { -+ error(_("Broken configuration for this PCM: no configurations available")); -+ prg_exit(EXIT_FAILURE); -+ } -+ -+ if (file_type != FORMAT_AU && snd_pcm_hw_params_test_format(handle, params, SND_PCM_FORMAT_S16_LE) == 0) -+ rhwparams.format = default_format = SND_PCM_FORMAT_S16_LE; -+ else if (file_type == FORMAT_AU && snd_pcm_hw_params_test_format(handle, params, SND_PCM_FORMAT_S16_BE) == 0) -+ rhwparams.format = default_format = SND_PCM_FORMAT_S16_BE; -+} -+ - int main(int argc, char *argv[]) - { - int duration_or_sample = 0; -@@ -528,6 +548,7 @@ int main(int argc, char *argv[]) - int do_device_list = 0, do_pcm_list = 0; - snd_pcm_info_t *info; - FILE *direction; -+ bool user_set_fmt = false; - - #ifdef ENABLE_NLS - setlocale(LC_ALL, ""); -@@ -562,7 +583,7 @@ int main(int argc, char *argv[]) - } - - chunk_size = -1; -- rhwparams.format = DEFAULT_FORMAT; -+ rhwparams.format = default_format; - rhwparams.rate = DEFAULT_SPEED; - rhwparams.channels = 1; - -@@ -612,6 +633,7 @@ int main(int argc, char *argv[]) - } - break; - case 'f': -+ user_set_fmt = true; - if (strcasecmp(optarg, "cd") == 0 || strcasecmp(optarg, "cdr") == 0) { - if (strcasecmp(optarg, "cdr") == 0) - rhwparams.format = SND_PCM_FORMAT_S16_BE; -@@ -844,6 +866,9 @@ int main(int argc, char *argv[]) - } - } - -+ if (!user_set_fmt) -+ try_to_adjust_default_format_16bit(); -+ - chunk_size = 1024; - hwparams = rhwparams; - -@@ -1064,7 +1089,7 @@ static ssize_t test_wavefile(int fd, u_char *_buffer, size_t size) - hwparams.channels = channels; - switch (TO_CPU_SHORT(f->bit_p_spl, big_endian)) { - case 8: -- if (hwparams.format != DEFAULT_FORMAT && -+ if (hwparams.format != default_format && - hwparams.format != SND_PCM_FORMAT_U8) - fprintf(stderr, _("Warning: format is changed to U8\n")); - hwparams.format = SND_PCM_FORMAT_U8; -@@ -1074,7 +1099,7 @@ static ssize_t test_wavefile(int fd, u_char *_buffer, size_t size) - native_format = SND_PCM_FORMAT_S16_BE; - else - native_format = SND_PCM_FORMAT_S16_LE; -- if (hwparams.format != DEFAULT_FORMAT && -+ if (hwparams.format != default_format && - hwparams.format != native_format) - fprintf(stderr, _("Warning: format is changed to %s\n"), - snd_pcm_format_name(native_format)); -@@ -1087,7 +1112,7 @@ static ssize_t test_wavefile(int fd, u_char *_buffer, size_t size) - native_format = SND_PCM_FORMAT_S24_3BE; - else - native_format = SND_PCM_FORMAT_S24_3LE; -- if (hwparams.format != DEFAULT_FORMAT && -+ if (hwparams.format != default_format && - hwparams.format != native_format) - fprintf(stderr, _("Warning: format is changed to %s\n"), - snd_pcm_format_name(native_format)); -@@ -1098,7 +1123,7 @@ static ssize_t test_wavefile(int fd, u_char *_buffer, size_t size) - native_format = SND_PCM_FORMAT_S24_BE; - else - native_format = SND_PCM_FORMAT_S24_LE; -- if (hwparams.format != DEFAULT_FORMAT && -+ if (hwparams.format != default_format && - hwparams.format != native_format) - fprintf(stderr, _("Warning: format is changed to %s\n"), - snd_pcm_format_name(native_format)); -@@ -1184,19 +1209,19 @@ static int test_au(int fd, void *buffer) - pbrec_count = BE_INT(ap->data_size); - switch (BE_INT(ap->encoding)) { - case AU_FMT_ULAW: -- if (hwparams.format != DEFAULT_FORMAT && -+ if (hwparams.format != default_format && - hwparams.format != SND_PCM_FORMAT_MU_LAW) - fprintf(stderr, _("Warning: format is changed to MU_LAW\n")); - hwparams.format = SND_PCM_FORMAT_MU_LAW; - break; - case AU_FMT_LIN8: -- if (hwparams.format != DEFAULT_FORMAT && -+ if (hwparams.format != default_format && - hwparams.format != SND_PCM_FORMAT_U8) - fprintf(stderr, _("Warning: format is changed to U8\n")); - hwparams.format = SND_PCM_FORMAT_U8; - break; - case AU_FMT_LIN16: -- if (hwparams.format != DEFAULT_FORMAT && -+ if (hwparams.format != default_format && - hwparams.format != SND_PCM_FORMAT_S16_BE) - fprintf(stderr, _("Warning: format is changed to S16_BE\n")); - hwparams.format = SND_PCM_FORMAT_S16_BE; -@@ -2312,7 +2337,7 @@ static void voc_play(int fd, int ofs, char *name) - prg_exit(EXIT_FAILURE); - } - } -- hwparams.format = DEFAULT_FORMAT; -+ hwparams.format = default_format; - hwparams.channels = 1; - hwparams.rate = DEFAULT_SPEED; - set_params(); diff -Nru alsa-utils-1.2.2/debian/patches/Don-t-run-both-systemd-services-in-paralell.patch alsa-utils-1.2.6/debian/patches/Don-t-run-both-systemd-services-in-paralell.patch --- alsa-utils-1.2.2/debian/patches/Don-t-run-both-systemd-services-in-paralell.patch 2019-10-30 10:35:09.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/Don-t-run-both-systemd-services-in-paralell.patch 2022-01-12 15:13:34.000000000 +0000 @@ -11,19 +11,15 @@ alsactl/alsa-restore.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in -index 38ffea7..74b9290 100644 ---- a/alsactl/alsa-restore.service.in -+++ b/alsactl/alsa-restore.service.in -@@ -8,7 +8,7 @@ Description=Save/Restore Sound Card State +Index: alsa-utils/alsactl/alsa-restore.service.in +=================================================================== +--- alsa-utils.orig/alsactl/alsa-restore.service.in ++++ alsa-utils/alsactl/alsa-restore.service.in +@@ -8,6 +8,7 @@ Description=Save/Restore Sound Card Stat Documentation=man:alsactl(1) ConditionPathExists=!@daemonswitch@ ConditionPathExistsGlob=/dev/snd/control* --ConditionPathExists=@asoundrcfile@ +After=alsa-state.service [Service] Type=oneshot --- -2.20.1 - diff -Nru alsa-utils-1.2.2/debian/patches/alsa-info_call_home.patch alsa-utils-1.2.6/debian/patches/alsa-info_call_home.patch --- alsa-utils-1.2.2/debian/patches/alsa-info_call_home.patch 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/alsa-info_call_home.patch 2022-01-12 15:13:34.000000000 +0000 @@ -0,0 +1,29 @@ +Description: Only check for updates when invoked using --update +Author: Jordi Mallach +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=962073 +Forwarded: no + +Index: alsa-utils/alsa-info/alsa-info.sh +=================================================================== +--- alsa-utils.orig/alsa-info/alsa-info.sh ++++ alsa-utils/alsa-info/alsa-info.sh +@@ -720,11 +720,6 @@ if [ -s "$TEMPDIR/alsa-usbmixer.tmp" ]; + echo "" >> $FILE + fi + +-#If no command line options are specified, then run as though --with-all was specified +-if [ -z "$1" ]; then +- update +-fi +- + fi # proceed + + #loop through command line arguments, until none are left. +@@ -733,7 +728,6 @@ if [ -n "$1" ]; then + do + case "$1" in + --pastebin) +- update + ;; + --update) + update diff -Nru alsa-utils-1.2.2/debian/patches/alsactl_home.patch alsa-utils-1.2.6/debian/patches/alsactl_home.patch --- alsa-utils-1.2.2/debian/patches/alsactl_home.patch 2020-02-29 16:48:00.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/alsactl_home.patch 2022-01-12 15:13:34.000000000 +0000 @@ -6,7 +6,7 @@ =================================================================== --- alsa-utils.orig/configure.ac +++ alsa-utils/configure.ac -@@ -426,6 +426,12 @@ AC_ARG_WITH([alsactl-pidfile-dir], +@@ -431,6 +431,12 @@ AC_ARG_WITH([alsactl-pidfile-dir], [ALSACTL_PIDFILE_DIR="/var/run"]) AC_SUBST(ALSACTL_PIDFILE_DIR) @@ -35,7 +35,7 @@ =================================================================== --- alsa-utils.orig/alsactl/alsa-restore.service.in +++ alsa-utils/alsactl/alsa-restore.service.in -@@ -12,5 +12,5 @@ ConditionPathExists=@asoundrcfile@ +@@ -11,5 +11,5 @@ ConditionPathExistsGlob=/dev/snd/control [Service] Type=oneshot RemainAfterExit=true diff -Nru alsa-utils-1.2.2/debian/patches/alsactl_xdg_runtime.patch alsa-utils-1.2.6/debian/patches/alsactl_xdg_runtime.patch --- alsa-utils-1.2.2/debian/patches/alsactl_xdg_runtime.patch 2020-02-29 16:48:00.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/alsactl_xdg_runtime.patch 2022-01-12 15:13:34.000000000 +0000 @@ -31,7 +31,7 @@ =================================================================== --- alsa-utils.orig/alsactl/alsa-restore.service.in +++ alsa-utils/alsactl/alsa-restore.service.in -@@ -12,5 +12,5 @@ ConditionPathExists=@asoundrcfile@ +@@ -11,5 +11,5 @@ ConditionPathExistsGlob=/dev/snd/control [Service] Type=oneshot RemainAfterExit=true @@ -55,7 +55,7 @@ =================================================================== --- alsa-utils.orig/configure.ac +++ alsa-utils/configure.ac -@@ -426,6 +426,12 @@ AC_ARG_WITH([alsactl-pidfile-dir], +@@ -431,6 +431,12 @@ AC_ARG_WITH([alsactl-pidfile-dir], [ALSACTL_PIDFILE_DIR="/var/run"]) AC_SUBST(ALSACTL_PIDFILE_DIR) diff -Nru alsa-utils-1.2.2/debian/patches/create_run_alsa.patch alsa-utils-1.2.6/debian/patches/create_run_alsa.patch --- alsa-utils-1.2.2/debian/patches/create_run_alsa.patch 2020-03-04 16:44:43.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/create_run_alsa.patch 2021-01-11 15:38:25.000000000 +0000 @@ -1,18 +1,18 @@ -Index: alsa-utils-1.2.1/alsactl/alsa-restore.service.in +Index: alsa-utils-1.2.3/alsactl/alsa-restore.service.in =================================================================== ---- alsa-utils-1.2.1.orig/alsactl/alsa-restore.service.in -+++ alsa-utils-1.2.1/alsactl/alsa-restore.service.in -@@ -12,5 +12,6 @@ ConditionPathExistsGlob=/dev/snd/control +--- alsa-utils-1.2.3.orig/alsactl/alsa-restore.service.in ++++ alsa-utils-1.2.3/alsactl/alsa-restore.service.in +@@ -13,5 +13,6 @@ After=alsa-state.service [Service] Type=oneshot RemainAfterExit=true +ExecStartPre=/bin/mkdir -p @alsactlhome@ ExecStart=-@sbindir@/alsactl -E HOME=@alsactlhome@ -E XDG_RUNTIME_DIR=@alsactlruntime@ restore ExecStop=-@sbindir@/alsactl -E HOME=@alsactlhome@ -E XDG_RUNTIME_DIR=@alsactlruntime@ store -Index: alsa-utils-1.2.1/alsactl/alsa-state.service.in +Index: alsa-utils-1.2.3/alsactl/alsa-state.service.in =================================================================== ---- alsa-utils-1.2.1.orig/alsactl/alsa-state.service.in -+++ alsa-utils-1.2.1/alsactl/alsa-state.service.in +--- alsa-utils-1.2.3.orig/alsactl/alsa-state.service.in ++++ alsa-utils-1.2.3/alsactl/alsa-state.service.in @@ -10,5 +10,6 @@ ConditionPathExists=@daemonswitch@ [Service] diff -Nru alsa-utils-1.2.2/debian/patches/series alsa-utils-1.2.6/debian/patches/series --- alsa-utils-1.2.2/debian/patches/series 2021-04-14 13:38:30.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/series 2022-01-12 15:13:34.000000000 +0000 @@ -1,3 +1,4 @@ +alsa-info_call_home.patch alsa-info_manpage.patch alsactl_home.patch alsactl_xdg_runtime.patch @@ -9,12 +10,3 @@ add_extra_volume_defaults.patch vmware_audio_volume.patch create_run_alsa.patch -0001-alsactl-init-iterate-through-all-cards-for-the-initi.patch -0002-alsactl-add-initial-support-for-UCM-init.patch -0003-alsactl-redirect-alsa-lib-errors.patch -0004-alsactl-add-D-argument-to-execute-also-the-UCM-defau.patch -0005-alsactl-use-the-right-priority-for-syslog-messages.patch -0006-alsactl-allow-to-compile-alsactl-without-UCM-support.patch -0007-alsactl-ucm-rename-_once-command-to-_boot-command.patch -0008-alsaucm-remove-custom-rules-alsactl-is-UCM-aware-now.patch -0020-aplay-try-to-use-16-bit-format-to-increase-capture-q.patch diff -Nru alsa-utils-1.2.2/debian/patches/spellfixes.patch alsa-utils-1.2.6/debian/patches/spellfixes.patch --- alsa-utils-1.2.2/debian/patches/spellfixes.patch 2019-10-30 10:35:09.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/spellfixes.patch 2022-01-12 15:13:34.000000000 +0000 @@ -1,11 +1,11 @@ Author: Elimar Riesebieter Description: fix some spell errorrs in alsactl binary. -Index: alsa-utils-1.1.3/alsactl/alsactl.c +Index: alsa-utils/alsactl/alsactl.c =================================================================== ---- alsa-utils-1.1.3.orig/alsactl/alsactl.c -+++ alsa-utils-1.1.3/alsactl/alsactl.c -@@ -90,7 +90,7 @@ static struct arg args[] = { +--- alsa-utils.orig/alsactl/alsactl.c ++++ alsa-utils/alsactl/alsactl.c +@@ -93,7 +93,7 @@ static struct arg args[] = { { FILEARG | 'e', "pid-file", "pathname for the process id (daemon mode)" }, { HEADER, NULL, "Available init options:" }, { ENVARG | 'E', "env", "set environment variable for init phase (NAME=VALUE)" }, @@ -14,10 +14,10 @@ { 0, NULL, " (default " DATADIR "/init/00main)" }, { 'b', "background", "run daemon in background" }, { 's', "syslog", "use syslog for messages" }, -Index: alsa-utils-1.1.3/alsactl/init_parse.c +Index: alsa-utils/alsactl/init_parse.c =================================================================== ---- alsa-utils-1.1.3.orig/alsactl/init_parse.c -+++ alsa-utils-1.1.3/alsactl/init_parse.c +--- alsa-utils.orig/alsactl/init_parse.c ++++ alsa-utils/alsactl/init_parse.c @@ -939,7 +939,7 @@ static int get_key(char **line, char **k } @@ -63,10 +63,10 @@ return EXIT_SUCCESS; } Perror(space, "unknown buildin command '%s'", command0); -Index: alsa-utils-1.1.3/alsactl/init_utils_run.c +Index: alsa-utils/alsactl/init_utils_run.c =================================================================== ---- alsa-utils-1.1.3.orig/alsactl/init_utils_run.c -+++ alsa-utils-1.1.3/alsactl/init_utils_run.c +--- alsa-utils.orig/alsactl/init_utils_run.c ++++ alsa-utils/alsactl/init_utils_run.c @@ -24,12 +24,12 @@ static int run_program1(struct space *space, @@ -109,11 +109,11 @@ + return run_program1(space, command0, result, resize, reslen, log); + return run_program0(space, command0, result, resize, reslen, log); } -Index: alsa-utils-1.1.3/alsactl/state.c +Index: alsa-utils/alsactl/state.c =================================================================== ---- alsa-utils-1.1.3.orig/alsactl/state.c -+++ alsa-utils-1.1.3/alsactl/state.c -@@ -1160,7 +1160,7 @@ static int restore_config_value(snd_ctl_ +--- alsa-utils.orig/alsactl/state.c ++++ alsa-utils/alsactl/state.c +@@ -1168,7 +1168,7 @@ static int restore_config_value(snd_ctl_ case SND_CTL_ELEM_TYPE_IEC958: break; default: diff -Nru alsa-utils-1.2.2/debian/patches/systemd_Documentation_key.patch alsa-utils-1.2.6/debian/patches/systemd_Documentation_key.patch --- alsa-utils-1.2.2/debian/patches/systemd_Documentation_key.patch 2019-10-30 10:35:09.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/systemd_Documentation_key.patch 2022-01-12 15:13:34.000000000 +0000 @@ -12,7 +12,7 @@ +Documentation=man:alsactl(1) ConditionPathExists=!@daemonswitch@ ConditionPathExistsGlob=/dev/snd/control* - ConditionPathExists=@asoundrcfile@ + Index: alsa-utils/alsactl/alsa-state.service.in =================================================================== --- alsa-utils.orig/alsactl/alsa-state.service.in diff -Nru alsa-utils-1.2.2/debian/patches/udev_test_alsactl.patch alsa-utils-1.2.6/debian/patches/udev_test_alsactl.patch --- alsa-utils-1.2.2/debian/patches/udev_test_alsactl.patch 2020-03-04 16:44:43.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/udev_test_alsactl.patch 2022-01-12 15:13:34.000000000 +0000 @@ -4,12 +4,11 @@ not be available at boot time on separate /usr systems. Forwarded: no Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713916 -Last-Update: 2020-01-29 -Index: alsa-utils-1.2.1/alsactl/90-alsa-restore.rules.in +Index: alsa-utils/alsactl/90-alsa-restore.rules.in =================================================================== ---- alsa-utils-1.2.1.orig/alsactl/90-alsa-restore.rules.in -+++ alsa-utils-1.2.1/alsactl/90-alsa-restore.rules.in +--- alsa-utils.orig/alsactl/90-alsa-restore.rules.in ++++ alsa-utils/alsactl/90-alsa-restore.rules.in @@ -2,7 +2,7 @@ ACTION=="add", SUBSYSTEM=="sound", KERNE GOTO="alsa_restore_end" diff -Nru alsa-utils-1.2.2/debian/patches/unset_pulse_internal.patch alsa-utils-1.2.6/debian/patches/unset_pulse_internal.patch --- alsa-utils-1.2.2/debian/patches/unset_pulse_internal.patch 2020-03-04 16:44:43.000000000 +0000 +++ alsa-utils-1.2.6/debian/patches/unset_pulse_internal.patch 2022-01-12 15:13:36.000000000 +0000 @@ -1,8 +1,8 @@ -Index: alsa-utils-1.1.1/alsamixer/cli.c +Index: alsa-utils-1.2.6-1ubuntu1/alsamixer/cli.c =================================================================== ---- alsa-utils-1.1.1.orig/alsamixer/cli.c -+++ alsa-utils-1.1.1/alsamixer/cli.c -@@ -123,6 +123,10 @@ int main(int argc, char *argv[]) +--- alsa-utils-1.2.6-1ubuntu1.orig/alsamixer/cli.c ++++ alsa-utils-1.2.6-1ubuntu1/alsamixer/cli.c +@@ -150,6 +150,10 @@ int main(int argc, char *argv[]) textdomain(PACKAGE); #endif @@ -12,14 +12,14 @@ + parse_options(argc, argv); - create_mixer_object(&selem_regopt); -Index: alsa-utils-1.1.1/amixer/amixer.c + if (config_file == CONFIG_DEFAULT) +Index: alsa-utils-1.2.6-1ubuntu1/amixer/amixer.c =================================================================== ---- alsa-utils-1.1.1.orig/amixer/amixer.c -+++ alsa-utils-1.1.1/amixer/amixer.c -@@ -1764,6 +1764,11 @@ int main(int argc, char *argv[]) +--- alsa-utils-1.2.6-1ubuntu1.orig/amixer/amixer.c ++++ alsa-utils-1.2.6-1ubuntu1/amixer/amixer.c +@@ -1777,6 +1777,11 @@ int main(int argc, char *argv[]) { - int morehelp, level = 0; + int badopt, retval, level = 0; int read_stdin = 0; + + /* We don't want to control a pulseaudio mixer, since that can be done @@ -29,10 +29,10 @@ static const struct option long_option[] = { {"help", 0, NULL, 'h'}, -Index: alsa-utils-1.1.1/iecset/iecset.c +Index: alsa-utils-1.2.6-1ubuntu1/iecset/iecset.c =================================================================== ---- alsa-utils-1.1.1.orig/iecset/iecset.c -+++ alsa-utils-1.1.1/iecset/iecset.c +--- alsa-utils-1.2.6-1ubuntu1.orig/iecset/iecset.c ++++ alsa-utils-1.2.6-1ubuntu1/iecset/iecset.c @@ -324,6 +324,10 @@ int main(int argc, char **argv) char tmpname[32]; int parms[IDX_LAST]; @@ -44,11 +44,11 @@ for (i = 0; i < IDX_LAST; i++) parms[i] = -1; /* not set */ -Index: alsa-utils-1.1.1/alsactl/alsactl.c +Index: alsa-utils-1.2.6-1ubuntu1/alsactl/alsactl.c =================================================================== ---- alsa-utils-1.1.1.orig/alsactl/alsactl.c -+++ alsa-utils-1.1.1/alsactl/alsactl.c -@@ -171,6 +171,8 @@ static void do_nice(int use_nice, int sc +--- alsa-utils-1.2.6-1ubuntu1.orig/alsactl/alsactl.c ++++ alsa-utils-1.2.6-1ubuntu1/alsactl/alsactl.c +@@ -227,6 +227,8 @@ static void do_nice(int use_nice, int sc int main(int argc, char *argv[]) { diff -Nru alsa-utils-1.2.2/debian/upstream/metadata alsa-utils-1.2.6/debian/upstream/metadata --- alsa-utils-1.2.2/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/debian/upstream/metadata 2022-01-12 15:13:34.000000000 +0000 @@ -0,0 +1,5 @@ +--- +Bug-Database: https://github.com/alsa-project/alsa-utils/issues +Bug-Submit: https://github.com/alsa-project/alsa-utils/issues/new +Repository: git://git.alsa-project.org/alsa-utils.git +Repository-Browse: https://git.alsa-project.org/?p=alsa-utils.git diff -Nru alsa-utils-1.2.2/debian/upstream/signing-key.asc alsa-utils-1.2.6/debian/upstream/signing-key.asc --- alsa-utils-1.2.2/debian/upstream/signing-key.asc 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/debian/upstream/signing-key.asc 2021-09-09 10:02:16.000000000 +0000 @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBF+PBUIBEACQ0eLhY6zJkZCztI3Zj7GiEkGyDYXFr10wMn2BmAxXEOhvGs5C +XtZYokNnYnojU2ehb14pdQiIYVm7YwjNjPhFmc6DnSJ74tlDtzI0ZfZYgU8B3/AU +hHCIe7NeH+uqaS4hQ4gQF3HB19GNQ21keQPtm/cZzNvkAwWQ6wxiIas/odQGt6sg +TULub4gXQw42iCW0jNeliNgeOc/4/2qtznN+Ss5G+Hs+EBh0kFCG4+5RcpgtKmYO +LEy+8qI/UmlgOeT+47eTXm4LjxHfRuKcbvSExfICUB5XLD2ZmeZbFyP48jkDvB7w +A4jNfImtlRfTvoviNlOl08Pk3aJoPR8IZIGw+EQCf3ChXTziadqOg37SAy4yGJ14 +BjirKgBNO4zB+lkLOAknsVKJOKRt3w54MevCuj0GGbfSyErZAeHvliXrfBa1ACLu +c2ynRDR/5j0FA3vPzRsHyOGFC4F34W5BhkXCuJBG2o2VDv/zANzjg/hw+0IbmH3G +kYn73EDIaz5giKJolE32WaWkz39DwuuoUaLLyfxyiN+c0p2/XQFCrOSqHNUMfI5z +Ll62nL1XruF6u9ApLKRv/uDJN7tLgds83rteYJP7/5/JSYCPB8PcUkmhB8OoVdpr +tYI8C/6Y6KREm3Jk4AdkySIFnPXZQCkiOR2qOmAuaQPeesjsrSkUtJYZcwARAQAB +tEVBTFNBIFJlbGVhc2UgVGVhbSAoUGFja2FnZSBTaWduaW5nIEtleSB2MSkgPHJl +bGVhc2VAYWxzYS1wcm9qZWN0Lm9yZz6JAk4EEwEIADgWIQTwTfUHN6waiExLPXGD +gFltpuWckQUCX48FQgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCDgFlt +puWckRhVD/45DNoD79lHBJEu0Wv93OSlPZDUKR+BnkkdEDgDEhTvk+Bin/EWdb3g +Unc+rEczgAqjqblLH7ndBtFZPNGiQ2nu8eAdN0TrOFQx7bFg4Do7KXNUUqdPUETC +AgkozF3ucsgOcBbv6LwwDfdQDFjkg7CuNGy8CRcLSO5dLK7domq3RxF5mKl1dkOv +4brfw6ssn+pja/jkgM9BKt80ycIDiJtVRuXMBJD19ZB8EzQO9OQBdAPERSG8BwLX +LemTLAZqNd0mixVbn50qCQil64UOkOd5DHVBBokxgtlJEcDujqWaCUYSygSiP2ke +44ArDr7hRwG5KhhbFOigXo3nBYnKyiuWs0jpnrTQD9+uTxcetyBpJ6BW/i/Fy2a9 +NBFNhbDI07rCMXM25cLP8qbI5i6nTSDlkpLP40At9yUVYt8gIO6ZpGpO04/lAhT1 +NxtbZkKMo1nphMHU/MDSusoHyLxUXpppdbXTdMgsuFrXae3gcFDowQbLZqb6ZAJ5 +opX4sDBIdoHDBsI6wCGTV7AAWB8RXWW0RTYMkyIxqixiiB2N2jaau4yHfqv9QWOY +oPcx6ySKqGN0HV50PeRis5eeq7kHIdRrVIOBd0tPIqCKIvyJZk1QXReKvvE84Km2 +dYPusBlhhF7/4WVovlE6HFwyLSOyb32m4qf5dV35op07ew8i4DHpkQ== +=n4lM +-----END PGP PUBLIC KEY BLOCK----- diff -Nru alsa-utils-1.2.2/debian/watch alsa-utils-1.2.6/debian/watch --- alsa-utils-1.2.2/debian/watch 2019-10-30 10:35:09.000000000 +0000 +++ alsa-utils-1.2.6/debian/watch 2022-01-12 15:13:34.000000000 +0000 @@ -1,2 +1,3 @@ version=4 +opts="pgpsigurlmangle=s/$/.sig/" \ ftp://ftp.alsa-project.org/pub/utils/alsa-utils-(.+)\.tar\.bz2 diff -Nru alsa-utils-1.2.2/depcomp alsa-utils-1.2.6/depcomp --- alsa-utils-1.2.2/depcomp 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/depcomp 2021-12-06 11:44:44.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2018 Free Software Foundation, Inc. +# Copyright (C) 1999-2020 Free Software Foundation, Inc. # 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 diff -Nru alsa-utils-1.2.2/iecset/Makefile.in alsa-utils-1.2.6/iecset/Makefile.in --- alsa-utils-1.2.2/iecset/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/iecset/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ subdir = iecset ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -255,8 +256,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -336,6 +337,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/include/Makefile.in alsa-utils-1.2.6/include/Makefile.in --- alsa-utils-1.2.2/include/Makefile.in 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/include/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,7 +91,8 @@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -124,8 +125,8 @@ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(noinst_HEADERS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ - $(LISP)aconfig.h.in +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ + aconfig.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. @@ -204,8 +205,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -285,6 +286,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/include/aconfig.h.in alsa-utils-1.2.6/include/aconfig.h.in --- alsa-utils-1.2.2/include/aconfig.h.in 2020-02-19 12:07:13.000000000 +0000 +++ alsa-utils-1.2.6/include/aconfig.h.in 2021-12-06 11:44:43.000000000 +0000 @@ -28,9 +28,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ALSA_USE_CASE_H -/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the - CoreFoundation framework. */ -#undef HAVE_CFLOCALECOPYCURRENT +/* Define to 1 if you have the Mac OS X function + CFLocaleCopyPreferredLanguages in the CoreFoundation framework. */ +#undef HAVE_CFLOCALECOPYPREFERREDLANGUAGES /* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework. */ @@ -79,6 +79,9 @@ /* Define to 1 if you have the `tinyalsa' library (-ltinyalsa). */ #undef HAVE_LIBTINYALSA +/* Define if Linux kernel supports memfd_create system call */ +#undef HAVE_MEMFD_CREATE + /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H diff -Nru alsa-utils-1.2.2/include/version.h alsa-utils-1.2.6/include/version.h --- alsa-utils-1.2.2/include/version.h 2020-02-19 12:07:29.000000000 +0000 +++ alsa-utils-1.2.6/include/version.h 2021-12-06 11:44:53.000000000 +0000 @@ -4,9 +4,9 @@ #define SND_UTIL_MAJOR 1 #define SND_UTIL_MINOR 2 -#define SND_UTIL_SUBMINOR 2 +#define SND_UTIL_SUBMINOR 6 #define SND_UTIL_VERSION ((SND_UTIL_MAJOR<<16)|\ (SND_UTIL_MINOR<<8)|\ SND_UTIL_SUBMINOR) -#define SND_UTIL_VERSION_STR "1.2.2" +#define SND_UTIL_VERSION_STR "1.2.6" diff -Nru alsa-utils-1.2.2/install-sh alsa-utils-1.2.6/install-sh --- alsa-utils-1.2.2/install-sh 2020-02-19 12:07:14.000000000 +0000 +++ alsa-utils-1.2.6/install-sh 2021-12-06 11:44:44.000000000 +0000 @@ -451,7 +451,18 @@ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + (umask $cp_umask && + { test -z "$stripcmd" || { + # Create $dsttmp read-write so that cp doesn't create it read-only, + # which would cause strip to fail. + if test -z "$doit"; then + : >"$dsttmp" # No need to fork-exec 'touch'. + else + $doit touch "$dsttmp" + fi + } + } && + $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # diff -Nru alsa-utils-1.2.2/m4/Makefile.am alsa-utils-1.2.6/m4/Makefile.am --- alsa-utils-1.2.2/m4/Makefile.am 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/m4/Makefile.am 2021-12-06 11:44:41.000000000 +0000 @@ -1 +1 @@ -EXTRA_DIST = gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 gettext.m4 +EXTRA_DIST = gettext.m4 host-cpu-c-abi.m4 iconv.m4 intlmacosx.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 gettext.m4 diff -Nru alsa-utils-1.2.2/m4/Makefile.in alsa-utils-1.2.6/m4/Makefile.in --- alsa-utils-1.2.2/m4/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/m4/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,7 +90,8 @@ subdir = m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -182,8 +183,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -263,6 +264,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -274,7 +276,7 @@ top_srcdir = @top_srcdir@ udevrulesdir = @udevrulesdir@ xmlto_available = @xmlto_available@ -EXTRA_DIST = gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 gettext.m4 +EXTRA_DIST = gettext.m4 host-cpu-c-abi.m4 iconv.m4 intlmacosx.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 gettext.m4 all: all-am .SUFFIXES: diff -Nru alsa-utils-1.2.2/m4/gettext.m4 alsa-utils-1.2.6/m4/gettext.m4 --- alsa-utils-1.2.2/m4/gettext.m4 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/m4/gettext.m4 2021-12-06 11:44:41.000000000 +0000 @@ -1,15 +1,15 @@ -# gettext.m4 serial 68 (gettext-0.19.8) -dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. +# gettext.m4 serial 71 (gettext-0.20.2) +dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public +dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU +dnl by the GNU Lesser General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. @@ -20,15 +20,13 @@ dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The -dnl default (if it is not specified or empty) is 'no-libtool'. -dnl INTLSYMBOL should be 'external' for packages with no intl directory, -dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl INTLSYMBOL must be one of 'external', 'use-libtool'. +dnl INTLSYMBOL should be 'external' for packages other than GNU gettext, and +dnl 'use-libtool' for the packages 'gettext-runtime' and 'gettext-tools'. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of -dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library -dnl $(top_builddir)/intl/libintl.a will be created. +dnl AM-DISABLE-SHARED). dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is @@ -57,19 +55,17 @@ AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. - ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT -])])])])]) +])])])]) ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], - [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) + [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported. +])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define([gt_included_intl], - ifelse([$1], [external], - ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]), - [yes])) - define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) + ifelse([$1], [external], [no], [yes])) gt_NEEDS_INIT AM_GNU_GETTEXT_NEED([$2]) @@ -91,8 +87,7 @@ dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. - dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not - dnl documented, we avoid it. + dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) @@ -278,8 +273,8 @@ dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes - LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" - LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi @@ -347,43 +342,14 @@ fi ifelse(gt_included_intl, yes, [ - dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL - dnl to 'yes' because some of the testsuite requires it. - if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes - fi + dnl In GNU gettext we have to set BUILD_INCLUDED_LIBINTL to 'yes' + dnl because some of the testsuite requires it. + BUILD_INCLUDED_LIBINTL=yes dnl Make all variables we use known to autoconf. AC_SUBST([BUILD_INCLUDED_LIBINTL]) AC_SUBST([USE_INCLUDED_LIBINTL]) AC_SUBST([CATOBJEXT]) - - dnl For backward compatibility. Some configure.ins may be using this. - nls_cv_header_intl= - nls_cv_header_libgt= - - dnl For backward compatibility. Some Makefiles may be using this. - DATADIRNAME=share - AC_SUBST([DATADIRNAME]) - - dnl For backward compatibility. Some Makefiles may be using this. - INSTOBJEXT=.mo - AC_SUBST([INSTOBJEXT]) - - dnl For backward compatibility. Some Makefiles may be using this. - GENCAT=gencat - AC_SUBST([GENCAT]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLOBJS= - if test "$USE_INCLUDED_LIBINTL" = yes; then - INTLOBJS="\$(GETTOBJS)" - fi - AC_SUBST([INTLOBJS]) - - dnl Enable libtool support if the surrounding package wishes it. - INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ]) dnl For backward compatibility. Some Makefiles may be using this. diff -Nru alsa-utils-1.2.2/m4/host-cpu-c-abi.m4 alsa-utils-1.2.6/m4/host-cpu-c-abi.m4 --- alsa-utils-1.2.2/m4/host-cpu-c-abi.m4 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/m4/host-cpu-c-abi.m4 2021-12-06 11:44:41.000000000 +0000 @@ -0,0 +1,675 @@ +# host-cpu-c-abi.m4 serial 13 +dnl Copyright (C) 2002-2020 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl From Bruno Haible and Sam Steingold. + +dnl Sets the HOST_CPU variable to the canonical name of the CPU. +dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its +dnl C language ABI (application binary interface). +dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in +dnl config.h. +dnl +dnl This canonical name can be used to select a particular assembly language +dnl source file that will interoperate with C code on the given host. +dnl +dnl For example: +dnl * 'i386' and 'sparc' are different canonical names, because code for i386 +dnl will not run on SPARC CPUs and vice versa. They have different +dnl instruction sets. +dnl * 'sparc' and 'sparc64' are different canonical names, because code for +dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code +dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit +dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit +dnl mode, but not both. +dnl * 'mips' and 'mipsn32' are different canonical names, because they use +dnl different argument passing and return conventions for C functions, and +dnl although the instruction set of 'mips' is a large subset of the +dnl instruction set of 'mipsn32'. +dnl * 'mipsn32' and 'mips64' are different canonical names, because they use +dnl different sizes for the C types like 'int' and 'void *', and although +dnl the instruction sets of 'mipsn32' and 'mips64' are the same. +dnl * The same canonical name is used for different endiannesses. You can +dnl determine the endianness through preprocessor symbols: +dnl - 'arm': test __ARMEL__. +dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL. +dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN. +dnl * The same name 'i386' is used for CPUs of type i386, i486, i586 +dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because +dnl - Instructions that do not exist on all of these CPUs (cmpxchg, +dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your +dnl assembly language source files use such instructions, you will +dnl need to make the distinction. +dnl - Speed of execution of the common instruction set is reasonable across +dnl the entire family of CPUs. If you have assembly language source files +dnl that are optimized for particular CPU types (like GNU gmp has), you +dnl will need to make the distinction. +dnl See . +AC_DEFUN([gl_HOST_CPU_C_ABI], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_C_ASM]) + AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi], + [case "$host_cpu" in + +changequote(,)dnl + i[34567]86 ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=i386 + ;; + + x86_64 ) + # On x86_64 systems, the C compiler may be generating code in one of + # these ABIs: + # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. + # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 + # with native Windows (mingw, MSVC). + # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (defined __x86_64__ || defined __amd64__ \ + || defined _M_X64 || defined _M_AMD64) + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=x86_64-x32], + [gl_cv_host_cpu_c_abi=x86_64])], + [gl_cv_host_cpu_c_abi=i386]) + ;; + +changequote(,)dnl + alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] ) +changequote([,])dnl + gl_cv_host_cpu_c_abi=alpha + ;; + + arm* | aarch64 ) + # Assume arm with EABI. + # On arm64 systems, the C compiler may be generating code in one of + # these ABIs: + # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. + # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. + # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __aarch64__ + int ok; + #else + error fail + #endif + ]])], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __ILP32__ || defined _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=arm64-ilp32], + [gl_cv_host_cpu_c_abi=arm64])], + [# Don't distinguish little-endian and big-endian arm, since they + # don't require different machine code for simple operations and + # since the user can distinguish them through the preprocessor + # defines __ARMEL__ vs. __ARMEB__. + # But distinguish arm which passes floating-point arguments and + # return values in integer registers (r0, r1, ...) - this is + # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which + # passes them in float registers (s0, s1, ...) and double registers + # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer + # sets the preprocessor defines __ARM_PCS (for the first case) and + # __ARM_PCS_VFP (for the second case), but older GCC does not. + echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c + # Look for a reference to the register d0 in the .s file. + AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1 + if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then + gl_cv_host_cpu_c_abi=armhf + else + gl_cv_host_cpu_c_abi=arm + fi + rm -f conftest* + ]) + ;; + + hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) + # On hppa, the C compiler may be generating 32-bit code or 64-bit + # code. In the latter case, it defines _LP64 and __LP64__. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef __LP64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=hppa64], + [gl_cv_host_cpu_c_abi=hppa]) + ;; + + ia64* ) + # On ia64 on HP-UX, the C compiler may be generating 64-bit code or + # 32-bit code. In the latter case, it defines _ILP32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _ILP32 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=ia64-ilp32], + [gl_cv_host_cpu_c_abi=ia64]) + ;; + + mips* ) + # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this + # at 32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mips64], + [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIN32. + # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but + # may later get defined by ), and _MIPS_SIM == _ABIO32. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if (_MIPS_SIM == _ABIN32) + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=mipsn32], + [gl_cv_host_cpu_c_abi=mips])]) + ;; + + powerpc* ) + # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. + # No need to distinguish them here; the caller may distinguish + # them based on the OS. + # On powerpc64 systems, the C compiler may still be generating + # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may + # be generating 64-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __powerpc64__ || defined _ARCH_PPC64 + int ok; + #else + error fail + #endif + ]])], + [# On powerpc64, there are two ABIs on Linux: The AIX compatible + # one and the ELFv2 one. The latter defines _CALL_ELF=2. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined _CALL_ELF && _CALL_ELF == 2 + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=powerpc64-elfv2], + [gl_cv_host_cpu_c_abi=powerpc64]) + ], + [gl_cv_host_cpu_c_abi=powerpc]) + ;; + + rs6000 ) + gl_cv_host_cpu_c_abi=powerpc + ;; + + riscv32 | riscv64 ) + # There are 2 architectures (with variants): rv32* and rv64*. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if __riscv_xlen == 64 + int ok; + #else + error fail + #endif + ]])], + [cpu=riscv64], + [cpu=riscv32]) + # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. + # Size of 'long' and 'void *': + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ + int ok; + #else + error fail + #endif + ]])], + [main_abi=lp64], + [main_abi=ilp32]) + # Float ABIs: + # __riscv_float_abi_double: + # 'float' and 'double' are passed in floating-point registers. + # __riscv_float_abi_single: + # 'float' are passed in floating-point registers. + # __riscv_float_abi_soft: + # No values are passed in floating-point registers. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_double + int ok; + #else + error fail + #endif + ]])], + [float_abi=d], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __riscv_float_abi_single + int ok; + #else + error fail + #endif + ]])], + [float_abi=f], + [float_abi='']) + ]) + gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}" + ;; + + s390* ) + # On s390x, the C compiler may be generating 64-bit (= s390x) code + # or 31-bit (= s390) code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __LP64__ || defined __s390x__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=s390x], + [gl_cv_host_cpu_c_abi=s390]) + ;; + + sparc | sparc64 ) + # UltraSPARCs running Linux have `uname -m` = "sparc64", but the + # C compiler still generates 32-bit code. + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#if defined __sparcv9 || defined __arch64__ + int ok; + #else + error fail + #endif + ]])], + [gl_cv_host_cpu_c_abi=sparc64], + [gl_cv_host_cpu_c_abi=sparc]) + ;; + + *) + gl_cv_host_cpu_c_abi="$host_cpu" + ;; + esac + ]) + + dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same. + HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'` + HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi" + AC_SUBST([HOST_CPU]) + AC_SUBST([HOST_CPU_C_ABI]) + + # This was + # AC_DEFINE_UNQUOTED([__${HOST_CPU}__]) + # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__]) + # earlier, but KAI C++ 3.2d doesn't like this. + sed -e 's/-/_/g' >> confdefs.h <. - m4_ifdef([gl_ICONV_H_DEFAULTS], - [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) - if test -n "$am_cv_proto_iconv_arg1"; then - ICONV_CONST="const" - fi - ]) + else + dnl When compiling GNU libiconv on a system that does not have iconv yet, + dnl pick the POSIX compliant declaration without 'const'. + am_cv_proto_iconv_arg1="" fi + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], + [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated . + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + ]) ]) diff -Nru alsa-utils-1.2.2/m4/intlmacosx.m4 alsa-utils-1.2.6/m4/intlmacosx.m4 --- alsa-utils-1.2.2/m4/intlmacosx.m4 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/m4/intlmacosx.m4 2021-12-06 11:44:41.000000000 +0000 @@ -0,0 +1,65 @@ +# intlmacosx.m4 serial 8 (gettext-0.20.2) +dnl Copyright (C) 2004-2014, 2016, 2019-2020 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. +dnl +dnl This file can be used in projects which are not available under +dnl the GNU General Public License or the GNU Lesser General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Lesser General Public License, and the rest of the GNU +dnl gettext package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Checks for special options needed on Mac OS X. +dnl Defines INTL_MACOSX_LIBS. +AC_DEFUN([gt_INTL_MACOSX], +[ + dnl Check for API introduced in Mac OS X 10.4. + AC_CACHE_CHECK([for CFPreferencesCopyAppValue], + [gt_cv_func_CFPreferencesCopyAppValue], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFPreferencesCopyAppValue(NULL, NULL)]])], + [gt_cv_func_CFPreferencesCopyAppValue=yes], + [gt_cv_func_CFPreferencesCopyAppValue=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then + AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], + [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + fi + dnl Don't check for the API introduced in Mac OS X 10.5, CFLocaleCopyCurrent, + dnl because in macOS 10.13.4 it has the following behaviour: + dnl When two or more languages are specified in the + dnl "System Preferences > Language & Region > Preferred Languages" panel, + dnl it returns en_CC where CC is the territory (even when English is not among + dnl the preferred languages!). What we want instead is what + dnl CFLocaleCopyCurrent returned in earlier macOS releases and what + dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the + dnl first among the preferred languages and CC is the territory. + AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages], + [gt_save_LIBS="$LIBS" + LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[CFLocaleCopyPreferredLanguages();]])], + [gt_cv_func_CFLocaleCopyPreferredLanguages=yes], + [gt_cv_func_CFLocaleCopyPreferredLanguages=no]) + LIBS="$gt_save_LIBS"]) + if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1], + [Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.]) + fi + INTL_MACOSX_LIBS= + if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ + || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then + INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" + fi + AC_SUBST([INTL_MACOSX_LIBS]) +]) diff -Nru alsa-utils-1.2.2/m4/lib-ld.m4 alsa-utils-1.2.6/m4/lib-ld.m4 --- alsa-utils-1.2.2/m4/lib-ld.m4 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/m4/lib-ld.m4 2021-12-06 11:44:41.000000000 +0000 @@ -1,5 +1,5 @@ -# lib-ld.m4 serial 6 -dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc. +# lib-ld.m4 serial 9 +dnl Copyright (C) 1996-2003, 2009-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -47,73 +47,122 @@ } fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. +if test -n "$LD"; then + AC_MSG_CHECKING([for ld]) +elif test "$GCC" = yes; then AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` - while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi -AC_CACHE_VAL([acl_cv_path_LD], -[if test -z "$LD"; then - acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$acl_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 &5 | tr -d '\015'` ;; + *) + acl_output=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $acl_output in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` + while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do + acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` + done + # Got the pathname. No search in PATH is needed. + acl_cv_path_LD="$acl_output" + ac_prog= + ;; + "") + # If it fails, then pretend we aren't using GCC. + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; esac fi - done - IFS="$acl_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_cv_path_LD" + if test -n "$ac_prog"; then + # Search for $ac_prog in $PATH. + acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$acl_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some variants of GNU ld only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$acl_cv_path_LD" -v 2>&1 = 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) + dnl Complain if config.rpath is missing. + AC_REQUIRE_AUX_FILE([config.rpath]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host @@ -187,17 +187,17 @@ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) - dnl Autoconf >= 2.61 supports dots in --with options. - pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) - AC_ARG_WITH(P_A_C_K[-prefix], -[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], + AC_ARG_WITH(PACK[-prefix], +[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib + --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no @@ -206,17 +206,23 @@ AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" + eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" + eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi + additional_libdir2="$withval/$acl_libdirstem2" + additional_libdir3="$withval/$acl_libdirstem3" fi fi ]) + if test "X$additional_libdir2" = "X$additional_libdir"; then + additional_libdir2= + fi + if test "X$additional_libdir3" = "X$additional_libdir"; then + additional_libdir3= + fi dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= @@ -272,48 +278,54 @@ shrext= fi if test $use_additional = yes; then - dir="$additional_libdir" - dnl The same code as in the loop below: - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" + for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do + if test "X$found_dir" = "X"; then + eval dir=\$$additional_libdir_variable + if test -n "$dir"; then + dnl The same code as in the loop below: + dnl First look for a shared library. + if test -n "$acl_shlibext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then + found_dir="$dir" + found_so="$dir/$libname$shrext" + else + if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then + ver=`(cd "$dir" && \ + for f in "$libname$shrext".*; do echo "$f"; done \ + | sed -e "s,^$libname$shrext\\\\.,," \ + | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ + | sed 1q ) 2>/dev/null` + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then + found_dir="$dir" + found_so="$dir/$libname$shrext.$ver" + fi + else + eval library_names=\"$acl_library_names_spec\" + for f in $library_names; do + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then + found_dir="$dir" + found_so="$dir/$f" + break + fi + done + fi + fi fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then + dnl Then look for a static library. + if test "X$found_dir" = "X"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" - found_so="$dir/$f" - break + found_a="$dir/$libname.$acl_libext" fi - done + fi + if test "X$found_dir" != "X"; then + if test -f "$dir/$libname.la"; then + found_la="$dir/$libname.la" + fi + fi fi fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi + done fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do @@ -323,7 +335,7 @@ dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then + if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else @@ -333,14 +345,14 @@ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then + if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do - if test -f "$dir/$f"; then + if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break @@ -351,7 +363,7 @@ fi dnl Then look for a static library. if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then + if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi @@ -377,7 +389,8 @@ dnl standard /usr/lib. if test "$enable_rpath" = no \ || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then + || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ + || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else @@ -477,6 +490,13 @@ fi additional_includedir="$basedir/include" ;; + */$acl_libdirstem3 | */$acl_libdirstem3/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` + if test "$name" = '$1'; then + LIB[]NAME[]_PREFIX="$basedir" + fi + additional_includedir="$basedir/include" + ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. @@ -527,19 +547,21 @@ for dep in $dependency_libs; do case "$dep" in -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then + if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ + && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then + if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ + || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; @@ -550,29 +572,29 @@ haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then + if test "X$x" = "X-L$dependency_libdir"; then haveit=yes break fi done if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + if test -d "$dependency_libdir"; then + dnl Really add $dependency_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir" fi fi fi @@ -670,7 +692,6 @@ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi - popdef([P_A_C_K]) popdef([PACKLIBS]) popdef([PACKUP]) popdef([PACK]) @@ -721,7 +742,8 @@ dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= @@ -731,7 +753,8 @@ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then + && test "X$dir" != "X/usr/$acl_libdirstem2" \ + && test "X$dir" != "X/usr/$acl_libdirstem3"; then rpathdirs="$rpathdirs $dir" fi next= ;; diff -Nru alsa-utils-1.2.2/m4/lib-prefix.m4 alsa-utils-1.2.6/m4/lib-prefix.m4 --- alsa-utils-1.2.2/m4/lib-prefix.m4 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/m4/lib-prefix.m4 2021-12-06 11:44:41.000000000 +0000 @@ -1,18 +1,11 @@ -# lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc. +# lib-prefix.m4 serial 17 +dnl Copyright (C) 2001-2005, 2008-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. -dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -dnl require excessive bracketing. -ifdef([AC_HELP_STRING], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) - dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed @@ -32,9 +25,9 @@ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], + AC_ARG_WITH([lib-prefix], +[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir]], [ if test "X$withval" = "Xno"; then use_additional=no @@ -154,71 +147,174 @@ ]) dnl AC_LIB_PREPARE_MULTILIB creates -dnl - a variable acl_libdirstem, containing the basename of the libdir, either -dnl "lib" or "lib64" or "lib/64", -dnl - a variable acl_libdirstem2, as a secondary possible value for -dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or -dnl "lib/amd64". +dnl - a function acl_is_expected_elfclass, that tests whether standard input +dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI, +dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing +dnl the basename of the libdir to try in turn, either "lib" or "lib64" or +dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar. AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ - dnl There is no formal standard regarding lib and lib64. - dnl On glibc systems, the current practice is that on a system supporting + dnl There is no formal standard regarding lib, lib32, and lib64. + dnl On most glibc systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine - dnl the compiler's default mode by looking at the compiler's library search - dnl path. If at least one of its elements ends in /lib64 or points to a - dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. - dnl Otherwise we use the default, namely "lib". + dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on + dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go + dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib. + dnl We determine the compiler's default mode by looking at the compiler's + dnl library search path. If at least one of its elements ends in /lib64 or + dnl points to a directory whose absolute pathname ends in /lib64, we use that + dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default, + dnl namely "lib". dnl On Solaris systems, the current practice is that on a system supporting dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. AC_REQUIRE([AC_CANONICAL_HOST]) - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment - dnl . - dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." - dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the - dnl symlink is missing, so we set acl_libdirstem2 too. - AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], - [AC_EGREP_CPP([sixtyfour bits], [ -#ifdef _LP64 -sixtyfour bits -#endif - ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) - ]) - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT]) + + AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf], + [AC_EGREP_CPP([Extensible Linking Format], + [#ifdef __ELF__ + Extensible Linking Format + #endif + ], + [gl_cv_elf=yes], + [gl_cv_elf=no]) + ]) + if test $gl_cv_elf; then + # Extract the ELF class of a file (5th byte) in decimal. + # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header + if od -A x < /dev/null >/dev/null 2>/dev/null; then + # Use POSIX od. + func_elfclass () + { + od -A n -t d1 -j 4 -N 1 + } + else + # Use BSD hexdump. + func_elfclass () + { + dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' + echo + } + fi +changequote(,)dnl + case $HOST_CPU_C_ABI_32BIT in + yes) + # 32-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 1 + } + ;; + no) + # 64-bit ABI. + acl_is_expected_elfclass () + { + test "`func_elfclass | sed -e 's/[ ]//g'`" = 2 + } + ;; + *) + # Unknown. + acl_is_expected_elfclass () + { + : + } + ;; + esac +changequote([,])dnl + else + acl_is_expected_elfclass () + { + : + } + fi + + dnl Allow the user to override the result by setting acl_cv_libdirstems. + AC_CACHE_CHECK([for the common suffixes of directories in the library search path], + [acl_cv_libdirstems], + [dnl Try 'lib' first, because that's the default for libdir in GNU, see + dnl . + acl_libdirstem=lib + acl_libdirstem2= + acl_libdirstem3= + case "$host_os" in + solaris*) + dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment + dnl . + dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." + dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the + dnl symlink is missing, so we set acl_libdirstem2 too. + if test $HOST_CPU_C_ABI_32BIT = no; then + acl_libdirstem2=lib/64 + case "$host_cpu" in + sparc*) acl_libdirstem3=lib/sparcv9 ;; + i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; + esac + fi + ;; + *) + dnl If $CC generates code for a 32-bit ABI, the libraries are + dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64. + dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries + dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32. + dnl Find the compiler's search path. However, non-system compilers + dnl sometimes have odd library search paths. But we can't simply invoke + dnl '/usr/bin/gcc -print-search-dirs' because that would not take into + dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS. + searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ + | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` + if test $HOST_CPU_C_ABI_32BIT != no; then + # 32-bit or unknown ABI. + if test -d /usr/lib32; then + acl_libdirstem2=lib32 + fi + fi + if test $HOST_CPU_C_ABI_32BIT != yes; then + # 64-bit or unknown ABI. + if test -d /usr/lib64; then + acl_libdirstem3=lib64 + fi + fi + if test -n "$searchpath"; then + acl_save_IFS="${IFS= }"; IFS=":" + for searchdir in $searchpath; do + if test -d "$searchdir"; then + case "$searchdir" in + */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; + */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; + */../ | */.. ) + # Better ignore directories of this form. They are misleading. + ;; + *) searchdir=`cd "$searchdir" && pwd` + case "$searchdir" in + */lib32 ) acl_libdirstem2=lib32 ;; + */lib64 ) acl_libdirstem3=lib64 ;; + esac ;; + esac + fi + done + IFS="$acl_save_IFS" + if test $HOST_CPU_C_ABI_32BIT = yes; then + # 32-bit ABI. + acl_libdirstem3= + fi + if test $HOST_CPU_C_ABI_32BIT = no; then + # 64-bit ABI. + acl_libdirstem2= + fi + fi + ;; + esac + test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" + test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" + acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" + ]) + dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and + dnl acl_libdirstem3. +changequote(,)dnl + acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` + acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` + acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` +changequote([,])dnl ]) diff -Nru alsa-utils-1.2.2/m4/nls.m4 alsa-utils-1.2.6/m4/nls.m4 --- alsa-utils-1.2.2/m4/nls.m4 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/m4/nls.m4 2021-12-06 11:44:41.000000000 +0000 @@ -1,16 +1,16 @@ -# nls.m4 serial 5 (gettext-0.18) -dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software -dnl Foundation, Inc. +# nls.m4 serial 6 (gettext-0.20.2) +dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016, 2019-2020 Free +dnl Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public +dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU +dnl by the GNU Lesser General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. diff -Nru alsa-utils-1.2.2/m4/po.m4 alsa-utils-1.2.6/m4/po.m4 --- alsa-utils-1.2.2/m4/po.m4 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/m4/po.m4 2021-12-06 11:44:41.000000000 +0000 @@ -1,15 +1,15 @@ -# po.m4 serial 24 (gettext-0.19) -dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc. +# po.m4 serial 31 (gettext-0.20.2) +dnl Copyright (C) 1995-2014, 2016, 2018-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public +dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU +dnl by the GNU Lesser General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. @@ -30,7 +30,7 @@ dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) + AC_SUBST([GETTEXT_MACRO_VERSION], [0.20]) dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. @@ -46,13 +46,6 @@ dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([MSGFMT_015]) -changequote(,)dnl case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; *) GMSGFMT_015=$GMSGFMT ;; @@ -83,11 +76,21 @@ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - dnl Installation directories. - dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we - dnl have to define it here, so that it can be used in po/Makefile. - test -n "$localedir" || localedir='${datadir}/locale' - AC_SUBST([localedir]) + dnl Test whether it is GNU msgmerge >= 0.20. + if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' + else + dnl Test whether it is GNU msgmerge >= 0.12. + if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then + MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' + else + dnl With these old versions, $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) is + dnl slow. But this is not a big problem, as such old gettext versions are + dnl hardly in use any more. + MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' + fi + fi + AC_SUBST([MSGMERGE_FOR_MSGFMT_OPTION]) dnl Support for AM_XGETTEXT_OPTION. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= @@ -130,14 +133,11 @@ if test -n "$OBSOLETE_ALL_LINGUAS"; then test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' + ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS fi # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) @@ -208,9 +208,8 @@ esac done]], [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' + # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. + OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" # Capture the value of LINGUAS because we need it to compute CATALOGS. LINGUAS="${LINGUAS-%UNSET%}" ]) @@ -311,15 +310,13 @@ fi if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then # The LINGUAS file contains the set of available languages. - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` + ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` - ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` + ALL_LINGUAS=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` fi - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) # Compute UPDATEPOFILES @@ -329,9 +326,9 @@ # Compute GMOFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) # Compute PROPERTIESFILES - # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).properties) # Compute CLASSFILES - # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) + # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(DOMAIN)_$(lang).class) # Compute QMFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) # Compute MSGFILES @@ -356,8 +353,8 @@ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" DUMMYPOFILES="$DUMMYPOFILES $lang.nop" GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" - CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" + PROPERTIESFILES="$PROPERTIESFILES \$(srcdir)/\$(DOMAIN)_$lang.properties" + CLASSFILES="$CLASSFILES \$(srcdir)/\$(DOMAIN)_$lang.class" QMFILES="$QMFILES $srcdirpre$lang.qm" frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" diff -Nru alsa-utils-1.2.2/m4/progtest.m4 alsa-utils-1.2.6/m4/progtest.m4 --- alsa-utils-1.2.2/m4/progtest.m4 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/m4/progtest.m4 2021-12-06 11:44:41.000000000 +0000 @@ -1,15 +1,15 @@ -# progtest.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc. +# progtest.m4 serial 8 (gettext-0.20.2) +dnl Copyright (C) 1996-2003, 2005, 2008-2020 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl dnl This file can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public +dnl the GNU General Public License or the GNU Lesser General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU +dnl by the GNU Lesser General Public License, and the rest of the GNU dnl gettext package is covered by the GNU General Public License. dnl They are *not* in the public domain. diff -Nru alsa-utils-1.2.2/missing alsa-utils-1.2.6/missing --- alsa-utils-1.2.2/missing 2020-02-19 12:07:14.000000000 +0000 +++ alsa-utils-1.2.6/missing 2021-12-06 11:44:44.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru alsa-utils-1.2.2/po/LINGUAS alsa-utils-1.2.6/po/LINGUAS --- alsa-utils-1.2.2/po/LINGUAS 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/po/LINGUAS 2021-12-06 10:17:28.000000000 +0000 @@ -1 +1 @@ -de fr ja +de eu fr ja sk diff -Nru alsa-utils-1.2.2/po/Makefile.in.in alsa-utils-1.2.6/po/Makefile.in.in --- alsa-utils-1.2.2/po/Makefile.in.in 2020-02-19 12:07:10.000000000 +0000 +++ alsa-utils-1.2.6/po/Makefile.in.in 2021-12-06 11:44:41.000000000 +0000 @@ -1,13 +1,14 @@ # Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper +# Copyright (C) 1995-2000 Ulrich Drepper +# Copyright (C) 2000-2020 Free Software Foundation, Inc. # # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. This file is offered as-is, # without any warranty. # -# Origin: gettext-0.19.8 -GETTEXT_MACRO_VERSION = 0.19 +# Origin: gettext-0.21 +GETTEXT_MACRO_VERSION = 0.20 PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -52,16 +53,13 @@ GMSGFMT_no = @GMSGFMT@ GMSGFMT_yes = @GMSGFMT_015@ GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT)) -MSGFMT_ = @MSGFMT@ -MSGFMT_no = @MSGFMT@ -MSGFMT_yes = @MSGFMT_015@ -MSGFMT = $(MSGFMT_$(USE_MSGCTXT)) XGETTEXT_ = @XGETTEXT@ XGETTEXT_no = @XGETTEXT@ XGETTEXT_yes = @XGETTEXT_015@ XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT)) -MSGMERGE = msgmerge +MSGMERGE = @MSGMERGE@ MSGMERGE_UPDATE = @MSGMERGE@ --update +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ MSGINIT = msginit MSGCONV = msgconv MSGFILTER = msgfilter @@ -92,27 +90,44 @@ # Makevars gets inserted here. (Don't remove this line!) -.SUFFIXES: -.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update +all: all-@USE_NLS@ -.po.mo: - @echo "$(MSGFMT) -c -o $@ $<"; \ - $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ +.SUFFIXES: +.SUFFIXES: .po .gmo .sed .sin .nop .po-create .po-update + +# The .pot file, stamp-po, .po files, and .gmo files appear in release tarballs. +# The GNU Coding Standards say in +# : +# "GNU distributions usually contain some files which are not source files +# ... . Since these files normally appear in the source directory, they +# should always appear in the source directory, not in the build directory. +# So Makefile rules to update them should put the updated files in the +# source directory." +# Therefore we put these files in the source directory, not the build directory. + +# During .po -> .gmo conversion, take into account the most recent changes to +# the .pot file. This eliminates the need to update the .po files when the +# .pot file has changed, which would be troublesome if the .po files are put +# under version control. +$(GMOFILES): $(srcdir)/$(DOMAIN).pot .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + echo "$${cdcmd}rm -f $${lang}.gmo && $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.1po && rm -f $${lang}.1po"; \ + cd $(srcdir) && \ + rm -f $${lang}.gmo && \ + $(MSGMERGE) $(MSGMERGE_FOR_MSGFMT_OPTION) -o $${lang}.1po $${lang}.po $(DOMAIN).pot && \ + $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.1po && \ + mv t-$${lang}.gmo $${lang}.gmo && \ + rm -f $${lang}.1po .sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@ -all: all-@USE_NLS@ - -all-yes: stamp-po +all-yes: $(srcdir)/stamp-po all-no: # Ensure that the gettext macros and this Makefile.in.in are in sync. @@ -126,24 +141,24 @@ # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because # we don't want to bother translators with empty POT files). We assume that # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty. -# In this case, stamp-po is a nop (i.e. a phony target). +# In this case, $(srcdir)/stamp-po is a nop (i.e. a phony target). -# stamp-po is a timestamp denoting the last time at which the CATALOGS have -# been loosely updated. Its purpose is that when a developer or translator -# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, -# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent -# invocations of "make" will do nothing. This timestamp would not be necessary -# if updating the $(CATALOGS) would always touch them; however, the rule for -# $(POFILES) has been designed to not touch files that don't need to be -# changed. -stamp-po: $(srcdir)/$(DOMAIN).pot +# $(srcdir)/stamp-po is a timestamp denoting the last time at which the CATALOGS +# have been loosely updated. Its purpose is that when a developer or translator +# checks out the package from a version control system, and the $(DOMAIN).pot +# file is not under version control, "make" will update the $(DOMAIN).pot and +# the $(CATALOGS), but subsequent invocations of "make" will do nothing. This +# timestamp would not be necessary if updating the $(CATALOGS) would always +# touch them; however, the rule for $(POFILES) has been designed to not touch +# files that don't need to be changed. +$(srcdir)/stamp-po: $(srcdir)/$(DOMAIN).pot @$(CHECK_MACRO_VERSION) test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ - echo "touch stamp-po" && \ - echo timestamp > stamp-poT && \ - mv stamp-poT stamp-po; \ + echo "touch $(srcdir)/stamp-po" && \ + echo timestamp > $(srcdir)/stamp-poT && \ + mv $(srcdir)/stamp-poT $(srcdir)/stamp-po; \ } # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', @@ -159,11 +174,9 @@ package_gnu="$(PACKAGE_GNU)"; \ test -n "$$package_gnu" || { \ if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ - LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \ - -size -10000000c -exec grep 'GNU @PACKAGE@' \ - /dev/null '{}' ';' 2>/dev/null; \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep -i 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ else \ - LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ + LC_ALL=C grep -i 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ fi; \ } | grep -v 'libtool:' >/dev/null; then \ package_gnu=yes; \ @@ -184,26 +197,29 @@ case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --msgid-bugs-address="$$msgid_bugs_address" \ + $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ *) \ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ + --add-comments=TRANSLATORS: \ --files-from=$(srcdir)/POTFILES.in \ --copyright-holder='$(COPYRIGHT_HOLDER)' \ --package-name="$${package_prefix}@PACKAGE@" \ --package-version='@VERSION@' \ --msgid-bugs-address="$$msgid_bugs_address" \ + $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \ ;; \ esac test ! -f $(DOMAIN).po || { \ if test -f $(srcdir)/$(DOMAIN).pot-header; then \ sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \ - cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \ - rm -f $(DOMAIN).1po; \ + cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po && \ + rm -f $(DOMAIN).1po \ + || exit 1; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ @@ -228,17 +244,19 @@ # This target rebuilds a PO file if $(DOMAIN).pot has changed. # Note that a PO file is not touched if it doesn't need to be changed. $(POFILES): $(POFILESDEPS) + @test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ - test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot"; \ cd $(srcdir) \ - && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ + 0.1[6-7] | 0.1[6-7].*) \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --previous $${lang}.po $(DOMAIN).pot;; \ *) \ - $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} --previous $${lang}.po $(DOMAIN).pot;; \ esac; \ }; \ else \ @@ -373,34 +391,41 @@ info dvi ps pdf html tags TAGS ctags CTAGS ID: +install-dvi install-ps install-pdf install-html: + mostlyclean: rm -f remove-potcdate.sed - rm -f stamp-poT + rm -f $(srcdir)/stamp-poT rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po rm -fr *.o clean: mostlyclean distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo + rm -f Makefile Makefile.in POTFILES maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." - rm -f stamp-po $(GMOFILES) + rm -f $(srcdir)/$(DOMAIN).pot $(srcdir)/stamp-po $(GMOFILES) distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) dist distdir: test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS) @$(MAKE) dist2 # This is a separate target because 'update-po' must be executed before. -dist2: stamp-po $(DISTFILES) - dists="$(DISTFILES)"; \ +dist2: $(srcdir)/stamp-po $(DISTFILES) + @dists="$(DISTFILES)"; \ if test "$(PACKAGE)" = "gettext-tools"; then \ dists="$$dists Makevars.template"; \ fi; \ if test -f $(srcdir)/$(DOMAIN).pot; then \ dists="$$dists $(DOMAIN).pot stamp-po"; \ + else \ + case $(XGETTEXT) in \ + :) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because a suitable 'xgettext' program was not found in PATH." 1>&2;; \ + *) echo "Warning: Creating a tarball without '$(DOMAIN).pot', because 'xgettext' found no strings to extract. Check the contents of the POTFILES.in file and the XGETTEXT_OPTIONS in the Makevars file." 1>&2;; \ + esac; \ fi; \ if test -f $(srcdir)/ChangeLog; then \ dists="$$dists ChangeLog"; \ @@ -439,13 +464,15 @@ tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].*) \ $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + 0.1[6-7] | 0.1[6-7].*) \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ *) \ - $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang --previous -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ esac; \ }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ diff -Nru alsa-utils-1.2.2/po/Rules-quot alsa-utils-1.2.6/po/Rules-quot --- alsa-utils-1.2.2/po/Rules-quot 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/po/Rules-quot 2021-12-06 11:44:41.000000000 +0000 @@ -1,5 +1,9 @@ -# This file, Rules-quot, can be copied and used freely without restrictions. # Special Makefile rules for English message catalogs with quotation marks. +# +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# This file, Rules-quot, and its auxiliary files (listed under +# DISTFILES.common.extra1) are free software; the Free Software Foundation +# gives unlimited permission to use, copy, distribute, and modify them. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot diff -Nru alsa-utils-1.2.2/po/alsa-utils.pot alsa-utils-1.2.6/po/alsa-utils.pot --- alsa-utils-1.2.2/po/alsa-utils.pot 2020-02-19 12:07:36.000000000 +0000 +++ alsa-utils-1.2.6/po/alsa-utils.pot 2021-12-06 11:44:59.000000000 +0000 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: alsa-utils 1.2.2\n" +"Project-Id-Version: alsa-utils 1.2.6\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 12:07+0000\n" +"POT-Creation-Date: 2021-12-06 11:44+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,58 +17,62 @@ "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: alsamixer/card_select.c:126 alsamixer/device_name.c:126 +#: alsamixer/card_select.c:77 alsamixer/device_name.c:127 msgid "Sound Card" msgstr "" -#: alsamixer/card_select.c:181 +#: alsamixer/card_select.c:115 msgid "(default)" msgstr "" -#: alsamixer/card_select.c:191 +#: alsamixer/card_select.c:125 msgid "cannot enumerate sound cards" msgstr "" -#: alsamixer/card_select.c:215 +#: alsamixer/card_select.c:151 msgid "enter device name..." msgstr "" -#: alsamixer/cli.c:40 +#: alsamixer/cli.c:43 msgid "Usage: alsamixer [options]" msgstr "" -#: alsamixer/cli.c:41 +#: alsamixer/cli.c:44 msgid "" "Useful options:\n" " -h, --help this help\n" " -c, --card=NUMBER sound card number or id\n" " -D, --device=NAME mixer device name\n" +" -m, --mouse enable mouse\n" +" -M, --no-mouse disable mouse\n" +" -f, --config=FILE configuration file\n" +" -F, --no-config do not load configuration file\n" " -V, --view=MODE starting view mode: playback/capture/all" msgstr "" -#: alsamixer/cli.c:46 +#: alsamixer/cli.c:53 msgid "" "Debugging options:\n" " -g, --no-color toggle using of colors\n" " -a, --abstraction=NAME mixer abstraction level: none/basic" msgstr "" -#: alsamixer/cli.c:77 +#: alsamixer/cli.c:88 #, c-format msgid "invalid card index: %s\n" msgstr "" -#: alsamixer/cli.c:103 +#: alsamixer/cli.c:130 #, c-format msgid "unknown abstraction level: %s\n" msgstr "" -#: alsamixer/cli.c:108 +#: alsamixer/cli.c:135 #, c-format msgid "unknown option: %c\n" msgstr "" -#: alsamixer/cli.c:110 +#: alsamixer/cli.c:137 msgid "try `alsamixer --help' for more information\n" msgstr "" @@ -81,138 +85,138 @@ msgid "%s: %s\n" msgstr "" -#: alsamixer/mixer_display.c:98 +#: alsamixer/mixer_display.c:99 msgid "Card:" msgstr "" -#: alsamixer/mixer_display.c:99 +#: alsamixer/mixer_display.c:100 msgid "Chip:" msgstr "" -#: alsamixer/mixer_display.c:100 +#: alsamixer/mixer_display.c:101 msgid "View:" msgstr "" -#: alsamixer/mixer_display.c:101 +#: alsamixer/mixer_display.c:102 msgid "Item:" msgstr "" -#: alsamixer/mixer_display.c:104 +#: alsamixer/mixer_display.c:105 msgid "F1: Help" msgstr "" -#: alsamixer/mixer_display.c:105 +#: alsamixer/mixer_display.c:106 msgid "F2: System information" msgstr "" -#: alsamixer/mixer_display.c:106 +#: alsamixer/mixer_display.c:107 msgid "F6: Select sound card" msgstr "" -#: alsamixer/mixer_display.c:107 +#: alsamixer/mixer_display.c:108 msgid "Esc: Exit" msgstr "" -#: alsamixer/mixer_display.c:174 +#: alsamixer/mixer_display.c:179 msgid "(unplugged)" msgstr "" -#: alsamixer/mixer_display.c:192 +#: alsamixer/mixer_display.c:197 msgid "Playback" msgstr "" -#: alsamixer/mixer_display.c:193 +#: alsamixer/mixer_display.c:198 msgid "Capture" msgstr "" -#: alsamixer/mixer_display.c:194 +#: alsamixer/mixer_display.c:199 msgid "All" msgstr "" -#: alsamixer/mixer_display.c:234 +#: alsamixer/mixer_display.c:240 msgid "mute" msgstr "" -#: alsamixer/mixer_display.c:275 alsamixer/mixer_display.c:285 +#: alsamixer/mixer_display.c:281 alsamixer/mixer_display.c:291 msgid "dB gain:" msgstr "" -#: alsamixer/mixer_display.c:285 +#: alsamixer/mixer_display.c:291 #, c-format msgid " [%s %s, %s]" msgstr "" -#: alsamixer/mixer_display.c:294 alsamixer/mixer_display.c:300 -#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:312 +#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:306 +#: alsamixer/mixer_display.c:312 alsamixer/mixer_display.c:318 msgid "Off" msgstr "" -#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:312 +#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:318 msgid "On" msgstr "" -#: alsamixer/mixer_display.c:363 +#: alsamixer/mixer_display.c:370 msgid "The sound device was unplugged." msgstr "" -#: alsamixer/mixer_display.c:364 +#: alsamixer/mixer_display.c:371 msgid "Press F6 to select another sound card." msgstr "" -#: alsamixer/mixer_display.c:379 +#: alsamixer/mixer_display.c:386 msgid "This sound device does not have any playback controls." msgstr "" -#: alsamixer/mixer_display.c:381 +#: alsamixer/mixer_display.c:388 msgid "This sound device does not have any capture controls." msgstr "" -#: alsamixer/mixer_display.c:383 +#: alsamixer/mixer_display.c:390 msgid "This sound device does not have any controls." msgstr "" #. TRANSLATORS: playback on; one character -#: alsamixer/mixer_display.c:516 alsamixer/mixer_display.c:521 +#: alsamixer/mixer_display.c:523 alsamixer/mixer_display.c:528 msgid "O" msgstr "" #. TRANSLATORS: playback muted; one character -#: alsamixer/mixer_display.c:518 alsamixer/mixer_display.c:522 +#: alsamixer/mixer_display.c:525 alsamixer/mixer_display.c:529 msgid "M" msgstr "" #. TRANSLATORS: "left"; no more than two characters -#: alsamixer/mixer_display.c:536 +#: alsamixer/mixer_display.c:545 msgid "L" msgstr "" #. TRANSLATORS: "right"; no more than two characters -#: alsamixer/mixer_display.c:540 +#: alsamixer/mixer_display.c:551 msgid "R" msgstr "" #. TRANSLATORS: no more than eight characters -#: alsamixer/mixer_display.c:542 +#: alsamixer/mixer_display.c:555 msgid "CAPTURE" msgstr "" -#: alsamixer/mixer_display.c:592 +#: alsamixer/mixer_display.c:611 msgid "Front" msgstr "" -#: alsamixer/mixer_display.c:595 +#: alsamixer/mixer_display.c:614 msgid "Rear" msgstr "" -#: alsamixer/mixer_display.c:598 speaker-test/speaker-test.c:124 +#: alsamixer/mixer_display.c:617 speaker-test/speaker-test.c:124 msgid "Center" msgstr "" -#: alsamixer/mixer_display.c:601 +#: alsamixer/mixer_display.c:620 msgid "Woofer" msgstr "" -#: alsamixer/mixer_display.c:604 +#: alsamixer/mixer_display.c:623 msgid "Side" msgstr "" @@ -344,11 +348,11 @@ msgid "Help" msgstr "" -#: alsamixer/proc_files.c:103 +#: alsamixer/proc_files.c:56 msgid "Select File" msgstr "" -#: alsamixer/textbox.c:52 alsamixer/textbox.c:66 +#: alsamixer/textbox.c:51 alsamixer/textbox.c:65 msgid "Error" msgstr "" @@ -425,7 +429,7 @@ " --fatal-errors treat all errors as fatal\n" msgstr "" -#: aplay/aplay.c:250 speaker-test/speaker-test.c:945 +#: aplay/aplay.c:250 speaker-test/speaker-test.c:961 #, c-format msgid "Recognized sample formats are:" msgstr "" @@ -505,483 +509,509 @@ msgid "value %i for channels is invalid" msgstr "" -#: aplay/aplay.c:629 +#: aplay/aplay.c:630 #, c-format msgid "wrong extended format '%s'" msgstr "" -#: aplay/aplay.c:637 +#: aplay/aplay.c:638 #, c-format msgid "invalid rate argument '%s'" msgstr "" -#: aplay/aplay.c:644 +#: aplay/aplay.c:645 #, c-format msgid "bad speed value %i" msgstr "" -#: aplay/aplay.c:650 +#: aplay/aplay.c:651 msgid "duration and samples arguments cannot be used together" msgstr "" -#: aplay/aplay.c:655 +#: aplay/aplay.c:656 #, c-format msgid "invalid duration argument '%s'" msgstr "" -#: aplay/aplay.c:662 +#: aplay/aplay.c:663 msgid "samples and duration arguments cannot be used together" msgstr "" -#: aplay/aplay.c:667 +#: aplay/aplay.c:668 #, c-format msgid "invalid samples argument '%s'" msgstr "" -#: aplay/aplay.c:679 +#: aplay/aplay.c:680 #, c-format msgid "invalid period time argument '%s'" msgstr "" -#: aplay/aplay.c:686 +#: aplay/aplay.c:687 #, c-format msgid "invalid buffer time argument '%s'" msgstr "" -#: aplay/aplay.c:693 +#: aplay/aplay.c:694 #, c-format msgid "invalid period size argument '%s'" msgstr "" -#: aplay/aplay.c:700 +#: aplay/aplay.c:701 #, c-format msgid "invalid buffer size argument '%s'" msgstr "" -#: aplay/aplay.c:707 +#: aplay/aplay.c:708 #, c-format msgid "invalid min available space argument '%s'" msgstr "" -#: aplay/aplay.c:714 +#: aplay/aplay.c:715 #, c-format msgid "invalid start delay argument '%s'" msgstr "" -#: aplay/aplay.c:721 +#: aplay/aplay.c:722 #, c-format msgid "invalid stop delay argument '%s'" msgstr "" -#: aplay/aplay.c:776 +#: aplay/aplay.c:777 #, c-format msgid "invalid test coef argument '%s'" msgstr "" -#: aplay/aplay.c:788 +#: aplay/aplay.c:789 #, c-format msgid "invalid max file time argument '%s'" msgstr "" -#: aplay/aplay.c:808 speaker-test/speaker-test.c:571 +#: aplay/aplay.c:809 speaker-test/speaker-test.c:587 #, c-format msgid "Unable to parse channel map string: %s\n" msgstr "" -#: aplay/aplay.c:814 +#: aplay/aplay.c:815 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "" -#: aplay/aplay.c:830 +#: aplay/aplay.c:831 #, c-format msgid "audio open error: %s" msgstr "" -#: aplay/aplay.c:835 +#: aplay/aplay.c:836 #, c-format msgid "info error: %s" msgstr "" -#: aplay/aplay.c:842 +#: aplay/aplay.c:843 #, c-format msgid "nonblock setting error: %s" msgstr "" -#: aplay/aplay.c:852 aplay/aplay.c:976 aplay/aplay.c:1266 aplay/aplay.c:1466 -#: aplay/aplay.c:1989 aplay/aplay.c:2019 +#: aplay/aplay.c:861 aplay/aplay.c:985 aplay/aplay.c:1275 aplay/aplay.c:1475 +#: aplay/aplay.c:2055 aplay/aplay.c:2085 msgid "not enough memory" msgstr "" -#: aplay/aplay.c:876 +#: aplay/aplay.c:885 #, c-format msgid "Cannot create process ID file %s: %s" msgstr "" -#: aplay/aplay.c:966 +#: aplay/aplay.c:975 #, c-format msgid "read error (called from line %i)" msgstr "" -#: aplay/aplay.c:1033 +#: aplay/aplay.c:1042 #, c-format msgid "unknown length of 'fmt ' chunk (read %u, should be %u at least)" msgstr "" -#: aplay/aplay.c:1044 +#: aplay/aplay.c:1053 #, c-format msgid "" "unknown length of extensible 'fmt ' chunk (read %u, should be %u at least)" msgstr "" -#: aplay/aplay.c:1049 +#: aplay/aplay.c:1058 msgid "wrong format tag in extensible 'fmt ' chunk" msgstr "" -#: aplay/aplay.c:1056 +#: aplay/aplay.c:1065 #, c-format msgid "can't play WAVE-file format 0x%04x which is not PCM or FLOAT encoded" msgstr "" -#: aplay/aplay.c:1061 +#: aplay/aplay.c:1070 #, c-format msgid "can't play WAVE-files with %d tracks" msgstr "" -#: aplay/aplay.c:1069 aplay/aplay.c:1195 +#: aplay/aplay.c:1078 aplay/aplay.c:1204 #, c-format msgid "Warning: format is changed to U8\n" msgstr "" -#: aplay/aplay.c:1079 aplay/aplay.c:1092 aplay/aplay.c:1103 +#: aplay/aplay.c:1088 aplay/aplay.c:1101 aplay/aplay.c:1112 #, c-format msgid "Warning: format is changed to %s\n" msgstr "" -#: aplay/aplay.c:1108 +#: aplay/aplay.c:1117 #, c-format msgid "" " can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)" msgstr "" -#: aplay/aplay.c:1131 +#: aplay/aplay.c:1140 #, c-format msgid " can't play WAVE-files with sample %d bits wide" msgstr "" -#: aplay/aplay.c:1189 +#: aplay/aplay.c:1198 #, c-format msgid "Warning: format is changed to MU_LAW\n" msgstr "" -#: aplay/aplay.c:1201 +#: aplay/aplay.c:1210 #, c-format msgid "Warning: format is changed to S16_BE\n" msgstr "" -#: aplay/aplay.c:1214 aplay/aplay.c:2304 aplay/aplay.c:2311 aplay/aplay.c:2836 +#: aplay/aplay.c:1223 aplay/aplay.c:2376 aplay/aplay.c:2383 aplay/aplay.c:2912 msgid "read error" msgstr "" -#: aplay/aplay.c:1244 +#: aplay/aplay.c:1253 msgid "Channel numbers don't match between hw_params and channel map" msgstr "" -#: aplay/aplay.c:1253 +#: aplay/aplay.c:1262 #, c-format msgid "Warning: unable to get channel map\n" msgstr "" -#: aplay/aplay.c:1287 +#: aplay/aplay.c:1296 #, c-format -msgid "Channel %d doesn't match with hw_parmas" +msgid "Channel %d doesn't match with hw_params" msgstr "" -#: aplay/aplay.c:1314 +#: aplay/aplay.c:1323 msgid "Broken configuration for this PCM: no configurations available" msgstr "" -#: aplay/aplay.c:1318 +#: aplay/aplay.c:1327 #, c-format msgid "HW Params of device \"%s\":\n" msgstr "" -#: aplay/aplay.c:1338 +#: aplay/aplay.c:1347 msgid "Access type not available" msgstr "" -#: aplay/aplay.c:1343 +#: aplay/aplay.c:1352 msgid "Sample format non available" msgstr "" -#: aplay/aplay.c:1349 +#: aplay/aplay.c:1358 msgid "Channels count non available" msgstr "" -#: aplay/aplay.c:1364 +#: aplay/aplay.c:1373 #, c-format msgid "Warning: rate is not accurate (requested = %iHz, got = %iHz)\n" msgstr "" -#: aplay/aplay.c:1370 +#: aplay/aplay.c:1379 #, c-format msgid " please, try the plug plugin %s\n" msgstr "" -#: aplay/aplay.c:1407 +#: aplay/aplay.c:1416 msgid "Unable to install hw params:" msgstr "" -#: aplay/aplay.c:1414 +#: aplay/aplay.c:1423 #, c-format msgid "Can't use period equal to buffer size (%lu == %lu)" msgstr "" -#: aplay/aplay.c:1420 +#: aplay/aplay.c:1429 msgid "Unable to get current sw params." msgstr "" -#: aplay/aplay.c:1449 +#: aplay/aplay.c:1458 msgid "unable to install sw params:" msgstr "" -#: aplay/aplay.c:1484 +#: aplay/aplay.c:1493 #, c-format msgid "snd_pcm_mmap_begin problem: %s" msgstr "" -#: aplay/aplay.c:1513 +#: aplay/aplay.c:1522 #, c-format msgid "stdin O_NONBLOCK flag setup failed\n" msgstr "" -#: aplay/aplay.c:1537 +#: aplay/aplay.c:1559 #, c-format msgid "\rPAUSE command ignored (no hw support)\n" msgstr "" -#: aplay/aplay.c:1545 +#: aplay/aplay.c:1567 #, c-format msgid "pause push error: %s" msgstr "" -#: aplay/aplay.c:1556 +#: aplay/aplay.c:1578 #, c-format msgid "pause release error: %s" msgstr "" -#: aplay/aplay.c:1572 +#: aplay/aplay.c:1594 #, c-format msgid "" "\r=== PAUSE === " msgstr "" -#: aplay/aplay.c:1614 +#: aplay/aplay.c:1636 #, c-format msgid "status error: %s" msgstr "" -#: aplay/aplay.c:1619 +#: aplay/aplay.c:1641 #, c-format msgid "fatal %s: %s" msgstr "" -#: aplay/aplay.c:1620 aplay/aplay.c:1631 aplay/aplay.c:1634 aplay/aplay.c:1642 +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1656 aplay/aplay.c:1664 msgid "underrun" msgstr "" -#: aplay/aplay.c:1620 aplay/aplay.c:1631 aplay/aplay.c:1642 +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1664 msgid "overrun" msgstr "" -#: aplay/aplay.c:1630 aplay/aplay.c:1641 +#: aplay/aplay.c:1652 aplay/aplay.c:1663 #, c-format msgid "%s!!! (at least %.3f ms long)\n" msgstr "" -#: aplay/aplay.c:1646 +#: aplay/aplay.c:1668 #, c-format msgid "Status:\n" msgstr "" -#: aplay/aplay.c:1650 +#: aplay/aplay.c:1672 #, c-format msgid "xrun: prepare error: %s" msgstr "" -#: aplay/aplay.c:1656 +#: aplay/aplay.c:1679 #, c-format msgid "Status(DRAINING):\n" msgstr "" -#: aplay/aplay.c:1660 +#: aplay/aplay.c:1683 #, c-format msgid "capture stream format change? attempting recover...\n" msgstr "" -#: aplay/aplay.c:1662 +#: aplay/aplay.c:1685 #, c-format msgid "xrun(DRAINING): prepare error: %s" msgstr "" -#: aplay/aplay.c:1669 +#: aplay/aplay.c:1692 #, c-format msgid "Status(R/W):\n" msgstr "" -#: aplay/aplay.c:1672 +#: aplay/aplay.c:1695 #, c-format msgid "read/write error, state = %s" msgstr "" -#: aplay/aplay.c:1682 +#: aplay/aplay.c:1705 #, c-format msgid "Suspended. Trying resume. " msgstr "" -#: aplay/aplay.c:1688 +#: aplay/aplay.c:1711 #, c-format msgid "Failed. Restarting stream. " msgstr "" -#: aplay/aplay.c:1691 +#: aplay/aplay.c:1714 #, c-format msgid "suspend: prepare error: %s" msgstr "" -#: aplay/aplay.c:1696 +#: aplay/aplay.c:1719 #, c-format msgid "Done.\n" msgstr "" -#: aplay/aplay.c:1718 +#: aplay/aplay.c:1741 #, c-format msgid " !clip " msgstr "" -#: aplay/aplay.c:1865 +#: aplay/aplay.c:1893 #, c-format msgid "Unsupported bit size %d.\n" msgstr "" -#: aplay/aplay.c:1899 +#: aplay/aplay.c:1929 #, c-format msgid "Max peak (%li samples): 0x%08x " msgstr "" -#: aplay/aplay.c:1933 +#: aplay/aplay.c:1970 #, c-format msgid "" "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer = " "%li\n" msgstr "" -#: aplay/aplay.c:2061 +#: aplay/aplay.c:1979 +#, c-format +msgid "" +"Suspicious status buffer position (%li total): avail = %li, delay = %li, " +"buffer = %li\n" +msgstr "" + +#: aplay/aplay.c:1983 +#, c-format +msgid "" +"Suspicious buffer position avail > delay (%li total): avail = %li, delay = " +"%li\n" +msgstr "" + +#: aplay/aplay.c:1987 +#, c-format +msgid "" +"Suspicious status buffer position avail > delay (%li total): avail = %li, " +"delay = %li\n" +msgstr "" + +#: aplay/aplay.c:2030 +#, c-format +msgid "Status(R/W) (standalone avail=%li delay=%li):\n" +msgstr "" + +#: aplay/aplay.c:2127 #, c-format msgid "write error: %s" msgstr "" -#: aplay/aplay.c:2109 +#: aplay/aplay.c:2175 #, c-format msgid "writev error: %s" msgstr "" -#: aplay/aplay.c:2153 +#: aplay/aplay.c:2221 #, c-format msgid "read error: %s" msgstr "" -#: aplay/aplay.c:2197 +#: aplay/aplay.c:2268 #, c-format msgid "readv error: %s" msgstr "" -#: aplay/aplay.c:2245 +#: aplay/aplay.c:2317 msgid "can't allocate buffer for silence" msgstr "" -#: aplay/aplay.c:2254 aplay/aplay.c:2482 aplay/aplay.c:2487 aplay/aplay.c:2537 -#: aplay/aplay.c:2546 aplay/aplay.c:2553 aplay/aplay.c:2563 aplay/aplay.c:2569 -#: aplay/aplay.c:2641 aplay/aplay.c:2671 aplay/aplay.c:2685 +#: aplay/aplay.c:2326 aplay/aplay.c:2554 aplay/aplay.c:2559 aplay/aplay.c:2611 +#: aplay/aplay.c:2620 aplay/aplay.c:2627 aplay/aplay.c:2637 aplay/aplay.c:2643 +#: aplay/aplay.c:2715 aplay/aplay.c:2745 aplay/aplay.c:2759 msgid "write error" msgstr "" -#: aplay/aplay.c:2267 +#: aplay/aplay.c:2339 #, c-format msgid "voc_pcm_flush - silence error" msgstr "" -#: aplay/aplay.c:2270 +#: aplay/aplay.c:2342 msgid "voc_pcm_flush error" msgstr "" -#: aplay/aplay.c:2295 +#: aplay/aplay.c:2367 msgid "malloc error" msgstr "" -#: aplay/aplay.c:2299 +#: aplay/aplay.c:2371 #, c-format msgid "Playing Creative Labs Channel file '%s'...\n" msgstr "" -#: aplay/aplay.c:2367 aplay/aplay.c:2462 +#: aplay/aplay.c:2439 aplay/aplay.c:2534 msgid "can't play packed .voc files" msgstr "" -#: aplay/aplay.c:2422 +#: aplay/aplay.c:2494 #, c-format msgid "can't play loops; %s isn't seekable\n" msgstr "" -#: aplay/aplay.c:2471 +#: aplay/aplay.c:2543 #, c-format msgid "unknown blocktype %d. terminate." msgstr "" -#: aplay/aplay.c:2605 +#: aplay/aplay.c:2679 #, c-format msgid "Wave doesn't support %s format..." msgstr "" -#: aplay/aplay.c:2665 +#: aplay/aplay.c:2739 #, c-format msgid "Sparc Audio doesn't support %s format..." msgstr "" -#: aplay/aplay.c:2740 +#: aplay/aplay.c:2814 msgid "Playing" msgstr "" -#: aplay/aplay.c:2740 +#: aplay/aplay.c:2814 msgid "Recording" msgstr "" -#: aplay/aplay.c:2744 +#: aplay/aplay.c:2818 #, c-format msgid "Rate %d Hz, " msgstr "" -#: aplay/aplay.c:2746 +#: aplay/aplay.c:2820 #, c-format msgid "Mono" msgstr "" -#: aplay/aplay.c:2748 +#: aplay/aplay.c:2822 #, c-format msgid "Stereo" msgstr "" -#: aplay/aplay.c:2750 +#: aplay/aplay.c:2824 #, c-format msgid "Channels %i" msgstr "" -#: aplay/aplay.c:3351 +#: aplay/aplay.c:3431 #, c-format msgid "You need to specify %u files" msgstr "" -#: aplay/aplay.c:3404 +#: aplay/aplay.c:3484 #, c-format msgid "You need to specify %d files" msgstr "" @@ -1112,7 +1142,7 @@ msgid "invalid sender address %s\n" msgstr "" -#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:290 +#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:303 #, c-format msgid "invalid destination address %s\n" msgstr "" @@ -1137,127 +1167,142 @@ msgid "Connection failed (%s)\n" msgstr "" -#: seq/aseqnet/aseqnet.c:164 +#: seq/aseqnet/aseqnet.c:171 #, c-format msgid "aseqnet - network client/server on ALSA sequencer\n" msgstr "" -#: seq/aseqnet/aseqnet.c:165 +#: seq/aseqnet/aseqnet.c:172 #, c-format msgid " Copyright (C) 1999 Takashi Iwai\n" msgstr "" -#: seq/aseqnet/aseqnet.c:166 +#: seq/aseqnet/aseqnet.c:173 #, c-format msgid "usage:\n" msgstr "" -#: seq/aseqnet/aseqnet.c:167 +#: seq/aseqnet/aseqnet.c:174 #, c-format msgid " server mode: aseqnet [-options]\n" msgstr "" -#: seq/aseqnet/aseqnet.c:168 +#: seq/aseqnet/aseqnet.c:175 #, c-format msgid " client mode: aseqnet [-options] server_host\n" msgstr "" -#: seq/aseqnet/aseqnet.c:169 +#: seq/aseqnet/aseqnet.c:176 #, c-format msgid "options:\n" msgstr "" -#: seq/aseqnet/aseqnet.c:170 +#: seq/aseqnet/aseqnet.c:177 +#, c-format +msgid " -6,--ipv6 : use IPv6 TCP protocol\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:178 #, c-format msgid " -p,--port # : specify TCP port (digit or service name)\n" msgstr "" -#: seq/aseqnet/aseqnet.c:171 +#: seq/aseqnet/aseqnet.c:179 #, c-format msgid " -s,--source addr : read from given addr (client:port)\n" msgstr "" -#: seq/aseqnet/aseqnet.c:172 +#: seq/aseqnet/aseqnet.c:180 #, c-format msgid " -d,--dest addr : write to given addr (client:port)\n" msgstr "" -#: seq/aseqnet/aseqnet.c:173 +#: seq/aseqnet/aseqnet.c:181 +#, c-format +msgid " -n,--name value : use a specific midi process name\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:182 #, c-format msgid " -v, --verbose : print verbose messages\n" msgstr "" -#: seq/aseqnet/aseqnet.c:174 +#: seq/aseqnet/aseqnet.c:183 #, c-format msgid " -i, --info : print certain received events\n" msgstr "" -#: seq/aseqnet/aseqnet.c:188 +#: seq/aseqnet/aseqnet.c:197 #, c-format msgid "can't malloc\n" msgstr "" -#: seq/aseqnet/aseqnet.c:213 +#: seq/aseqnet/aseqnet.c:222 #, c-format msgid "closing files..\n" msgstr "" -#: seq/aseqnet/aseqnet.c:272 +#: seq/aseqnet/aseqnet.c:285 #, c-format msgid "sequencer opened: %d:%d\n" msgstr "" -#: seq/aseqnet/aseqnet.c:279 +#: seq/aseqnet/aseqnet.c:292 #, c-format msgid "invalid source address %s\n" msgstr "" -#: seq/aseqnet/aseqnet.c:309 +#: seq/aseqnet/aseqnet.c:362 #, c-format -msgid "service '%s' is not found in /etc/services\n" +msgid "can't get address\n" msgstr "" -#: seq/aseqnet/aseqnet.c:377 +#: seq/aseqnet/aseqnet.c:376 seq/aseqnet/aseqnet.c:461 +#, c-format +msgid "connecting to: %s\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:414 #, c-format msgid "too many connections!\n" msgstr "" -#: seq/aseqnet/aseqnet.c:388 +#: seq/aseqnet/aseqnet.c:425 #, c-format msgid "accepted[%d]\n" msgstr "" -#: seq/aseqnet/aseqnet.c:411 +#: seq/aseqnet/aseqnet.c:447 #, c-format msgid "can't get address %s\n" msgstr "" -#: seq/aseqnet/aseqnet.c:422 +#: seq/aseqnet/aseqnet.c:475 #, c-format msgid "ok.. connected\n" msgstr "" -#: seq/aseqnet/aseqnet.c:518 +#: seq/aseqnet/aseqnet.c:574 #, c-format msgid "Channel %2d: Control event : %5d\n" msgstr "" -#: seq/aseqnet/aseqnet.c:522 +#: seq/aseqnet/aseqnet.c:578 #, c-format msgid "Channel %2d: Pitchbender : %5d\n" msgstr "" -#: seq/aseqnet/aseqnet.c:526 +#: seq/aseqnet/aseqnet.c:582 #, c-format msgid "Channel %2d: Note On event : %5d\n" msgstr "" -#: seq/aseqnet/aseqnet.c:530 +#: seq/aseqnet/aseqnet.c:586 #, c-format msgid "Channel %2d: Note Off event: %5d\n" msgstr "" -#: seq/aseqnet/aseqnet.c:585 +#: seq/aseqnet/aseqnet.c:641 #, c-format msgid "disconnected\n" msgstr "" @@ -1322,202 +1367,202 @@ msgid "Channel 16" msgstr "" -#: speaker-test/speaker-test.c:424 +#: speaker-test/speaker-test.c:440 #, c-format msgid "Broken configuration for playback: no configurations available: %s\n" msgstr "" -#: speaker-test/speaker-test.c:431 +#: speaker-test/speaker-test.c:447 #, c-format msgid "Access type not available for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:438 +#: speaker-test/speaker-test.c:454 #, c-format msgid "Sample format not available for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:445 +#: speaker-test/speaker-test.c:461 #, c-format msgid "Channels count (%i) not available for playbacks: %s\n" msgstr "" -#: speaker-test/speaker-test.c:453 +#: speaker-test/speaker-test.c:469 #, c-format msgid "Rate %iHz not available for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:458 +#: speaker-test/speaker-test.c:474 #, c-format msgid "Rate doesn't match (requested %iHz, get %iHz, err %d)\n" msgstr "" -#: speaker-test/speaker-test.c:462 +#: speaker-test/speaker-test.c:478 #, c-format msgid "Rate set to %iHz (requested %iHz)\n" msgstr "" -#: speaker-test/speaker-test.c:468 +#: speaker-test/speaker-test.c:484 #, c-format msgid "Buffer size range from %lu to %lu\n" msgstr "" -#: speaker-test/speaker-test.c:469 +#: speaker-test/speaker-test.c:485 #, c-format msgid "Period size range from %lu to %lu\n" msgstr "" -#: speaker-test/speaker-test.c:471 +#: speaker-test/speaker-test.c:487 #, c-format msgid "Requested period time %u us\n" msgstr "" -#: speaker-test/speaker-test.c:474 +#: speaker-test/speaker-test.c:490 #, c-format msgid "Unable to set period time %u us for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:480 +#: speaker-test/speaker-test.c:496 #, c-format msgid "Requested buffer time %u us\n" msgstr "" -#: speaker-test/speaker-test.c:483 +#: speaker-test/speaker-test.c:499 #, c-format msgid "Unable to set buffer time %u us for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:492 +#: speaker-test/speaker-test.c:508 #, c-format msgid "Using max buffer size %lu\n" msgstr "" -#: speaker-test/speaker-test.c:495 +#: speaker-test/speaker-test.c:511 #, c-format msgid "Unable to set buffer size %lu for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:501 +#: speaker-test/speaker-test.c:517 #, c-format msgid "Periods = %u\n" msgstr "" -#: speaker-test/speaker-test.c:504 +#: speaker-test/speaker-test.c:520 #, c-format msgid "Unable to set nperiods %u for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:513 +#: speaker-test/speaker-test.c:529 #, c-format msgid "Unable to set hw params for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:519 +#: speaker-test/speaker-test.c:535 #, c-format msgid "was set period_size = %lu\n" msgstr "" -#: speaker-test/speaker-test.c:520 +#: speaker-test/speaker-test.c:536 #, c-format msgid "was set buffer_size = %lu\n" msgstr "" -#: speaker-test/speaker-test.c:522 +#: speaker-test/speaker-test.c:538 #, c-format msgid "buffer to small, could not use\n" msgstr "" -#: speaker-test/speaker-test.c:535 +#: speaker-test/speaker-test.c:551 #, c-format msgid "Unable to determine current swparams for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:542 +#: speaker-test/speaker-test.c:558 #, c-format msgid "Unable to set start threshold mode for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:549 +#: speaker-test/speaker-test.c:565 #, c-format msgid "Unable to set avail min for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:556 +#: speaker-test/speaker-test.c:572 #, c-format msgid "Unable to set sw params for playback: %s\n" msgstr "" -#: speaker-test/speaker-test.c:576 +#: speaker-test/speaker-test.c:592 #, c-format msgid "Unable to set channel map: %s\n" msgstr "" -#: speaker-test/speaker-test.c:601 +#: speaker-test/speaker-test.c:617 #, c-format msgid "Can't recovery from underrun, prepare failed: %s\n" msgstr "" -#: speaker-test/speaker-test.c:612 +#: speaker-test/speaker-test.c:628 #, c-format msgid "Can't recovery from suspend, prepare failed: %s\n" msgstr "" -#: speaker-test/speaker-test.c:676 speaker-test/speaker-test.c:1191 +#: speaker-test/speaker-test.c:692 speaker-test/speaker-test.c:1207 #, c-format msgid "No enough memory\n" msgstr "" -#: speaker-test/speaker-test.c:681 +#: speaker-test/speaker-test.c:697 #, c-format msgid "Cannot open WAV file %s\n" msgstr "" -#: speaker-test/speaker-test.c:685 speaker-test/speaker-test.c:714 +#: speaker-test/speaker-test.c:701 speaker-test/speaker-test.c:730 #, c-format msgid "Invalid WAV file %s\n" msgstr "" -#: speaker-test/speaker-test.c:690 +#: speaker-test/speaker-test.c:706 #, c-format msgid "Not a WAV file: %s\n" msgstr "" -#: speaker-test/speaker-test.c:694 +#: speaker-test/speaker-test.c:710 #, c-format msgid "Unsupported WAV format %d for %s\n" msgstr "" -#: speaker-test/speaker-test.c:699 +#: speaker-test/speaker-test.c:715 #, c-format msgid "%s is not a mono stream (%d channels)\n" msgstr "" -#: speaker-test/speaker-test.c:704 +#: speaker-test/speaker-test.c:720 #, c-format msgid "Sample rate doesn't match (%d) for %s\n" msgstr "" -#: speaker-test/speaker-test.c:709 +#: speaker-test/speaker-test.c:725 #, c-format msgid "Unsupported sample format bits %d for %s\n" msgstr "" -#: speaker-test/speaker-test.c:770 +#: speaker-test/speaker-test.c:786 #, c-format msgid "Undefined channel %d\n" msgstr "" -#: speaker-test/speaker-test.c:821 +#: speaker-test/speaker-test.c:837 #, c-format msgid "Write error: %d,%s\n" msgstr "" -#: speaker-test/speaker-test.c:823 +#: speaker-test/speaker-test.c:839 #, c-format msgid "xrun_recovery failed: %d,%s\n" msgstr "" -#: speaker-test/speaker-test.c:926 +#: speaker-test/speaker-test.c:942 #, c-format msgid "" "Usage: speaker-test [OPTION]... \n" @@ -1541,72 +1586,72 @@ "\n" msgstr "" -#: speaker-test/speaker-test.c:1058 +#: speaker-test/speaker-test.c:1074 #, c-format msgid "Invalid number of periods %d\n" msgstr "" -#: speaker-test/speaker-test.c:1074 speaker-test/speaker-test.c:1078 +#: speaker-test/speaker-test.c:1090 speaker-test/speaker-test.c:1094 #, c-format msgid "Invalid test type %s\n" msgstr "" -#: speaker-test/speaker-test.c:1111 +#: speaker-test/speaker-test.c:1127 #, c-format msgid "Unknown option '%c'\n" msgstr "" -#: speaker-test/speaker-test.c:1125 +#: speaker-test/speaker-test.c:1141 #, c-format msgid "Invalid parameter for -s option.\n" msgstr "" -#: speaker-test/speaker-test.c:1140 +#: speaker-test/speaker-test.c:1156 #, c-format msgid "Playback device is %s\n" msgstr "" -#: speaker-test/speaker-test.c:1141 +#: speaker-test/speaker-test.c:1157 #, c-format msgid "Stream parameters are %iHz, %s, %i channels\n" msgstr "" -#: speaker-test/speaker-test.c:1144 +#: speaker-test/speaker-test.c:1160 #, c-format msgid "Using 16 octaves of pink noise\n" msgstr "" -#: speaker-test/speaker-test.c:1147 +#: speaker-test/speaker-test.c:1163 #, c-format msgid "Sine wave rate is %.4fHz\n" msgstr "" -#: speaker-test/speaker-test.c:1150 +#: speaker-test/speaker-test.c:1166 #, c-format msgid "WAV file(s)\n" msgstr "" -#: speaker-test/speaker-test.c:1160 +#: speaker-test/speaker-test.c:1176 #, c-format msgid "Playback open error: %d,%s\n" msgstr "" -#: speaker-test/speaker-test.c:1166 +#: speaker-test/speaker-test.c:1182 #, c-format msgid "Setting of hwparams failed: %s\n" msgstr "" -#: speaker-test/speaker-test.c:1170 +#: speaker-test/speaker-test.c:1186 #, c-format msgid "Setting of swparams failed: %s\n" msgstr "" -#: speaker-test/speaker-test.c:1216 speaker-test/speaker-test.c:1238 +#: speaker-test/speaker-test.c:1232 speaker-test/speaker-test.c:1254 #, c-format msgid "Transfer failed: %s\n" msgstr "" -#: speaker-test/speaker-test.c:1224 +#: speaker-test/speaker-test.c:1240 #, c-format msgid "Time per period = %lf\n" msgstr "" Binary files /tmp/tmp9067orz6/0nqitZVa9r/alsa-utils-1.2.2/po/de.gmo and /tmp/tmp9067orz6/GaGL_6JOvv/alsa-utils-1.2.6/po/de.gmo differ diff -Nru alsa-utils-1.2.2/po/de.po alsa-utils-1.2.6/po/de.po --- alsa-utils-1.2.2/po/de.po 2020-02-19 12:07:36.000000000 +0000 +++ alsa-utils-1.2.6/po/de.po 2021-12-06 11:44:59.000000000 +0000 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: alsa-utils 1.0.23\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 12:07+0000\n" +"POT-Creation-Date: 2021-12-06 11:44+0000\n" "PO-Revision-Date: 2010-11-09 21:12+0100\n" "Last-Translator: Clemens Ladisch \n" "Language-Team: German\n" @@ -16,32 +16,43 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: alsamixer/card_select.c:126 alsamixer/device_name.c:126 +#: alsamixer/card_select.c:77 alsamixer/device_name.c:127 msgid "Sound Card" msgstr "Soundkarte" -#: alsamixer/card_select.c:181 +#: alsamixer/card_select.c:115 msgid "(default)" msgstr "(Standard)" -#: alsamixer/card_select.c:191 +#: alsamixer/card_select.c:125 msgid "cannot enumerate sound cards" msgstr "Fehler beim Aufzählen der Soundkarten" -#: alsamixer/card_select.c:215 +#: alsamixer/card_select.c:151 msgid "enter device name..." msgstr "Gerätenamen eingeben..." -#: alsamixer/cli.c:40 +#: alsamixer/cli.c:43 msgid "Usage: alsamixer [options]" msgstr "Verwendung: alsamixer [Optionen]" -#: alsamixer/cli.c:41 +#: alsamixer/cli.c:44 +#, fuzzy +#| msgid "" +#| "Useful options:\n" +#| " -h, --help this help\n" +#| " -c, --card=NUMBER sound card number or id\n" +#| " -D, --device=NAME mixer device name\n" +#| " -V, --view=MODE starting view mode: playback/capture/all" msgid "" "Useful options:\n" " -h, --help this help\n" " -c, --card=NUMBER sound card number or id\n" " -D, --device=NAME mixer device name\n" +" -m, --mouse enable mouse\n" +" -M, --no-mouse disable mouse\n" +" -f, --config=FILE configuration file\n" +" -F, --no-config do not load configuration file\n" " -V, --view=MODE starting view mode: playback/capture/all" msgstr "" "Optionen:\n" @@ -51,7 +62,7 @@ " -V, --view=MODUS Ansicht beim Starten: playback=Wiedergabe, " "capture=Aufnahme, all=alle" -#: alsamixer/cli.c:46 +#: alsamixer/cli.c:53 msgid "" "Debugging options:\n" " -g, --no-color toggle using of colors\n" @@ -61,22 +72,22 @@ " -g, --no-color keine Farben\n" " -a, --abstraction=NAME Mixer-Abstraktion: none/basic" -#: alsamixer/cli.c:77 +#: alsamixer/cli.c:88 #, c-format msgid "invalid card index: %s\n" msgstr "ungültige Karten-Nummer: %s\n" -#: alsamixer/cli.c:103 +#: alsamixer/cli.c:130 #, c-format msgid "unknown abstraction level: %s\n" msgstr "unbekannte Abstraktion: %s\n" -#: alsamixer/cli.c:108 +#: alsamixer/cli.c:135 #, c-format msgid "unknown option: %c\n" msgstr "unbekannte Option: %c\n" -#: alsamixer/cli.c:110 +#: alsamixer/cli.c:137 msgid "try `alsamixer --help' for more information\n" msgstr "siehe `alsamixer --help' für mehr Informationen\n" @@ -89,138 +100,138 @@ msgid "%s: %s\n" msgstr "%s: %s\n" -#: alsamixer/mixer_display.c:98 +#: alsamixer/mixer_display.c:99 msgid "Card:" msgstr "Gerät:" -#: alsamixer/mixer_display.c:99 +#: alsamixer/mixer_display.c:100 msgid "Chip:" msgstr "Chip:" -#: alsamixer/mixer_display.c:100 +#: alsamixer/mixer_display.c:101 msgid "View:" msgstr "Ansicht:" -#: alsamixer/mixer_display.c:101 +#: alsamixer/mixer_display.c:102 msgid "Item:" msgstr "Element:" -#: alsamixer/mixer_display.c:104 +#: alsamixer/mixer_display.c:105 msgid "F1: Help" msgstr "F1: Hilfe" -#: alsamixer/mixer_display.c:105 +#: alsamixer/mixer_display.c:106 msgid "F2: System information" msgstr "F2: System-Informationen" -#: alsamixer/mixer_display.c:106 +#: alsamixer/mixer_display.c:107 msgid "F6: Select sound card" msgstr "F6: Soundkarte auswählen" -#: alsamixer/mixer_display.c:107 +#: alsamixer/mixer_display.c:108 msgid "Esc: Exit" msgstr "Esc: Beenden" -#: alsamixer/mixer_display.c:174 +#: alsamixer/mixer_display.c:179 msgid "(unplugged)" msgstr "(entfernt)" -#: alsamixer/mixer_display.c:192 +#: alsamixer/mixer_display.c:197 msgid "Playback" msgstr "Wiedergabe" -#: alsamixer/mixer_display.c:193 +#: alsamixer/mixer_display.c:198 msgid "Capture" msgstr "Aufnahme" -#: alsamixer/mixer_display.c:194 +#: alsamixer/mixer_display.c:199 msgid "All" msgstr "Alle" -#: alsamixer/mixer_display.c:234 +#: alsamixer/mixer_display.c:240 msgid "mute" msgstr "stumm" -#: alsamixer/mixer_display.c:275 alsamixer/mixer_display.c:285 +#: alsamixer/mixer_display.c:281 alsamixer/mixer_display.c:291 msgid "dB gain:" msgstr "dB-Änderung:" -#: alsamixer/mixer_display.c:285 +#: alsamixer/mixer_display.c:291 #, c-format msgid " [%s %s, %s]" msgstr " [%s %s; %s]" -#: alsamixer/mixer_display.c:294 alsamixer/mixer_display.c:300 -#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:312 +#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:306 +#: alsamixer/mixer_display.c:312 alsamixer/mixer_display.c:318 msgid "Off" msgstr "Aus" -#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:312 +#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:318 msgid "On" msgstr "An" -#: alsamixer/mixer_display.c:363 +#: alsamixer/mixer_display.c:370 msgid "The sound device was unplugged." msgstr "Das Gerät wurde entfernt." -#: alsamixer/mixer_display.c:364 +#: alsamixer/mixer_display.c:371 msgid "Press F6 to select another sound card." msgstr "Drücken Sie F6, um eine andere Soundkarte auszuwählen." -#: alsamixer/mixer_display.c:379 +#: alsamixer/mixer_display.c:386 msgid "This sound device does not have any playback controls." msgstr "Dieses Gerät hat keine Wiedergabe-Regler." -#: alsamixer/mixer_display.c:381 +#: alsamixer/mixer_display.c:388 msgid "This sound device does not have any capture controls." msgstr "Dieses Gerät hat keine Aufnahme-Regler." -#: alsamixer/mixer_display.c:383 +#: alsamixer/mixer_display.c:390 msgid "This sound device does not have any controls." msgstr "Dieses Gerät hat keine Regler." #. TRANSLATORS: playback on; one character -#: alsamixer/mixer_display.c:516 alsamixer/mixer_display.c:521 +#: alsamixer/mixer_display.c:523 alsamixer/mixer_display.c:528 msgid "O" msgstr "O" #. TRANSLATORS: playback muted; one character -#: alsamixer/mixer_display.c:518 alsamixer/mixer_display.c:522 +#: alsamixer/mixer_display.c:525 alsamixer/mixer_display.c:529 msgid "M" msgstr "M" #. TRANSLATORS: "left"; no more than two characters -#: alsamixer/mixer_display.c:536 +#: alsamixer/mixer_display.c:545 msgid "L" msgstr "L" #. TRANSLATORS: "right"; no more than two characters -#: alsamixer/mixer_display.c:540 +#: alsamixer/mixer_display.c:551 msgid "R" msgstr "R" #. TRANSLATORS: no more than eight characters -#: alsamixer/mixer_display.c:542 +#: alsamixer/mixer_display.c:555 msgid "CAPTURE" msgstr "AUFNAHME" -#: alsamixer/mixer_display.c:592 +#: alsamixer/mixer_display.c:611 msgid "Front" msgstr "Vorne" -#: alsamixer/mixer_display.c:595 +#: alsamixer/mixer_display.c:614 msgid "Rear" msgstr "Hinten" -#: alsamixer/mixer_display.c:598 speaker-test/speaker-test.c:124 +#: alsamixer/mixer_display.c:617 speaker-test/speaker-test.c:124 msgid "Center" msgstr "Mitte" -#: alsamixer/mixer_display.c:601 +#: alsamixer/mixer_display.c:620 msgid "Woofer" msgstr "Bass" -#: alsamixer/mixer_display.c:604 +#: alsamixer/mixer_display.c:623 msgid "Side" msgstr "Seiten" @@ -352,11 +363,11 @@ msgid "Help" msgstr "Hilfe" -#: alsamixer/proc_files.c:103 +#: alsamixer/proc_files.c:56 msgid "Select File" msgstr "Datei wählen" -#: alsamixer/textbox.c:52 alsamixer/textbox.c:66 +#: alsamixer/textbox.c:51 alsamixer/textbox.c:65 msgid "Error" msgstr "Fehler" @@ -472,7 +483,7 @@ " --process-id-file=# schreibe Prozess-ID in diese Datei\n" " --use-strftime formatiere Dateiname mit strftime; %%v=Dateinummer\n" -#: aplay/aplay.c:250 speaker-test/speaker-test.c:945 +#: aplay/aplay.c:250 speaker-test/speaker-test.c:961 #, c-format msgid "Recognized sample formats are:" msgstr "Unterstützte Sample-Formate:" @@ -554,131 +565,131 @@ msgid "value %i for channels is invalid" msgstr "Kanalanzahl %i ist ungültig" -#: aplay/aplay.c:629 +#: aplay/aplay.c:630 #, c-format msgid "wrong extended format '%s'" msgstr "erweitertes Format '%s' ist ungültig" -#: aplay/aplay.c:637 +#: aplay/aplay.c:638 #, fuzzy, c-format msgid "invalid rate argument '%s'" msgstr "ungültige Quell-Adresse %s\n" -#: aplay/aplay.c:644 +#: aplay/aplay.c:645 #, c-format msgid "bad speed value %i" msgstr "ungültige Rate %i" -#: aplay/aplay.c:650 +#: aplay/aplay.c:651 msgid "duration and samples arguments cannot be used together" msgstr "" -#: aplay/aplay.c:655 +#: aplay/aplay.c:656 #, fuzzy, c-format msgid "invalid duration argument '%s'" msgstr "ungültige Ziel-Adresse %s\n" -#: aplay/aplay.c:662 +#: aplay/aplay.c:663 msgid "samples and duration arguments cannot be used together" msgstr "" -#: aplay/aplay.c:667 +#: aplay/aplay.c:668 #, fuzzy, c-format msgid "invalid samples argument '%s'" msgstr "ungültige Sender-Adresse %s\n" -#: aplay/aplay.c:679 +#: aplay/aplay.c:680 #, fuzzy, c-format msgid "invalid period time argument '%s'" msgstr "ungültige Sender-Adresse %s\n" -#: aplay/aplay.c:686 +#: aplay/aplay.c:687 #, fuzzy, c-format msgid "invalid buffer time argument '%s'" msgstr "ungültige Quell-Adresse %s\n" -#: aplay/aplay.c:693 +#: aplay/aplay.c:694 #, fuzzy, c-format msgid "invalid period size argument '%s'" msgstr "ungültige Sender-Adresse %s\n" -#: aplay/aplay.c:700 +#: aplay/aplay.c:701 #, fuzzy, c-format msgid "invalid buffer size argument '%s'" msgstr "ungültige Quell-Adresse %s\n" -#: aplay/aplay.c:707 +#: aplay/aplay.c:708 #, c-format msgid "invalid min available space argument '%s'" msgstr "" -#: aplay/aplay.c:714 +#: aplay/aplay.c:715 #, fuzzy, c-format msgid "invalid start delay argument '%s'" msgstr "ungültige Sender-Adresse %s\n" -#: aplay/aplay.c:721 +#: aplay/aplay.c:722 #, fuzzy, c-format msgid "invalid stop delay argument '%s'" msgstr "ungültige Sender-Adresse %s\n" -#: aplay/aplay.c:776 +#: aplay/aplay.c:777 #, fuzzy, c-format msgid "invalid test coef argument '%s'" msgstr "ungültige Quell-Adresse %s\n" -#: aplay/aplay.c:788 +#: aplay/aplay.c:789 #, c-format msgid "invalid max file time argument '%s'" msgstr "" -#: aplay/aplay.c:808 speaker-test/speaker-test.c:571 +#: aplay/aplay.c:809 speaker-test/speaker-test.c:587 #, fuzzy, c-format msgid "Unable to parse channel map string: %s\n" msgstr "Fehler beim Setzen des Mindest-verfügbar-Wertes: %s\n" -#: aplay/aplay.c:814 +#: aplay/aplay.c:815 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Siehe `%s --help' für mehr Informationen.\n" -#: aplay/aplay.c:830 +#: aplay/aplay.c:831 #, c-format msgid "audio open error: %s" msgstr "Fehler beim Öffnen des Gerätes: %s" -#: aplay/aplay.c:835 +#: aplay/aplay.c:836 #, c-format msgid "info error: %s" msgstr "Fehler beim Lesen der Geräteinformationen: %s" -#: aplay/aplay.c:842 +#: aplay/aplay.c:843 #, c-format msgid "nonblock setting error: %s" msgstr "Fehler beim Setzen des nonblock-Modus: %s" -#: aplay/aplay.c:852 aplay/aplay.c:976 aplay/aplay.c:1266 aplay/aplay.c:1466 -#: aplay/aplay.c:1989 aplay/aplay.c:2019 +#: aplay/aplay.c:861 aplay/aplay.c:985 aplay/aplay.c:1275 aplay/aplay.c:1475 +#: aplay/aplay.c:2055 aplay/aplay.c:2085 msgid "not enough memory" msgstr "nicht genug Speicher" -#: aplay/aplay.c:876 +#: aplay/aplay.c:885 #, c-format msgid "Cannot create process ID file %s: %s" msgstr "Fehler beim Schreiben der Prozess-ID-Datei %s: %s" -#: aplay/aplay.c:966 +#: aplay/aplay.c:975 #, c-format msgid "read error (called from line %i)" msgstr "Lesefehler (aufgerufen von Zeile %i)" -#: aplay/aplay.c:1033 +#: aplay/aplay.c:1042 #, c-format msgid "unknown length of 'fmt ' chunk (read %u, should be %u at least)" msgstr "" "unbekannte Länge des 'fmt '-Blocks (gelesen: %u, sollte mindestens %u sein)" -#: aplay/aplay.c:1044 +#: aplay/aplay.c:1053 #, c-format msgid "" "unknown length of extensible 'fmt ' chunk (read %u, should be %u at least)" @@ -686,248 +697,249 @@ "unbekannte Länge des erweiterten 'fmt '-Blocks (gelesen: %u, sollte " "mindestens %u sein)" -#: aplay/aplay.c:1049 +#: aplay/aplay.c:1058 msgid "wrong format tag in extensible 'fmt ' chunk" msgstr "ungültiger Format-Wert im erweiterten 'fmt '-Block" -#: aplay/aplay.c:1056 +#: aplay/aplay.c:1065 #, c-format msgid "can't play WAVE-file format 0x%04x which is not PCM or FLOAT encoded" msgstr "" "kann WAVE-Datei-Format 0x%04x nicht abspielen; ist weder PCM noch FLOAT" -#: aplay/aplay.c:1061 +#: aplay/aplay.c:1070 #, c-format msgid "can't play WAVE-files with %d tracks" msgstr "kann WAVE-Datei mit %d Kanälen nicht abspielen" -#: aplay/aplay.c:1069 aplay/aplay.c:1195 +#: aplay/aplay.c:1078 aplay/aplay.c:1204 #, c-format msgid "Warning: format is changed to U8\n" msgstr "Warnung: benutztes Format ist U8\n" -#: aplay/aplay.c:1079 aplay/aplay.c:1092 aplay/aplay.c:1103 +#: aplay/aplay.c:1088 aplay/aplay.c:1101 aplay/aplay.c:1112 #, fuzzy, c-format msgid "Warning: format is changed to %s\n" msgstr "Warnung: benutztes Format ist U8\n" -#: aplay/aplay.c:1108 +#: aplay/aplay.c:1117 #, c-format msgid "" " can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)" msgstr "" "kann WAVE-Datei mit %d-Bit-Samples in %d Bytes (%d Kanäle) nicht abspielen" -#: aplay/aplay.c:1131 +#: aplay/aplay.c:1140 #, c-format msgid " can't play WAVE-files with sample %d bits wide" msgstr "kann WAVE-Datei mit %d-Bit-Samples nicht abspielen" -#: aplay/aplay.c:1189 +#: aplay/aplay.c:1198 #, c-format msgid "Warning: format is changed to MU_LAW\n" msgstr "Warnung: benutztes Format ist MU_LAW\n" -#: aplay/aplay.c:1201 +#: aplay/aplay.c:1210 #, c-format msgid "Warning: format is changed to S16_BE\n" msgstr "Warnung: benutztes Format ist S16_BE\n" -#: aplay/aplay.c:1214 aplay/aplay.c:2304 aplay/aplay.c:2311 aplay/aplay.c:2836 +#: aplay/aplay.c:1223 aplay/aplay.c:2376 aplay/aplay.c:2383 aplay/aplay.c:2912 msgid "read error" msgstr "Lesefehler" -#: aplay/aplay.c:1244 +#: aplay/aplay.c:1253 msgid "Channel numbers don't match between hw_params and channel map" msgstr "" -#: aplay/aplay.c:1253 +#: aplay/aplay.c:1262 #, c-format msgid "Warning: unable to get channel map\n" msgstr "" -#: aplay/aplay.c:1287 +#: aplay/aplay.c:1296 #, c-format -msgid "Channel %d doesn't match with hw_parmas" +msgid "Channel %d doesn't match with hw_params" msgstr "" -#: aplay/aplay.c:1314 +#: aplay/aplay.c:1323 msgid "Broken configuration for this PCM: no configurations available" msgstr "" "ungültige Konfiguration für dieses Gerät: keine unterstützte Konfiguration" -#: aplay/aplay.c:1318 +#: aplay/aplay.c:1327 #, c-format msgid "HW Params of device \"%s\":\n" msgstr "" -#: aplay/aplay.c:1338 +#: aplay/aplay.c:1347 msgid "Access type not available" msgstr "Zugriffs-Modus nicht unterstützt" -#: aplay/aplay.c:1343 +#: aplay/aplay.c:1352 msgid "Sample format non available" msgstr "Sample-Format nicht unterstützt" -#: aplay/aplay.c:1349 +#: aplay/aplay.c:1358 msgid "Channels count non available" msgstr "Kanalanzahl nicht unterstützt" -#: aplay/aplay.c:1364 +#: aplay/aplay.c:1373 #, c-format msgid "Warning: rate is not accurate (requested = %iHz, got = %iHz)\n" msgstr "" "Warnung: Rate ist nicht exakt (angefordert: %i Hz, unterstützt: %i Hz)\n" -#: aplay/aplay.c:1370 +#: aplay/aplay.c:1379 #, c-format msgid " please, try the plug plugin %s\n" msgstr " probieren Sie bitte das plug-Plugin: %s\n" -#: aplay/aplay.c:1407 +#: aplay/aplay.c:1416 msgid "Unable to install hw params:" msgstr "Fehler beim Setzen der Hardware-Parameter:" -#: aplay/aplay.c:1414 +#: aplay/aplay.c:1423 #, c-format msgid "Can't use period equal to buffer size (%lu == %lu)" msgstr "Periode gleich der Puffer-Größe wird nicht unterstützt (%lu == %lu)" -#: aplay/aplay.c:1420 +#: aplay/aplay.c:1429 #, fuzzy +#| msgid "unable to install sw params:" msgid "Unable to get current sw params." msgstr "Fehler beim Setzen der Software-Parameter:" -#: aplay/aplay.c:1449 +#: aplay/aplay.c:1458 msgid "unable to install sw params:" msgstr "Fehler beim Setzen der Software-Parameter:" -#: aplay/aplay.c:1484 +#: aplay/aplay.c:1493 #, c-format msgid "snd_pcm_mmap_begin problem: %s" msgstr "Fehler bei snd_pcm_mmap_begin: %s" -#: aplay/aplay.c:1513 +#: aplay/aplay.c:1522 #, c-format msgid "stdin O_NONBLOCK flag setup failed\n" msgstr "Fehler beim Setzen von O_NONBLOCK in stdin\n" -#: aplay/aplay.c:1537 +#: aplay/aplay.c:1559 #, c-format msgid "\rPAUSE command ignored (no hw support)\n" msgstr "\rPause-Kommando ignoriert (keine HW-Unterstützung)\n" -#: aplay/aplay.c:1545 +#: aplay/aplay.c:1567 #, c-format msgid "pause push error: %s" msgstr "Fehler beim Pausieren: %s" -#: aplay/aplay.c:1556 +#: aplay/aplay.c:1578 #, c-format msgid "pause release error: %s" msgstr "Fehler beim Beenden der Pause: %s" -#: aplay/aplay.c:1572 +#: aplay/aplay.c:1594 #, c-format msgid "" "\r=== PAUSE === " msgstr "" "\r=== PAUSE === " -#: aplay/aplay.c:1614 +#: aplay/aplay.c:1636 #, c-format msgid "status error: %s" msgstr "Status-Fehler: %s" -#: aplay/aplay.c:1619 +#: aplay/aplay.c:1641 #, fuzzy, c-format msgid "fatal %s: %s" msgstr "%s: %s\n" -#: aplay/aplay.c:1620 aplay/aplay.c:1631 aplay/aplay.c:1634 aplay/aplay.c:1642 +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1656 aplay/aplay.c:1664 msgid "underrun" msgstr "Unterlauf" -#: aplay/aplay.c:1620 aplay/aplay.c:1631 aplay/aplay.c:1642 +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1664 msgid "overrun" msgstr "Überlauf" -#: aplay/aplay.c:1630 aplay/aplay.c:1641 +#: aplay/aplay.c:1652 aplay/aplay.c:1663 #, c-format msgid "%s!!! (at least %.3f ms long)\n" msgstr "%s!!! (mindestens %.3f ms)\n" -#: aplay/aplay.c:1646 +#: aplay/aplay.c:1668 #, c-format msgid "Status:\n" msgstr "Status:\n" -#: aplay/aplay.c:1650 +#: aplay/aplay.c:1672 #, c-format msgid "xrun: prepare error: %s" msgstr "Unter-/Überlauf: Fehler beim Re-Initialisieren des Gerätes: %s" -#: aplay/aplay.c:1656 +#: aplay/aplay.c:1679 #, c-format msgid "Status(DRAINING):\n" msgstr "Status (DRAINING):\n" -#: aplay/aplay.c:1660 +#: aplay/aplay.c:1683 #, c-format msgid "capture stream format change? attempting recover...\n" msgstr "Format-Wechsel der Aufnahme-Daten? Versuche Wiederherstellung ...\n" -#: aplay/aplay.c:1662 +#: aplay/aplay.c:1685 #, c-format msgid "xrun(DRAINING): prepare error: %s" msgstr "XRUN (DRAINING): Fehler beim Re-Initialisieren des Gerätes: %s" -#: aplay/aplay.c:1669 +#: aplay/aplay.c:1692 #, c-format msgid "Status(R/W):\n" msgstr "Status (R/W):\n" -#: aplay/aplay.c:1672 +#: aplay/aplay.c:1695 #, c-format msgid "read/write error, state = %s" msgstr "Lese-/Schreibfehler, Status = %s" -#: aplay/aplay.c:1682 +#: aplay/aplay.c:1705 #, c-format msgid "Suspended. Trying resume. " msgstr "Ruhezustand. Versuche, aufzuwecken. " -#: aplay/aplay.c:1688 +#: aplay/aplay.c:1711 #, c-format msgid "Failed. Restarting stream. " msgstr "Fehlgeschlagen. Re-Initialisierung. " -#: aplay/aplay.c:1691 +#: aplay/aplay.c:1714 #, c-format msgid "suspend: prepare error: %s" msgstr "Ruhezustand: Fehler beim Re-Initialisieren: %s" -#: aplay/aplay.c:1696 +#: aplay/aplay.c:1719 #, c-format msgid "Done.\n" msgstr "Fertig.\n" -#: aplay/aplay.c:1718 +#: aplay/aplay.c:1741 #, c-format msgid " !clip " msgstr " !clip " -#: aplay/aplay.c:1865 +#: aplay/aplay.c:1893 #, c-format msgid "Unsupported bit size %d.\n" msgstr "%d-Bit-Samples werden nicht unterstützt.\n" -#: aplay/aplay.c:1899 +#: aplay/aplay.c:1929 #, c-format msgid "Max peak (%li samples): 0x%08x " msgstr "Höchstwert (%li Samples): 0x%08x " -#: aplay/aplay.c:1933 +#: aplay/aplay.c:1970 #, c-format msgid "" "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer = " @@ -936,113 +948,155 @@ "verdächtige Puffer-Position (total %li): avail = %li, delay = %li, buffer = " "%li\n" -#: aplay/aplay.c:2061 +#: aplay/aplay.c:1979 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious status buffer position (%li total): avail = %li, delay = %li, " +"buffer = %li\n" +msgstr "" +"verdächtige Puffer-Position (total %li): avail = %li, delay = %li, buffer = " +"%li\n" + +#: aplay/aplay.c:1983 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious buffer position avail > delay (%li total): avail = %li, delay = " +"%li\n" +msgstr "" +"verdächtige Puffer-Position (total %li): avail = %li, delay = %li, buffer = " +"%li\n" + +#: aplay/aplay.c:1987 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious status buffer position avail > delay (%li total): avail = %li, " +"delay = %li\n" +msgstr "" +"verdächtige Puffer-Position (total %li): avail = %li, delay = %li, buffer = " +"%li\n" + +#: aplay/aplay.c:2030 +#, c-format +msgid "Status(R/W) (standalone avail=%li delay=%li):\n" +msgstr "" + +#: aplay/aplay.c:2127 #, c-format msgid "write error: %s" msgstr "Schreibfehler: %s" -#: aplay/aplay.c:2109 +#: aplay/aplay.c:2175 #, c-format msgid "writev error: %s" msgstr "Vektor-Schreib-Fehler: %s" -#: aplay/aplay.c:2153 +#: aplay/aplay.c:2221 #, c-format msgid "read error: %s" msgstr "Lesefehler: %s" -#: aplay/aplay.c:2197 +#: aplay/aplay.c:2268 #, c-format msgid "readv error: %s" msgstr "Vektor-Lese-Fehler: %s" -#: aplay/aplay.c:2245 +#: aplay/aplay.c:2317 msgid "can't allocate buffer for silence" msgstr "nicht genug Speicher für Stille-Block" -#: aplay/aplay.c:2254 aplay/aplay.c:2482 aplay/aplay.c:2487 aplay/aplay.c:2537 -#: aplay/aplay.c:2546 aplay/aplay.c:2553 aplay/aplay.c:2563 aplay/aplay.c:2569 -#: aplay/aplay.c:2641 aplay/aplay.c:2671 aplay/aplay.c:2685 +#: aplay/aplay.c:2326 aplay/aplay.c:2554 aplay/aplay.c:2559 aplay/aplay.c:2611 +#: aplay/aplay.c:2620 aplay/aplay.c:2627 aplay/aplay.c:2637 aplay/aplay.c:2643 +#: aplay/aplay.c:2715 aplay/aplay.c:2745 aplay/aplay.c:2759 msgid "write error" msgstr "Schreibfehler" -#: aplay/aplay.c:2267 +#: aplay/aplay.c:2339 #, c-format msgid "voc_pcm_flush - silence error" msgstr "voc_pcm_flush - Fehler in set_silence" -#: aplay/aplay.c:2270 +#: aplay/aplay.c:2342 msgid "voc_pcm_flush error" msgstr "Schreibfehler" -#: aplay/aplay.c:2295 +#: aplay/aplay.c:2367 msgid "malloc error" msgstr "nicht genug Speicher" -#: aplay/aplay.c:2299 +#: aplay/aplay.c:2371 #, c-format msgid "Playing Creative Labs Channel file '%s'...\n" msgstr "Spiele Creative Labs Channel-Datei '%s'...\n" -#: aplay/aplay.c:2367 aplay/aplay.c:2462 +#: aplay/aplay.c:2439 aplay/aplay.c:2534 msgid "can't play packed .voc files" msgstr "kann komprimierte .voc-Dateien nicht abspielen" -#: aplay/aplay.c:2422 +#: aplay/aplay.c:2494 #, c-format msgid "can't play loops; %s isn't seekable\n" msgstr "" "kann Schleife nicht abspielen; Dateiposition in %s ist nicht änderbar\n" -#: aplay/aplay.c:2471 +#: aplay/aplay.c:2543 #, c-format msgid "unknown blocktype %d. terminate." msgstr "Unbekannter Block-Typ %d. Abbruch." -#: aplay/aplay.c:2605 +#: aplay/aplay.c:2679 #, c-format msgid "Wave doesn't support %s format..." msgstr "Format %s wird in WAVE nicht unterstützt ..." -#: aplay/aplay.c:2665 +#: aplay/aplay.c:2739 #, c-format msgid "Sparc Audio doesn't support %s format..." msgstr "Format %s wird in Sparc-Audio nicht unterstützt ..." -#: aplay/aplay.c:2740 +#: aplay/aplay.c:2814 msgid "Playing" msgstr "Wiedergabe:" -#: aplay/aplay.c:2740 +#: aplay/aplay.c:2814 msgid "Recording" msgstr "Aufnahme:" -#: aplay/aplay.c:2744 +#: aplay/aplay.c:2818 #, c-format msgid "Rate %d Hz, " msgstr "Rate: %d Hz, " -#: aplay/aplay.c:2746 +#: aplay/aplay.c:2820 #, c-format msgid "Mono" msgstr "mono" -#: aplay/aplay.c:2748 +#: aplay/aplay.c:2822 #, c-format msgid "Stereo" msgstr "stereo" -#: aplay/aplay.c:2750 +#: aplay/aplay.c:2824 #, c-format msgid "Channels %i" msgstr "%i Kanäle" -#: aplay/aplay.c:3351 +#: aplay/aplay.c:3431 #, fuzzy, c-format +#| msgid "You need to specify %d files" msgid "You need to specify %u files" msgstr "Es werden %d Dateien benötigt." -#: aplay/aplay.c:3404 +#: aplay/aplay.c:3484 #, c-format msgid "You need to specify %d files" msgstr "Es werden %d Dateien benötigt." @@ -1173,7 +1227,7 @@ msgid "invalid sender address %s\n" msgstr "ungültige Sender-Adresse %s\n" -#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:290 +#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:303 #, c-format msgid "invalid destination address %s\n" msgstr "ungültige Ziel-Adresse %s\n" @@ -1198,127 +1252,144 @@ msgid "Connection failed (%s)\n" msgstr "Verbindung fehlgeschlagen (%s)\n" -#: seq/aseqnet/aseqnet.c:164 +#: seq/aseqnet/aseqnet.c:171 #, c-format msgid "aseqnet - network client/server on ALSA sequencer\n" msgstr "aseqnet - Netzwerk-Client/Server für ALSA Sequenzer\n" -#: seq/aseqnet/aseqnet.c:165 +#: seq/aseqnet/aseqnet.c:172 #, c-format msgid " Copyright (C) 1999 Takashi Iwai\n" msgstr " Copyright © 1999 Takashi Iwai\n" -#: seq/aseqnet/aseqnet.c:166 +#: seq/aseqnet/aseqnet.c:173 #, c-format msgid "usage:\n" msgstr "Verwendung:\n" -#: seq/aseqnet/aseqnet.c:167 +#: seq/aseqnet/aseqnet.c:174 #, c-format msgid " server mode: aseqnet [-options]\n" msgstr " Server-Modus: aseqnet [Optionen]\n" -#: seq/aseqnet/aseqnet.c:168 +#: seq/aseqnet/aseqnet.c:175 #, c-format msgid " client mode: aseqnet [-options] server_host\n" msgstr " Client-Modus: aseqnet [Optionen] ServerHost\n" -#: seq/aseqnet/aseqnet.c:169 +#: seq/aseqnet/aseqnet.c:176 #, c-format msgid "options:\n" msgstr "Optionen:\n" -#: seq/aseqnet/aseqnet.c:170 +#: seq/aseqnet/aseqnet.c:177 +#, c-format +msgid " -6,--ipv6 : use IPv6 TCP protocol\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:178 #, fuzzy, c-format msgid " -p,--port # : specify TCP port (digit or service name)\n" msgstr " -p,--port # : TCP-Port (Zahl oder Service-Name)\n" -#: seq/aseqnet/aseqnet.c:171 +#: seq/aseqnet/aseqnet.c:179 #, c-format msgid " -s,--source addr : read from given addr (client:port)\n" msgstr " -s,--source # : lese von Sequenzer-Port (Client:Port)\n" -#: seq/aseqnet/aseqnet.c:172 +#: seq/aseqnet/aseqnet.c:180 #, c-format msgid " -d,--dest addr : write to given addr (client:port)\n" msgstr " -d,--dest # : schreibe auf Sequenzer-Port (Client:Port)\n" -#: seq/aseqnet/aseqnet.c:173 +#: seq/aseqnet/aseqnet.c:181 +#, c-format +msgid " -n,--name value : use a specific midi process name\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:182 #, c-format msgid " -v, --verbose : print verbose messages\n" msgstr " -v,--verbose : ausführliche Meldungen\n" -#: seq/aseqnet/aseqnet.c:174 +#: seq/aseqnet/aseqnet.c:183 #, c-format msgid " -i, --info : print certain received events\n" msgstr " -i,--info : Ausgabe bestimmter empfangener Ereignisse\n" -#: seq/aseqnet/aseqnet.c:188 +#: seq/aseqnet/aseqnet.c:197 #, c-format msgid "can't malloc\n" msgstr "nicht genug Speicher\n" -#: seq/aseqnet/aseqnet.c:213 +#: seq/aseqnet/aseqnet.c:222 #, c-format msgid "closing files..\n" msgstr "schließe Dateien ...\n" -#: seq/aseqnet/aseqnet.c:272 +#: seq/aseqnet/aseqnet.c:285 #, c-format msgid "sequencer opened: %d:%d\n" msgstr "Sequenzer geöffnet: %d:%d\n" -#: seq/aseqnet/aseqnet.c:279 +#: seq/aseqnet/aseqnet.c:292 #, c-format msgid "invalid source address %s\n" msgstr "ungültige Quell-Adresse %s\n" -#: seq/aseqnet/aseqnet.c:309 -#, c-format -msgid "service '%s' is not found in /etc/services\n" -msgstr "Service '%s' in /etc/services nicht gefunden\n" +#: seq/aseqnet/aseqnet.c:362 +#, fuzzy, c-format +#| msgid "can't get address %s\n" +msgid "can't get address\n" +msgstr "kann Adresse für %s nicht bestimmen\n" -#: seq/aseqnet/aseqnet.c:377 +#: seq/aseqnet/aseqnet.c:376 seq/aseqnet/aseqnet.c:461 +#, fuzzy, c-format +#| msgid "Connecting To" +msgid "connecting to: %s\n" +msgstr "verbunden zu" + +#: seq/aseqnet/aseqnet.c:414 #, c-format msgid "too many connections!\n" msgstr "zu viele Verbindungen\n" -#: seq/aseqnet/aseqnet.c:388 +#: seq/aseqnet/aseqnet.c:425 #, c-format msgid "accepted[%d]\n" msgstr "angenommen[%d]\n" -#: seq/aseqnet/aseqnet.c:411 +#: seq/aseqnet/aseqnet.c:447 #, c-format msgid "can't get address %s\n" msgstr "kann Adresse für %s nicht bestimmen\n" -#: seq/aseqnet/aseqnet.c:422 +#: seq/aseqnet/aseqnet.c:475 #, c-format msgid "ok.. connected\n" msgstr "OK ... verbunden\n" -#: seq/aseqnet/aseqnet.c:518 +#: seq/aseqnet/aseqnet.c:574 #, c-format msgid "Channel %2d: Control event : %5d\n" msgstr "Channel %2d: Control event : %5d\n" -#: seq/aseqnet/aseqnet.c:522 +#: seq/aseqnet/aseqnet.c:578 #, c-format msgid "Channel %2d: Pitchbender : %5d\n" msgstr "Channel %2d: Pitchbender : %5d\n" -#: seq/aseqnet/aseqnet.c:526 +#: seq/aseqnet/aseqnet.c:582 #, c-format msgid "Channel %2d: Note On event : %5d\n" msgstr "Channel %2d: Note On evenet : %5d\n" -#: seq/aseqnet/aseqnet.c:530 +#: seq/aseqnet/aseqnet.c:586 #, c-format msgid "Channel %2d: Note Off event: %5d\n" msgstr "Channel %2d: Note Off event: %5d\n" -#: seq/aseqnet/aseqnet.c:585 +#: seq/aseqnet/aseqnet.c:641 #, c-format msgid "disconnected\n" msgstr "Verbindung getrennt\n" @@ -1383,207 +1454,207 @@ msgid "Channel 16" msgstr "Kanal 16" -#: speaker-test/speaker-test.c:424 +#: speaker-test/speaker-test.c:440 #, c-format msgid "Broken configuration for playback: no configurations available: %s\n" msgstr "Ungültige Konfiguration: keine unterstützte Konfiguration: %s\n" -#: speaker-test/speaker-test.c:431 +#: speaker-test/speaker-test.c:447 #, c-format msgid "Access type not available for playback: %s\n" msgstr "Zugriffsmodus nicht unterstützt: %s\n" -#: speaker-test/speaker-test.c:438 +#: speaker-test/speaker-test.c:454 #, c-format msgid "Sample format not available for playback: %s\n" msgstr "Sample-Format nicht unterstützt: %s\n" -#: speaker-test/speaker-test.c:445 +#: speaker-test/speaker-test.c:461 #, c-format msgid "Channels count (%i) not available for playbacks: %s\n" msgstr "Kanal-Anzahl %i nicht unterstützt: %s\n" -#: speaker-test/speaker-test.c:453 +#: speaker-test/speaker-test.c:469 #, c-format msgid "Rate %iHz not available for playback: %s\n" msgstr "Rate %i Hz nicht unterstützt: %s\n" -#: speaker-test/speaker-test.c:458 +#: speaker-test/speaker-test.c:474 #, c-format msgid "Rate doesn't match (requested %iHz, get %iHz, err %d)\n" msgstr "" "Rate ist nicht exakt (angefordert: %i Hz, unterstützt: %i Hz, Fehlercode " "%d)\n" -#: speaker-test/speaker-test.c:462 +#: speaker-test/speaker-test.c:478 #, c-format msgid "Rate set to %iHz (requested %iHz)\n" msgstr "Rate ist %i Hz (angefordert: %i Hz)\n" -#: speaker-test/speaker-test.c:468 +#: speaker-test/speaker-test.c:484 #, c-format msgid "Buffer size range from %lu to %lu\n" msgstr "Puffergröße von %lu bis %lu\n" -#: speaker-test/speaker-test.c:469 +#: speaker-test/speaker-test.c:485 #, c-format msgid "Period size range from %lu to %lu\n" msgstr "Periodengröße von %lu bis %lu\n" -#: speaker-test/speaker-test.c:471 +#: speaker-test/speaker-test.c:487 #, c-format msgid "Requested period time %u us\n" msgstr "Angeforderte Periodenzeit %u µs\n" -#: speaker-test/speaker-test.c:474 +#: speaker-test/speaker-test.c:490 #, c-format msgid "Unable to set period time %u us for playback: %s\n" msgstr "Fehler beim Setzen der Periodenzeit %u µs: %s\n" -#: speaker-test/speaker-test.c:480 +#: speaker-test/speaker-test.c:496 #, c-format msgid "Requested buffer time %u us\n" msgstr "Angeforderte Pufferlänge %u µs\n" -#: speaker-test/speaker-test.c:483 +#: speaker-test/speaker-test.c:499 #, c-format msgid "Unable to set buffer time %u us for playback: %s\n" msgstr "Fehler beim Setzen der Pufferlänge %u µs: %s\n" -#: speaker-test/speaker-test.c:492 +#: speaker-test/speaker-test.c:508 #, c-format msgid "Using max buffer size %lu\n" msgstr "Verwende maximale Puffergröße %lu\n" -#: speaker-test/speaker-test.c:495 +#: speaker-test/speaker-test.c:511 #, c-format msgid "Unable to set buffer size %lu for playback: %s\n" msgstr "Fehler beim Setzen der Puffergröße %lu: %s\n" -#: speaker-test/speaker-test.c:501 +#: speaker-test/speaker-test.c:517 #, c-format msgid "Periods = %u\n" msgstr "Perioden = %u\n" -#: speaker-test/speaker-test.c:504 +#: speaker-test/speaker-test.c:520 #, c-format msgid "Unable to set nperiods %u for playback: %s\n" msgstr "Fehler beim Setzen der Periodenanzahl %u: %s\n" -#: speaker-test/speaker-test.c:513 +#: speaker-test/speaker-test.c:529 #, c-format msgid "Unable to set hw params for playback: %s\n" msgstr "Fehler beim Setzen der Hardware-Parameter: %s\n" -#: speaker-test/speaker-test.c:519 +#: speaker-test/speaker-test.c:535 #, c-format msgid "was set period_size = %lu\n" msgstr "gesetzt: period_size = %lu\n" -#: speaker-test/speaker-test.c:520 +#: speaker-test/speaker-test.c:536 #, c-format msgid "was set buffer_size = %lu\n" msgstr "gesetzt: buffer_size = %lu\n" -#: speaker-test/speaker-test.c:522 +#: speaker-test/speaker-test.c:538 #, c-format msgid "buffer to small, could not use\n" msgstr "Puffer zu klein, kann nicht benutzt werden\n" -#: speaker-test/speaker-test.c:535 +#: speaker-test/speaker-test.c:551 #, c-format msgid "Unable to determine current swparams for playback: %s\n" msgstr "Fehler beim Lesen der Software-Parameter: %s\n" -#: speaker-test/speaker-test.c:542 +#: speaker-test/speaker-test.c:558 #, c-format msgid "Unable to set start threshold mode for playback: %s\n" msgstr "Fehler beim Setzen des Start-Schwellenwertes: %s\n" -#: speaker-test/speaker-test.c:549 +#: speaker-test/speaker-test.c:565 #, c-format msgid "Unable to set avail min for playback: %s\n" msgstr "Fehler beim Setzen des Mindest-verfügbar-Wertes: %s\n" -#: speaker-test/speaker-test.c:556 +#: speaker-test/speaker-test.c:572 #, c-format msgid "Unable to set sw params for playback: %s\n" msgstr "Fehler beim Setzen der Software-Parameter: %s\n" -#: speaker-test/speaker-test.c:576 +#: speaker-test/speaker-test.c:592 #, fuzzy, c-format msgid "Unable to set channel map: %s\n" msgstr "Fehler beim Setzen des Mindest-verfügbar-Wertes: %s\n" -#: speaker-test/speaker-test.c:601 +#: speaker-test/speaker-test.c:617 #, c-format msgid "Can't recovery from underrun, prepare failed: %s\n" msgstr "" "Fehler bei Unterlauf-Behandlung, Re-Initialisierung fehlgeschlagen: %s\n" -#: speaker-test/speaker-test.c:612 +#: speaker-test/speaker-test.c:628 #, c-format msgid "Can't recovery from suspend, prepare failed: %s\n" msgstr "" "Fehler beim Aufwachen aus dem Ruhezustand, Re-Initialisierung " "fehlgeschlagen: %s\n" -#: speaker-test/speaker-test.c:676 speaker-test/speaker-test.c:1191 +#: speaker-test/speaker-test.c:692 speaker-test/speaker-test.c:1207 #, c-format msgid "No enough memory\n" msgstr "Nicht genug Speicher\n" -#: speaker-test/speaker-test.c:681 +#: speaker-test/speaker-test.c:697 #, c-format msgid "Cannot open WAV file %s\n" msgstr "Kann WAV-Datei %s nicht öffnen\n" -#: speaker-test/speaker-test.c:685 speaker-test/speaker-test.c:714 +#: speaker-test/speaker-test.c:701 speaker-test/speaker-test.c:730 #, c-format msgid "Invalid WAV file %s\n" msgstr "Ungültige WAV-Datei %s\n" -#: speaker-test/speaker-test.c:690 +#: speaker-test/speaker-test.c:706 #, c-format msgid "Not a WAV file: %s\n" msgstr "Keine WAV-Datei: %s\n" -#: speaker-test/speaker-test.c:694 +#: speaker-test/speaker-test.c:710 #, c-format msgid "Unsupported WAV format %d for %s\n" msgstr "Nicht unterstütztes WAV-Format %d in %s\n" -#: speaker-test/speaker-test.c:699 +#: speaker-test/speaker-test.c:715 #, c-format msgid "%s is not a mono stream (%d channels)\n" msgstr "%s ist keine Mono-Datei (%d Kanäle)\n" -#: speaker-test/speaker-test.c:704 +#: speaker-test/speaker-test.c:720 #, c-format msgid "Sample rate doesn't match (%d) for %s\n" msgstr "Sample-Rate (%d) stimmt nicht überein in %s\n" -#: speaker-test/speaker-test.c:709 +#: speaker-test/speaker-test.c:725 #, c-format msgid "Unsupported sample format bits %d for %s\n" msgstr "Nicht unterstütztes Sample-Format mit %d Bits in %s\n" -#: speaker-test/speaker-test.c:770 +#: speaker-test/speaker-test.c:786 #, c-format msgid "Undefined channel %d\n" msgstr "Kanal %d nicht definiert\n" -#: speaker-test/speaker-test.c:821 +#: speaker-test/speaker-test.c:837 #, c-format msgid "Write error: %d,%s\n" msgstr "Schreibfehler: %d, %s\n" -#: speaker-test/speaker-test.c:823 +#: speaker-test/speaker-test.c:839 #, c-format msgid "xrun_recovery failed: %d,%s\n" msgstr "xrun_recovery fehlgeschlagen: %d, %s\n" -#: speaker-test/speaker-test.c:926 +#: speaker-test/speaker-test.c:942 #, fuzzy, c-format msgid "" "Usage: speaker-test [OPTION]... \n" @@ -1625,76 +1696,80 @@ "Bereich\n" "\n" -#: speaker-test/speaker-test.c:1058 +#: speaker-test/speaker-test.c:1074 #, c-format msgid "Invalid number of periods %d\n" msgstr "Ungültige Periodenanzahl %d\n" -#: speaker-test/speaker-test.c:1074 speaker-test/speaker-test.c:1078 +#: speaker-test/speaker-test.c:1090 speaker-test/speaker-test.c:1094 #, c-format msgid "Invalid test type %s\n" msgstr "Ungültiger Test-Typ %s\n" -#: speaker-test/speaker-test.c:1111 +#: speaker-test/speaker-test.c:1127 #, c-format msgid "Unknown option '%c'\n" msgstr "Unbekannte Options '%c'\n" -#: speaker-test/speaker-test.c:1125 +#: speaker-test/speaker-test.c:1141 #, c-format msgid "Invalid parameter for -s option.\n" msgstr "Ungültiger Wert für Option -s\n" -#: speaker-test/speaker-test.c:1140 +#: speaker-test/speaker-test.c:1156 #, c-format msgid "Playback device is %s\n" msgstr "Wiedergabe-Gerät ist %s\n" -#: speaker-test/speaker-test.c:1141 +#: speaker-test/speaker-test.c:1157 #, c-format msgid "Stream parameters are %iHz, %s, %i channels\n" msgstr "Stream-Parameter sind %i Hz, %s, %i Kanäle\n" -#: speaker-test/speaker-test.c:1144 +#: speaker-test/speaker-test.c:1160 #, c-format msgid "Using 16 octaves of pink noise\n" msgstr "Verwende 16 Oktaven rosa Rauschen\n" -#: speaker-test/speaker-test.c:1147 +#: speaker-test/speaker-test.c:1163 #, c-format msgid "Sine wave rate is %.4fHz\n" msgstr "Sinuswelle mit Frequenz %.4f Hz\n" -#: speaker-test/speaker-test.c:1150 +#: speaker-test/speaker-test.c:1166 #, c-format msgid "WAV file(s)\n" msgstr "WAV-Datei(en)\n" -#: speaker-test/speaker-test.c:1160 +#: speaker-test/speaker-test.c:1176 #, c-format msgid "Playback open error: %d,%s\n" msgstr "Fehler beim Öffnen des Gerätes: %d, %s\n" -#: speaker-test/speaker-test.c:1166 +#: speaker-test/speaker-test.c:1182 #, c-format msgid "Setting of hwparams failed: %s\n" msgstr "Fehler beim Setzen der Hardware-Parameter: %s\n" -#: speaker-test/speaker-test.c:1170 +#: speaker-test/speaker-test.c:1186 #, c-format msgid "Setting of swparams failed: %s\n" msgstr "Fehler beim Setzen der Software-Parameter: %s\n" -#: speaker-test/speaker-test.c:1216 speaker-test/speaker-test.c:1238 +#: speaker-test/speaker-test.c:1232 speaker-test/speaker-test.c:1254 #, c-format msgid "Transfer failed: %s\n" msgstr "Schreibfehler: %s\n" -#: speaker-test/speaker-test.c:1224 +#: speaker-test/speaker-test.c:1240 #, c-format msgid "Time per period = %lf\n" msgstr "Zeit pro Periode = %lf\n" +#, c-format +#~ msgid "service '%s' is not found in /etc/services\n" +#~ msgstr "Service '%s' in /etc/services nicht gefunden\n" + #~ msgid "Warning: format is changed to S16_LE\n" #~ msgstr "Warnung: benutztes Format ist S16_LE\n" diff -Nru alsa-utils-1.2.2/po/en@boldquot.header alsa-utils-1.2.6/po/en@boldquot.header --- alsa-utils-1.2.2/po/en@boldquot.header 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/po/en@boldquot.header 2021-12-06 11:44:41.000000000 +0000 @@ -2,7 +2,7 @@ # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). diff -Nru alsa-utils-1.2.2/po/en@quot.header alsa-utils-1.2.6/po/en@quot.header --- alsa-utils-1.2.2/po/en@quot.header 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/po/en@quot.header 2021-12-06 11:44:41.000000000 +0000 @@ -2,7 +2,7 @@ # The msgids must be ASCII and therefore cannot contain real quotation # characters, only substitutes like grave accent (0x60), apostrophe (0x27) # and double quote (0x22). These substitutes look strange; see -# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html +# https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html # # This catalog translates grave accent (0x60) and apostrophe (0x27) to # left single quotation mark (U+2018) and right single quotation mark (U+2019). Binary files /tmp/tmp9067orz6/0nqitZVa9r/alsa-utils-1.2.2/po/eu.gmo and /tmp/tmp9067orz6/GaGL_6JOvv/alsa-utils-1.2.6/po/eu.gmo differ diff -Nru alsa-utils-1.2.2/po/eu.po alsa-utils-1.2.6/po/eu.po --- alsa-utils-1.2.2/po/eu.po 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/po/eu.po 2021-12-06 11:44:59.000000000 +0000 @@ -0,0 +1,1802 @@ +# Basque translation for alsa-utils +# Copyright (C) 2011 The ALSA Team +# This file is distributed under the same license as the alsa-utils package. +# Porrumentzio , 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: alsa-utils 1.0.23\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-06 11:44+0000\n" +"PO-Revision-Date: 2020-07-26 12:01+0200\n" +"Last-Translator: Porrumentzio \n" +"Language-Team: Librezale \n" +"Language: eu\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3.1\n" + +#: alsamixer/card_select.c:77 alsamixer/device_name.c:127 +msgid "Sound Card" +msgstr "Soinu-txartela" + +#: alsamixer/card_select.c:115 +msgid "(default)" +msgstr "(lehenetsia)" + +#: alsamixer/card_select.c:125 +msgid "cannot enumerate sound cards" +msgstr "ezin dira zerrendatu soinu-txartelak" + +#: alsamixer/card_select.c:151 +msgid "enter device name..." +msgstr "sartu gailuaren izena..." + +#: alsamixer/cli.c:43 +msgid "Usage: alsamixer [options]" +msgstr "Erabilera: alsamixer [aukerak]" + +# capture --> atzemate, hartze, kaptura(tze)...? +#: alsamixer/cli.c:44 +#, fuzzy +#| msgid "" +#| "Useful options:\n" +#| " -h, --help this help\n" +#| " -c, --card=NUMBER sound card number or id\n" +#| " -D, --device=NAME mixer device name\n" +#| " -V, --view=MODE starting view mode: playback/capture/all" +msgid "" +"Useful options:\n" +" -h, --help this help\n" +" -c, --card=NUMBER sound card number or id\n" +" -D, --device=NAME mixer device name\n" +" -m, --mouse enable mouse\n" +" -M, --no-mouse disable mouse\n" +" -f, --config=FILE configuration file\n" +" -F, --no-config do not load configuration file\n" +" -V, --view=MODE starting view mode: playback/capture/all" +msgstr "" +"Aukera erabilgarriak:\n" +" -h, --help lagunta-koadro hau\n" +" -c, --card=ZENBAKIA soinu-txartelaren zenbakia edo id-a\n" +" -D, --device=IZENA nahasgailuaren izena\n" +" -V, --view=MODUA hasteko ikuspegia: erreprodukzioa/kapturatzea/" +"guztiak" + +#: alsamixer/cli.c:53 +msgid "" +"Debugging options:\n" +" -g, --no-color toggle using of colors\n" +" -a, --abstraction=NAME mixer abstraction level: none/basic" +msgstr "" +"Arazketa aukerak:\n" +" -g, --no-color kolore gabeko interfazea\n" +" -a, --abstraction=IZENA nahasgailuaren abstrakzio maila: bat ere ez / " +"oinarrizkoa" + +#: alsamixer/cli.c:88 +#, c-format +msgid "invalid card index: %s\n" +msgstr "txartel-indize baliogabea: %s\n" + +#: alsamixer/cli.c:130 +#, c-format +msgid "unknown abstraction level: %s\n" +msgstr "abstrakzio-maila ezezaguna: %s\n" + +#: alsamixer/cli.c:135 +#, c-format +msgid "unknown option: %c\n" +msgstr "aukera ezezaguna: %c\n" + +#: alsamixer/cli.c:137 +msgid "try `alsamixer --help' for more information\n" +msgstr "probatu `alsamixer --help' xehetasunetarako\n" + +#: alsamixer/device_name.c:177 +msgid "Device name:" +msgstr "Gailu-izena:" + +#: alsamixer/die.c:37 +#, c-format +msgid "%s: %s\n" +msgstr "%s: %s\n" + +#: alsamixer/mixer_display.c:99 +msgid "Card:" +msgstr "Txartela:" + +#: alsamixer/mixer_display.c:100 +msgid "Chip:" +msgstr "Txipa:" + +#: alsamixer/mixer_display.c:101 +msgid "View:" +msgstr "Ikuspegia:" + +#: alsamixer/mixer_display.c:102 +msgid "Item:" +msgstr "Elementua:" + +#: alsamixer/mixer_display.c:105 +msgid "F1: Help" +msgstr "F1: Laguntza" + +#: alsamixer/mixer_display.c:106 +msgid "F2: System information" +msgstr "F2: Sistemaren informazioa" + +#: alsamixer/mixer_display.c:107 +msgid "F6: Select sound card" +msgstr "F6: Hautatu soinu-txartela" + +# Esc --> Ihes / Esc +#: alsamixer/mixer_display.c:108 +msgid "Esc: Exit" +msgstr "Esc: Irten" + +#: alsamixer/mixer_display.c:179 +msgid "(unplugged)" +msgstr "(deskonektatuta)" + +#: alsamixer/mixer_display.c:197 +msgid "Playback" +msgstr "Erreprodukzioa" + +#: alsamixer/mixer_display.c:198 +msgid "Capture" +msgstr "Kapturtzea" + +#: alsamixer/mixer_display.c:199 +msgid "All" +msgstr "Guztiak" + +#: alsamixer/mixer_display.c:240 +msgid "mute" +msgstr "mututu" + +#: alsamixer/mixer_display.c:281 alsamixer/mixer_display.c:291 +msgid "dB gain:" +msgstr "dB irabazia:" + +#: alsamixer/mixer_display.c:291 +#, c-format +msgid " [%s %s, %s]" +msgstr " [%s %s, %s]" + +#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:306 +#: alsamixer/mixer_display.c:312 alsamixer/mixer_display.c:318 +msgid "Off" +msgstr "Itzalita" + +#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:318 +msgid "On" +msgstr "Piztuta" + +#: alsamixer/mixer_display.c:370 +msgid "The sound device was unplugged." +msgstr "Soinu-txartela deskonektatu egin da." + +#: alsamixer/mixer_display.c:371 +msgid "Press F6 to select another sound card." +msgstr "Sakatu F6 beste soinu-txartel bat hautatzeko." + +#: alsamixer/mixer_display.c:386 +msgid "This sound device does not have any playback controls." +msgstr "Soinu-txartel honek ez du erreprodukzio kontrolik." + +#: alsamixer/mixer_display.c:388 +msgid "This sound device does not have any capture controls." +msgstr "Soinu-txartel honek ez du kapturatze kontrolik." + +#: alsamixer/mixer_display.c:390 +msgid "This sound device does not have any controls." +msgstr "Soinu-txartel honek ez du kontrolik." + +#. TRANSLATORS: playback on; one character +#: alsamixer/mixer_display.c:523 alsamixer/mixer_display.c:528 +msgid "O" +msgstr "O" + +#. TRANSLATORS: playback muted; one character +#: alsamixer/mixer_display.c:525 alsamixer/mixer_display.c:529 +msgid "M" +msgstr "M" + +#. TRANSLATORS: "left"; no more than two characters +#: alsamixer/mixer_display.c:545 +msgid "L" +msgstr "L" + +#. TRANSLATORS: "right"; no more than two characters +#: alsamixer/mixer_display.c:551 +msgid "R" +msgstr "R" + +#. TRANSLATORS: no more than eight characters +#: alsamixer/mixer_display.c:555 +msgid "CAPTURE" +msgstr "KAPTURATZEA" + +#: alsamixer/mixer_display.c:611 +msgid "Front" +msgstr "Aurrealdekoa" + +#: alsamixer/mixer_display.c:614 +msgid "Rear" +msgstr "Atzealdekoa" + +#: alsamixer/mixer_display.c:617 speaker-test/speaker-test.c:124 +msgid "Center" +msgstr "Erdialdekoa" + +#: alsamixer/mixer_display.c:620 +msgid "Woofer" +msgstr "Wooferra" + +#: alsamixer/mixer_display.c:623 +msgid "Side" +msgstr "Aldekoa" + +#: alsamixer/mixer_widget.c:91 alsamixer/mixer_widget.c:96 +msgid "cannot open mixer" +msgstr "ezin da ireki nahasgailua" + +#: alsamixer/mixer_widget.c:102 alsamixer/mixer_widget.c:179 +msgid "cannot load mixer controls" +msgstr "ezin dira kargatu nahasgailu-kontrolak" + +#: alsamixer/mixer_widget.c:169 +#, c-format +msgid "Cannot open mixer device '%s'." +msgstr "Ezin da ireki '%s' nahasgailua." + +#: alsamixer/mixer_widget.c:190 +msgid "Esc Exit" +msgstr "Esc Irten" + +#: alsamixer/mixer_widget.c:191 +msgid "F1 ? H Help" +msgstr "F1 ? H Laguntza" + +#: alsamixer/mixer_widget.c:192 +msgid "F2 / System information" +msgstr "F2 / Sistemaren informazioa" + +#: alsamixer/mixer_widget.c:193 +msgid "F3 Show playback controls" +msgstr "F3 Erakutsi erreprodukzio kontrolak" + +#: alsamixer/mixer_widget.c:194 +msgid "F4 Show capture controls" +msgstr "F4 Erakutsi kaptura kontrolak" + +#: alsamixer/mixer_widget.c:195 +msgid "F5 Show all controls" +msgstr "F5 Erakutsi kontrol guztiak" + +#: alsamixer/mixer_widget.c:196 +msgid "Tab Toggle view mode (F3/F4/F5)" +msgstr "Tab Aldatu ikuspegi modua (F3/F4/F5)" + +#: alsamixer/mixer_widget.c:197 +msgid "F6 S Select sound card" +msgstr "F6 S Hautatu soinu-txartela" + +#: alsamixer/mixer_widget.c:198 +msgid "L Redraw screen" +msgstr "L Pantaila birmarraztu" + +#: alsamixer/mixer_widget.c:200 +msgid "Left Move to the previous control" +msgstr "← Mugitu ezkerreko kontrolera" + +#: alsamixer/mixer_widget.c:201 +msgid "Right Move to the next control" +msgstr "→ Mugitu eskuineko kontrolera" + +#: alsamixer/mixer_widget.c:203 +msgid "Up/Down Change volume" +msgstr "↑ ↓ Bolumena aldatu" + +#: alsamixer/mixer_widget.c:204 +msgid "+ - Change volume" +msgstr "+ - Bolumena aldatu" + +#: alsamixer/mixer_widget.c:205 +msgid "Page Up/Dn Change volume in big steps" +msgstr "Orria↑/↓ Aldatu bolumena urrats handinaka" + +#: alsamixer/mixer_widget.c:206 +msgid "End Set volume to 0%" +msgstr "Amaiera Ezarri bolumena %0n" + +#: alsamixer/mixer_widget.c:207 +msgid "0-9 Set volume to 0%-90%" +msgstr "0-9 Ezarri bolumena %0-%90 bitartean" + +#: alsamixer/mixer_widget.c:208 +msgid "Q W E Increase left/both/right volumes" +msgstr "Q W E Handitu ezker/bi/eskuin bolumenak" + +#. TRANSLATORS: or Y instead of Z +#: alsamixer/mixer_widget.c:210 +msgid "Z X C Decrease left/both/right volumes" +msgstr "Z X C Txikitu ezker/bi/eskuin bolumenak" + +#: alsamixer/mixer_widget.c:211 +msgid "B Balance left and right volumes" +msgstr "B Orekatu ezker eta eskuin bolumenak" + +#: alsamixer/mixer_widget.c:213 +msgid "M Toggle mute" +msgstr "M Mututu/Desmututu" + +#. TRANSLATORS: or , . +#: alsamixer/mixer_widget.c:215 +msgid "< > Toggle left/right mute" +msgstr "< > Mututu/Desmututu ezker/eskuin" + +#: alsamixer/mixer_widget.c:217 +msgid "Space Toggle capture" +msgstr "Zuriunea Gaitu/Desgaitu kapturatzea" + +#. TRANSLATORS: or Insert Delete +#: alsamixer/mixer_widget.c:219 +msgid "; ' Toggle left/right capture" +msgstr "; ' Gaitu/Desgaitu ezker/eskuin kapturatzea" + +#: alsamixer/mixer_widget.c:221 +msgid "Authors:" +msgstr "Egileak:" + +#: alsamixer/mixer_widget.c:222 +msgid " Tim Janik" +msgstr " Tim Janik" + +#: alsamixer/mixer_widget.c:223 +msgid " Jaroslav Kysela " +msgstr " Jaroslav Kysela " + +#: alsamixer/mixer_widget.c:224 +msgid " Clemens Ladisch " +msgstr " Clemens Ladisch " + +#: alsamixer/mixer_widget.c:226 +msgid "Help" +msgstr "Laguntza" + +#: alsamixer/proc_files.c:56 +msgid "Select File" +msgstr "Hautatu fitxategia" + +#: alsamixer/textbox.c:51 alsamixer/textbox.c:65 +msgid "Error" +msgstr "Errorea" + +#: alsamixer/textbox.c:80 +#, c-format +msgid "Cannot open file \"%s\"." +msgstr "Ezin da ireki \"%s\" fitxategia." + +#: aplay/aplay.c:180 +msgid "raw data" +msgstr "datu gordinak" + +#: aplay/aplay.c:181 +msgid "VOC" +msgstr "VOC" + +#: aplay/aplay.c:183 +msgid "WAVE" +msgstr "WAVE" + +#: aplay/aplay.c:184 +msgid "Sparc Audio" +msgstr "Sparc Audio" + +#: aplay/aplay.c:205 +#, c-format +msgid "" +"Usage: %s [OPTION]... [FILE]...\n" +"\n" +"-h, --help help\n" +" --version print current version\n" +"-l, --list-devices list all soundcards and digital audio devices\n" +"-L, --list-pcms list device names\n" +"-D, --device=NAME select PCM by name\n" +"-q, --quiet quiet mode\n" +"-t, --file-type TYPE file type (voc, wav, raw or au)\n" +"-c, --channels=# channels\n" +"-f, --format=FORMAT sample format (case insensitive)\n" +"-r, --rate=# sample rate\n" +"-d, --duration=# interrupt after # seconds\n" +"-s, --samples=# interrupt after # samples per channel\n" +"-M, --mmap mmap stream\n" +"-N, --nonblock nonblocking mode\n" +"-F, --period-time=# distance between interrupts is # microseconds\n" +"-B, --buffer-time=# buffer duration is # microseconds\n" +" --period-size=# distance between interrupts is # frames\n" +" --buffer-size=# buffer duration is # frames\n" +"-A, --avail-min=# min available space for wakeup is # microseconds\n" +"-R, --start-delay=# delay for automatic PCM start is # microseconds \n" +" (relative to buffer size if <= 0)\n" +"-T, --stop-delay=# delay for automatic PCM stop is # microseconds from " +"xrun\n" +"-v, --verbose show PCM structure and setup (accumulative)\n" +"-V, --vumeter=TYPE enable VU meter (TYPE: mono or stereo)\n" +"-I, --separate-channels one file for each channel\n" +"-i, --interactive allow interactive operation from stdin\n" +"-m, --chmap=ch1,ch2,.. Give the channel map to override or follow\n" +" --disable-resample disable automatic rate resample\n" +" --disable-channels disable automatic channel conversions\n" +" --disable-format disable automatic format conversions\n" +" --disable-softvol disable software volume control (softvol)\n" +" --test-position test ring buffer position\n" +" --test-coef=# test coefficient for ring buffer position (default " +"8)\n" +" expression for validation is: coef * (buffer_size / " +"2)\n" +" --test-nowait do not wait for ring buffer - eats whole CPU\n" +" --max-file-time=# start another output file when the old file has " +"recorded\n" +" for this many seconds\n" +" --process-id-file write the process ID here\n" +" --use-strftime apply the strftime facility to the output file name\n" +" --dump-hw-params dump hw_params of the device\n" +" --fatal-errors treat all errors as fatal\n" +msgstr "" +"Usage: %s [OPTION]... [FILE]...\n" +"\n" +"-h, --help laguntza\n" +" --version erakutsi oraingo bertsioa\n" +"-l, --list-devices zerrendatu soinu-txartel eta audio-digital gailu " +"guztiak\n" +"-L, --list-pcms zerrendatu gailuen izenak\n" +"-D, --device=IZENA hautatu PCM izenaren arabera\n" +"-q, --quiet modu isila\n" +"-t, --file-type MOTA fitxategi mota (voc, wav, raw edo au)\n" +"-c, --channels=# kanalak\n" +"-f, --format=FORMATUA laginaren formatua (ez dira bereizten maiuskulak eta " +"minuskulak)\n" +"-r, --rate=# lagin-tasa\n" +"-d, --duration=# gelditu # segundu ostean\n" +"-s, --samples=# gelditu kanaleko # lagin ostean\n" +"-M, --mmap mmap stream-a\n" +"-N, --nonblock nonblocking modua\n" +"-F, --period-time=# geldialdien arteko distantzia # mikrosegundokoa da\n" +"-B, --buffer-time=# bufferraren iraupena # mikrosegunfokoa da\n" +" --period-size=# geldialdien arteko distantzia # laginekoa da\n" +" --buffer-size=# bufferraren iraupena # laginekoa da\n" +"-A, --avail-min=# esnatzeko gutxieneko espazio eskuragarria # " +"mikrosegundo da\n" +"-R, --start-delay=# PCM automatikoki hasteko atzerapena # mikrosegundo " +"da \n" +" (buffer-tamainaren erlatiboa baldin eta <= 0)\n" +"-T, --stop-delay=# PCM automatikoki gelditzeko atzerapena # " +"mikrosegundo da xrun-etik\n" +"-v, --verbose erakutsi PCM egitura eta ezarpena (pilagarria)\n" +"-V, --vumeter=MOTA gaitu VU neurgailua (MOTA: mono edo stereo)\n" +"-I, --separate-channels fitxategi bat kanaleko\n" +"-i, --interactive baimendu ekintza interaktiboa stdin-etik\n" +"-m, --chmap=ch1,ch2,.. Eman kanal-mapa gainidatzi edo jarraitzeko\n" +" --disable-resample desgaitu tasa birlagintze automatikoa\n" +" --disable-channels desgaitu kanal bihurketa automatikoa\n" +" --disable-format desgaitu formatu bihurketa automatikoa\n" +" --disable-softvol desgaitu software volume control (softvol)\n" +" --test-position probatu eraztun-bufferraren kokalekua\n" +" --test-coef=# probatu eraztun-bufferraren kokalekuarentzako " +"koefizientea (lehenetsia 8)\n" +" baliozkotzeko adierazpena hau da: koef * " +"(buffer_tamaina / 2)\n" +" --test-nowait ez itxaron eraztun-bufferrari - PUZ osoa erabiliko " +"du\n" +" --max-file-time=# beste irteera-fitxategi bat abiarazi, fitxategi " +"zaharrak\n" +" segundo askotarako grabatu duenean\n" +" --process-id-file erakutsi hemen prozesuaren IDa\n" +" --use-strftime aplikatu strftime instalazioa irteera-fitxategiaren " +"izenari \n" +" --dump-hw-params ezkutatu gailuaren hw parametroak\n" +" --fatal-errors jo errore guztiak larritzat\n" + +#: aplay/aplay.c:250 speaker-test/speaker-test.c:961 +#, c-format +msgid "Recognized sample formats are:" +msgstr "Hauek dira onartutako lagin-formatuak:" + +#: aplay/aplay.c:256 +#, c-format +msgid "" +"\n" +"Some of these may not be available on selected hardware\n" +msgstr "" +"\n" +"Baliteke horietako batzuk erabilgarri ez egotea hautatutako hardwarean\n" + +#: aplay/aplay.c:257 +#, c-format +msgid "The available format shortcuts are:\n" +msgstr "Hauek dira formatu laster-tekla erabilgarriak:\n" + +#: aplay/aplay.c:258 +#, c-format +msgid "-f cd (16 bit little endian, 44100, stereo)\n" +msgstr "-f cd (16 bit bukaera txikia, 44100, estereo)\n" + +#: aplay/aplay.c:259 +#, c-format +msgid "-f cdr (16 bit big endian, 44100, stereo)\n" +msgstr "-f cdr (16 bit bukaera handia, 44100, estereo)\n" + +#: aplay/aplay.c:260 +#, c-format +msgid "-f dat (16 bit little endian, 48000, stereo)\n" +msgstr "-f dat (16 bit bukaera txikia, 48000, estereo)\n" + +#: aplay/aplay.c:274 +msgid "no soundcards found..." +msgstr "ez da soinu-txartelik aurkitu..." + +#: aplay/aplay.c:277 +#, c-format +msgid "**** List of %s Hardware Devices ****\n" +msgstr "**** %s hardware gailuen zerrenda ****\n" + +#: aplay/aplay.c:306 +#, c-format +msgid "card %i: %s [%s], device %i: %s [%s]\n" +msgstr "%i txartela: %s [%s], %i gailua: %s [%s]\n" + +#: aplay/aplay.c:312 +#, c-format +msgid " Subdevices: %i/%i\n" +msgstr " Azpigailuak: %i/%i\n" + +#: aplay/aplay.c:319 +#, c-format +msgid " Subdevice #%i: %s\n" +msgstr " #%i azpigailua: %s\n" + +#: aplay/aplay.c:400 +#, c-format +msgid "Aborted by signal %s...\n" +msgstr "%s seinaleak abortatuta...\n" + +#: aplay/aplay.c:555 +msgid "command should be named either arecord or aplay" +msgstr "komandoa arecord edo aplay gisa izendatu behar da" + +#: aplay/aplay.c:599 +#, c-format +msgid "unrecognized file format %s" +msgstr "%s fitxategi-formatu ezezaguna" + +#: aplay/aplay.c:606 +#, c-format +msgid "invalid channels argument '%s'" +msgstr "kanalen '%s' argumentu baliogabea" + +#: aplay/aplay.c:610 +#, c-format +msgid "value %i for channels is invalid" +msgstr "kanalentzako %i balio baliogabea" + +#: aplay/aplay.c:630 +#, c-format +msgid "wrong extended format '%s'" +msgstr "'%s' formatu hedatua ez da zuzena" + +#: aplay/aplay.c:638 +#, c-format +msgid "invalid rate argument '%s'" +msgstr "'%s' tasa argumentu baliogabea" + +#: aplay/aplay.c:645 +#, c-format +msgid "bad speed value %i" +msgstr "%i abiadura balio okerra" + +#: aplay/aplay.c:651 +msgid "duration and samples arguments cannot be used together" +msgstr "iraupen eta lagin argumentuak ezin dira elkarrekin erabili" + +#: aplay/aplay.c:656 +#, c-format +msgid "invalid duration argument '%s'" +msgstr "'%s' iraupen argumentu baliogabea" + +#: aplay/aplay.c:663 +msgid "samples and duration arguments cannot be used together" +msgstr "lagin eta iraupen argumentuak ezin dira elkarrekin erabili" + +#: aplay/aplay.c:668 +#, c-format +msgid "invalid samples argument '%s'" +msgstr "'%s' lagin argumentu baliogabea" + +#: aplay/aplay.c:680 +#, c-format +msgid "invalid period time argument '%s'" +msgstr "'%s' periodo-denbora argumentu baliogabea" + +#: aplay/aplay.c:687 +#, c-format +msgid "invalid buffer time argument '%s'" +msgstr "'%s' buffer-denbora argumentu baliogabea" + +#: aplay/aplay.c:694 +#, c-format +msgid "invalid period size argument '%s'" +msgstr "'%s' periodo-tamaina argumentu baliogabea" + +#: aplay/aplay.c:701 +#, c-format +msgid "invalid buffer size argument '%s'" +msgstr "'%s' buffer-tamaina argumentu baliogabea" + +#: aplay/aplay.c:708 +#, c-format +msgid "invalid min available space argument '%s'" +msgstr "'%s' gutxieneko espazio erabilgarri argumentu baliogabea" + +#: aplay/aplay.c:715 +#, c-format +msgid "invalid start delay argument '%s'" +msgstr "'%s' haste-atzerapen argumentu baliogabea" + +#: aplay/aplay.c:722 +#, c-format +msgid "invalid stop delay argument '%s'" +msgstr "'%s' gelditze-atzerapen argumentu baliogabea" + +#: aplay/aplay.c:777 +#, c-format +msgid "invalid test coef argument '%s'" +msgstr "'%s' koef. proba argumentu baliogabea" + +#: aplay/aplay.c:789 +#, c-format +msgid "invalid max file time argument '%s'" +msgstr "'%s' gehienezko fitxategi-denbora argumentu baliogabea" + +#: aplay/aplay.c:809 speaker-test/speaker-test.c:587 +#, c-format +msgid "Unable to parse channel map string: %s\n" +msgstr "Ezin da kanal-maparen katea analizatu: %s\n" + +#: aplay/aplay.c:815 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Probatu `%s --help' xehetasun gehiagorako.\n" + +#: aplay/aplay.c:831 +#, c-format +msgid "audio open error: %s" +msgstr "audio irekitze errorea: %s" + +#: aplay/aplay.c:836 +#, c-format +msgid "info error: %s" +msgstr "informazio errorea: %s" + +#: aplay/aplay.c:843 +#, c-format +msgid "nonblock setting error: %s" +msgstr "nonblock-en konfigurazio-ezarpen errorea: %s" + +#: aplay/aplay.c:861 aplay/aplay.c:985 aplay/aplay.c:1275 aplay/aplay.c:1475 +#: aplay/aplay.c:2055 aplay/aplay.c:2085 +msgid "not enough memory" +msgstr "ez dago behar adina memoria" + +#: aplay/aplay.c:885 +#, c-format +msgid "Cannot create process ID file %s: %s" +msgstr "Ezin da sortu %s prozesuaren ID fitxategia: %s" + +#: aplay/aplay.c:975 +#, c-format +msgid "read error (called from line %i)" +msgstr "irakurtzean errorea (%i lerrotik deitua)" + +#: aplay/aplay.c:1042 +#, c-format +msgid "unknown length of 'fmt ' chunk (read %u, should be %u at least)" +msgstr "'fmt' chunk luzera ezezaguna (%u irakurri, %u izan behar du gutxienez)" + +#: aplay/aplay.c:1053 +#, c-format +msgid "" +"unknown length of extensible 'fmt ' chunk (read %u, should be %u at least)" +msgstr "" +"'fmt' chunk hedagarri luzera ezezaguna (%u irakurri, %u izan behar du " +"gutxienez)" + +#: aplay/aplay.c:1058 +msgid "wrong format tag in extensible 'fmt ' chunk" +msgstr "formatua ez da zuzena 'fmt' chunk hedagarrian" + +#: aplay/aplay.c:1065 +#, c-format +msgid "can't play WAVE-file format 0x%04x which is not PCM or FLOAT encoded" +msgstr "" +"ezin da erreproduzitu PCM edo FLOAT kodetua ez den 0x%04x WAVE-fitxategiaren " +"formatua" + +#: aplay/aplay.c:1070 +#, c-format +msgid "can't play WAVE-files with %d tracks" +msgstr "ezin dira erreproduzitu %d pista dituzten WAVE-fitxategiak" + +#: aplay/aplay.c:1078 aplay/aplay.c:1204 +#, c-format +msgid "Warning: format is changed to U8\n" +msgstr "Abisua: formatua U8-ra aldatu da\n" + +#: aplay/aplay.c:1088 aplay/aplay.c:1101 aplay/aplay.c:1112 +#, c-format +msgid "Warning: format is changed to %s\n" +msgstr "Abisua: formatua %s-(e)ra aldatu da\n" + +#: aplay/aplay.c:1117 +#, c-format +msgid "" +" can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)" +msgstr "" +" ezin dira erreproduzitu %d byteko zabaleran %d lagin-bita duten WAVE-" +"fitxategiak (%d kanal)" + +#: aplay/aplay.c:1140 +#, c-format +msgid " can't play WAVE-files with sample %d bits wide" +msgstr "" +" ezin dira erreproduzitu %d lagin-biteko zabalera duten WAVE-fitxategiak" + +#: aplay/aplay.c:1198 +#, c-format +msgid "Warning: format is changed to MU_LAW\n" +msgstr "Abisua: formatua MU_LAW-era aldatu da\n" + +#: aplay/aplay.c:1210 +#, c-format +msgid "Warning: format is changed to S16_BE\n" +msgstr "Abisua: formatua S16_BE-ra aldatu da\n" + +#: aplay/aplay.c:1223 aplay/aplay.c:2376 aplay/aplay.c:2383 aplay/aplay.c:2912 +msgid "read error" +msgstr "irakurtze errorea" + +#: aplay/aplay.c:1253 +msgid "Channel numbers don't match between hw_params and channel map" +msgstr "Kanal-zenbakiak ez datoz bat hw parametro eta kanal-maparen artean" + +#: aplay/aplay.c:1262 +#, c-format +msgid "Warning: unable to get channel map\n" +msgstr "Abisua: ezin dat kanal-mapa eskuratu\n" + +#: aplay/aplay.c:1296 +#, fuzzy, c-format +#| msgid "Channel %d doesn't match with hw_parmas" +msgid "Channel %d doesn't match with hw_params" +msgstr "%d kanala ez dator bat hw parametroekin" + +#: aplay/aplay.c:1323 +msgid "Broken configuration for this PCM: no configurations available" +msgstr "" +"PCM honetarako konfigurazio hautsia: ez dago konfigurazio erabilgarririk" + +#: aplay/aplay.c:1327 +#, c-format +msgid "HW Params of device \"%s\":\n" +msgstr "\"%s\" gailuaren HW parametroak:\n" + +#: aplay/aplay.c:1347 +msgid "Access type not available" +msgstr "Sarbide-mota ez dago erabilgarri" + +#: aplay/aplay.c:1352 +msgid "Sample format non available" +msgstr "Lagin formatua ez dago erabilgarri" + +#: aplay/aplay.c:1358 +msgid "Channels count non available" +msgstr "Kanal zenbaketa ez dago erabilgarri" + +#: aplay/aplay.c:1373 +#, c-format +msgid "Warning: rate is not accurate (requested = %iHz, got = %iHz)\n" +msgstr "" +"Abisua: lagin-tasa ez da zehatza (eskatutakoa = %iHz, eskuratutakoa = %iHz)\n" + +#: aplay/aplay.c:1379 +#, c-format +msgid " please, try the plug plugin %s\n" +msgstr " probatu %s konektatze-plugina\n" + +#: aplay/aplay.c:1416 +msgid "Unable to install hw params:" +msgstr "Ezin dira hw parametroak instalatu:" + +#: aplay/aplay.c:1423 +#, c-format +msgid "Can't use period equal to buffer size (%lu == %lu)" +msgstr "Ezin da bufferraren tamaina bereko periodoa erabili (%lu == %lu)" + +#: aplay/aplay.c:1429 +#, fuzzy +#| msgid "unable to install sw params:" +msgid "Unable to get current sw params." +msgstr "ezin dira sw parametroak instalatu:" + +#: aplay/aplay.c:1458 +msgid "unable to install sw params:" +msgstr "ezin dira sw parametroak instalatu:" + +#: aplay/aplay.c:1493 +#, c-format +msgid "snd_pcm_mmap_begin problem: %s" +msgstr "snd_pcm_mmap_begin arazoa: %s" + +#: aplay/aplay.c:1522 +#, c-format +msgid "stdin O_NONBLOCK flag setup failed\n" +msgstr "stdin O_NONBLOCK marka ezartzeak huts egin du\n" + +#: aplay/aplay.c:1559 +#, c-format +msgid "\rPAUSE command ignored (no hw support)\n" +msgstr "\rPAUSE komandoa ezikusi da (ez du hw sostengurik)\n" + +#: aplay/aplay.c:1567 +#, c-format +msgid "pause push error: %s" +msgstr "pause push errorea: %s" + +#: aplay/aplay.c:1578 +#, c-format +msgid "pause release error: %s" +msgstr "pause release errorea: %s" + +#: aplay/aplay.c:1594 +#, c-format +msgid "" +"\r=== PAUSE === " +msgstr "" +"\r=== PAUSE === " + +#: aplay/aplay.c:1636 +#, c-format +msgid "status error: %s" +msgstr "egoera errorea: %s" + +#: aplay/aplay.c:1641 +#, c-format +msgid "fatal %s: %s" +msgstr "%s larria: %s" + +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1656 aplay/aplay.c:1664 +msgid "underrun" +msgstr "underrun (azpiratzea)" + +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1664 +msgid "overrun" +msgstr "overrun (gainditzea)" + +#: aplay/aplay.c:1652 aplay/aplay.c:1663 +#, c-format +msgid "%s!!! (at least %.3f ms long)\n" +msgstr "%s!!! (behintzat %.3f ms luze)\n" + +#: aplay/aplay.c:1668 +#, c-format +msgid "Status:\n" +msgstr "Egoera:\n" + +#: aplay/aplay.c:1672 +#, c-format +msgid "xrun: prepare error: %s" +msgstr "xrun: prestakuntza errorea: %s" + +#: aplay/aplay.c:1679 +#, c-format +msgid "Status(DRAINING):\n" +msgstr "Egoera(HUSTEN):\n" + +#: aplay/aplay.c:1683 +#, c-format +msgid "capture stream format change? attempting recover...\n" +msgstr "kaptura-fluxu formatua aldatu? berreskuratzea saiatzen...\n" + +#: aplay/aplay.c:1685 +#, c-format +msgid "xrun(DRAINING): prepare error: %s" +msgstr "xrun(HUSTEN): prestakuntza errorea: %s" + +#: aplay/aplay.c:1692 +#, c-format +msgid "Status(R/W):\n" +msgstr "Egoera(Irak/Idat):\n" + +#: aplay/aplay.c:1695 +#, c-format +msgid "read/write error, state = %s" +msgstr "irakurtze/idazte errorea, egoera = %s" + +#: aplay/aplay.c:1705 +#, c-format +msgid "Suspended. Trying resume. " +msgstr "Etenda. Berrekiten saiatzen. " + +#: aplay/aplay.c:1711 +#, c-format +msgid "Failed. Restarting stream. " +msgstr "Huts egin du. Fluxua berrabiarazten. " + +#: aplay/aplay.c:1714 +#, c-format +msgid "suspend: prepare error: %s" +msgstr "eten: prestakuntza errorea: %s" + +#: aplay/aplay.c:1719 +#, c-format +msgid "Done.\n" +msgstr "Egina.\n" + +#: aplay/aplay.c:1741 +#, c-format +msgid " !clip " +msgstr " !clip " + +#: aplay/aplay.c:1893 +#, c-format +msgid "Unsupported bit size %d.\n" +msgstr "Euskarririk gabeko %d bit-tamaina.\n" + +#: aplay/aplay.c:1929 +#, c-format +msgid "Max peak (%li samples): 0x%08x " +msgstr "Gehiengo gailurra (%li lagin): 0x%08x " + +#: aplay/aplay.c:1970 +#, c-format +msgid "" +"Suspicious buffer position (%li total): avail = %li, delay = %li, buffer = " +"%li\n" +msgstr "" +"Buffer-kokaleku susmagarria (%li guztira) eskurag = %li, atzerapena = %li, " +"bufferra = %li\n" + +#: aplay/aplay.c:1979 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious status buffer position (%li total): avail = %li, delay = %li, " +"buffer = %li\n" +msgstr "" +"Buffer-kokaleku susmagarria (%li guztira) eskurag = %li, atzerapena = %li, " +"bufferra = %li\n" + +#: aplay/aplay.c:1983 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious buffer position avail > delay (%li total): avail = %li, delay = " +"%li\n" +msgstr "" +"Buffer-kokaleku susmagarria (%li guztira) eskurag = %li, atzerapena = %li, " +"bufferra = %li\n" + +#: aplay/aplay.c:1987 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious status buffer position avail > delay (%li total): avail = %li, " +"delay = %li\n" +msgstr "" +"Buffer-kokaleku susmagarria (%li guztira) eskurag = %li, atzerapena = %li, " +"bufferra = %li\n" + +#: aplay/aplay.c:2030 +#, c-format +msgid "Status(R/W) (standalone avail=%li delay=%li):\n" +msgstr "" + +#: aplay/aplay.c:2127 +#, c-format +msgid "write error: %s" +msgstr "idazte errorea: %s" + +#: aplay/aplay.c:2175 +#, c-format +msgid "writev error: %s" +msgstr "writev errorea: %s" + +#: aplay/aplay.c:2221 +#, c-format +msgid "read error: %s" +msgstr "irakurtze errorea: %s" + +#: aplay/aplay.c:2268 +#, c-format +msgid "readv error: %s" +msgstr "readv errorea: %s" + +#: aplay/aplay.c:2317 +msgid "can't allocate buffer for silence" +msgstr "ezin da esleitu bufferra isiltasunerako" + +#: aplay/aplay.c:2326 aplay/aplay.c:2554 aplay/aplay.c:2559 aplay/aplay.c:2611 +#: aplay/aplay.c:2620 aplay/aplay.c:2627 aplay/aplay.c:2637 aplay/aplay.c:2643 +#: aplay/aplay.c:2715 aplay/aplay.c:2745 aplay/aplay.c:2759 +msgid "write error" +msgstr "idazte errorea" + +#: aplay/aplay.c:2339 +#, c-format +msgid "voc_pcm_flush - silence error" +msgstr "voc_pcm_flush - isiltasun errorea" + +#: aplay/aplay.c:2342 +msgid "voc_pcm_flush error" +msgstr "voc_pcm_flush errorea" + +#: aplay/aplay.c:2367 +msgid "malloc error" +msgstr "malloc errorea" + +#: aplay/aplay.c:2371 +#, c-format +msgid "Playing Creative Labs Channel file '%s'...\n" +msgstr "'%s' Creative Labs Channel fitxategia erreproduzitzen...\n" + +#: aplay/aplay.c:2439 aplay/aplay.c:2534 +msgid "can't play packed .voc files" +msgstr "ezin dira erreproduzitu paketatutako .voc fitxategiak" + +#: aplay/aplay.c:2494 +#, c-format +msgid "can't play loops; %s isn't seekable\n" +msgstr "ezin dira begiztak erreproduzitu; %s ez da bilagarria\n" + +#: aplay/aplay.c:2543 +#, c-format +msgid "unknown blocktype %d. terminate." +msgstr "%d bloke-mota ezezaguna. Amaitu." + +#: aplay/aplay.c:2679 +#, c-format +msgid "Wave doesn't support %s format..." +msgstr "Wave-ek ez du %s formatua onartzen..." + +#: aplay/aplay.c:2739 +#, c-format +msgid "Sparc Audio doesn't support %s format..." +msgstr "Sparc Audio-k ez du %s formatua onartzen..." + +#: aplay/aplay.c:2814 +msgid "Playing" +msgstr "Erreproduzitzen" + +#: aplay/aplay.c:2814 +msgid "Recording" +msgstr "Grabatzen" + +#: aplay/aplay.c:2818 +#, c-format +msgid "Rate %d Hz, " +msgstr "Tasa %d Hz, " + +#: aplay/aplay.c:2820 +#, c-format +msgid "Mono" +msgstr "Mono" + +#: aplay/aplay.c:2822 +#, c-format +msgid "Stereo" +msgstr "Estereo" + +#: aplay/aplay.c:2824 +#, c-format +msgid "Channels %i" +msgstr "Kanalak %i" + +#: aplay/aplay.c:3431 +#, fuzzy, c-format +#| msgid "You need to specify %d files" +msgid "You need to specify %u files" +msgstr "%d fitxategiak zehaztu behar dituzu" + +#: aplay/aplay.c:3484 +#, c-format +msgid "You need to specify %d files" +msgstr "%d fitxategiak zehaztu behar dituzu" + +#: seq/aconnect/aconnect.c:49 +#, c-format +msgid "aconnect - ALSA sequencer connection manager\n" +msgstr "aconnect - ALSA konexio sekuentziadorearen kudeatzailea\n" + +#: seq/aconnect/aconnect.c:50 +#, c-format +msgid "Copyright (C) 1999-2000 Takashi Iwai\n" +msgstr "Copyright (C) 1999-2000 Takashi Iwai\n" + +#: seq/aconnect/aconnect.c:51 +#, c-format +msgid "Usage:\n" +msgstr "Erabilera:\n" + +#: seq/aconnect/aconnect.c:52 +#, c-format +msgid " * Connection/disconnection between two ports\n" +msgstr " * Bi ataken arteko konexio/deskonexioak\n" + +#: seq/aconnect/aconnect.c:53 +#, c-format +msgid " aconnect [-options] sender receiver\n" +msgstr " aconnect [-aukerak] bidaltzailea hartzailea\n" + +#: seq/aconnect/aconnect.c:54 +#, c-format +msgid " sender, receiver = client:port pair\n" +msgstr " bidaltzailea, hartzailea = bezeroa:ataka parea\n" + +#: seq/aconnect/aconnect.c:55 +#, c-format +msgid " -d,--disconnect disconnect\n" +msgstr " -d,--disconnect deskonektatu\n" + +#: seq/aconnect/aconnect.c:56 +#, c-format +msgid " -e,--exclusive exclusive connection\n" +msgstr " -e,--exclusive konexio esklusiboa\n" + +#: seq/aconnect/aconnect.c:57 +#, c-format +msgid " -r,--real # convert real-time-stamp on queue\n" +msgstr " -r,--real # sartu denbora-errealeko-zigilua ilaran\n" + +#: seq/aconnect/aconnect.c:58 +#, c-format +msgid " -t,--tick # convert tick-time-stamp on queue\n" +msgstr " -t,--tick # sartu denbora-marka-zigilua ilaran\n" + +#: seq/aconnect/aconnect.c:59 +#, c-format +msgid " * List connected ports (no subscription action)\n" +msgstr " * Zerrendatu konektatutako atakak (harpidetza-ekintzarik ez)\n" + +#: seq/aconnect/aconnect.c:60 +#, c-format +msgid " aconnect -i|-o [-options]\n" +msgstr " aconnect -i|-o [-aukerak]\n" + +#: seq/aconnect/aconnect.c:61 +#, c-format +msgid " -i,--input list input (readable) ports\n" +msgstr "" +" -i,--input zerrendatu sarrera-atakak (irakurgarriak)\n" +"\n" + +#: seq/aconnect/aconnect.c:62 +#, c-format +msgid " -o,--output list output (writable) ports\n" +msgstr " -o,--output zerrendatu irteera-atakak (idazgarriak)\n" + +#: seq/aconnect/aconnect.c:63 +#, c-format +msgid " -l,--list list current connections of each port\n" +msgstr "" +" -l,--list zerrendatu ataka bakoitzak orain dituen loturak\n" + +#: seq/aconnect/aconnect.c:64 +#, c-format +msgid " * Remove all exported connections\n" +msgstr "" +" * Ezabatu esportatutako konexio guztiak\n" +"\n" + +#: seq/aconnect/aconnect.c:65 +#, c-format +msgid " -x, --removeall\n" +msgstr " -x, --removeall\n" + +#: seq/aconnect/aconnect.c:132 +msgid "Connecting To" +msgstr "Hona konektatzen" + +#: seq/aconnect/aconnect.c:133 +msgid "Connected From" +msgstr "Hemendik konektatuta" + +#: seq/aconnect/aconnect.c:171 +#, c-format +msgid "client %d: '%s' [type=%s" +msgstr "%d bezeroa: '%s' [mota=%s" + +#: seq/aconnect/aconnect.c:175 +msgid "user" +msgstr "erabiltzailea" + +#: seq/aconnect/aconnect.c:175 +msgid "kernel" +msgstr "kernela" + +#: seq/aconnect/aconnect.c:323 +#, c-format +msgid "can't open sequencer\n" +msgstr "ezin da ireki sekuentziadorea\n" + +#: seq/aconnect/aconnect.c:351 +#, c-format +msgid "can't get client id\n" +msgstr "ezin da lortu bezeroaren IDa\n" + +#: seq/aconnect/aconnect.c:358 +#, c-format +msgid "can't set client info\n" +msgstr "ezin da zehaztu bezeroaren informazioa\n" + +#: seq/aconnect/aconnect.c:365 +#, c-format +msgid "invalid sender address %s\n" +msgstr "%s bidaltzaile-helbide baliogabea\n" + +#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:303 +#, c-format +msgid "invalid destination address %s\n" +msgstr "%s hartzaile-helbide baliogabea\n" + +#: seq/aconnect/aconnect.c:384 +#, c-format +msgid "No subscription is found\n" +msgstr "Ez da harpidetzarik aurkitu\n" + +#: seq/aconnect/aconnect.c:389 +#, c-format +msgid "Disconnection failed (%s)\n" +msgstr "Deskonektatzeak huts egin du (%s)\n" + +#: seq/aconnect/aconnect.c:395 +#, c-format +msgid "Connection is already subscribed\n" +msgstr "Konexioa jada harpidetua dago\n" + +#: seq/aconnect/aconnect.c:400 +#, c-format +msgid "Connection failed (%s)\n" +msgstr "Konexioak huts egin du (%s)\n" + +#: seq/aseqnet/aseqnet.c:171 +#, c-format +msgid "aseqnet - network client/server on ALSA sequencer\n" +msgstr "aseqnet - ALSA sekuentziadorearen sarerako bezeroa/zerbitzaria\n" + +#: seq/aseqnet/aseqnet.c:172 +#, c-format +msgid " Copyright (C) 1999 Takashi Iwai\n" +msgstr " Copyright (C) 1999 Takashi Iwai\n" + +#: seq/aseqnet/aseqnet.c:173 +#, c-format +msgid "usage:\n" +msgstr "erabilera:\n" + +#: seq/aseqnet/aseqnet.c:174 +#, c-format +msgid " server mode: aseqnet [-options]\n" +msgstr " zerbitzari modua: aseqnet [-aukerak]\n" + +#: seq/aseqnet/aseqnet.c:175 +#, c-format +msgid " client mode: aseqnet [-options] server_host\n" +msgstr " bezero modua: aseqnet [-aukerak] zerbitzari_ostalaria\n" + +#: seq/aseqnet/aseqnet.c:176 +#, c-format +msgid "options:\n" +msgstr "aukerak:\n" + +#: seq/aseqnet/aseqnet.c:177 +#, c-format +msgid " -6,--ipv6 : use IPv6 TCP protocol\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:178 +#, c-format +msgid " -p,--port # : specify TCP port (digit or service name)\n" +msgstr " -p,--port # : zehaztu TCP ataka (zerbitzuaren digitua edo izena)\n" + +#: seq/aseqnet/aseqnet.c:179 +#, c-format +msgid " -s,--source addr : read from given addr (client:port)\n" +msgstr "" +" -s,--source helbidea : irakurri emandako helbidetik (bezeroa:ataka)\n" + +#: seq/aseqnet/aseqnet.c:180 +#, c-format +msgid " -d,--dest addr : write to given addr (client:port)\n" +msgstr " -d,--dest helbidea : idatzi emandako helbidean (bezeroa:ataka)\n" + +#: seq/aseqnet/aseqnet.c:181 +#, c-format +msgid " -n,--name value : use a specific midi process name\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:182 +#, c-format +msgid " -v, --verbose : print verbose messages\n" +msgstr " -v, --verbose : erakutsi mezu xehatuak\n" + +#: seq/aseqnet/aseqnet.c:183 +#, c-format +msgid " -i, --info : print certain received events\n" +msgstr " -i, --info : erakutsi jasotako zenbait gertaera\n" + +#: seq/aseqnet/aseqnet.c:197 +#, c-format +msgid "can't malloc\n" +msgstr "ezin da malloc exekutatu\n" + +#: seq/aseqnet/aseqnet.c:222 +#, c-format +msgid "closing files..\n" +msgstr "fitxategiak ixten...\n" + +#: seq/aseqnet/aseqnet.c:285 +#, c-format +msgid "sequencer opened: %d:%d\n" +msgstr "sekuentziadorea ireki da: %d:%d\n" + +#: seq/aseqnet/aseqnet.c:292 +#, c-format +msgid "invalid source address %s\n" +msgstr "%s iturburu-helbide baliogabea\n" + +#: seq/aseqnet/aseqnet.c:362 +#, fuzzy, c-format +#| msgid "can't get address %s\n" +msgid "can't get address\n" +msgstr "ezin da %s helbidea lortu\n" + +#: seq/aseqnet/aseqnet.c:376 seq/aseqnet/aseqnet.c:461 +#, fuzzy, c-format +#| msgid "Connecting To" +msgid "connecting to: %s\n" +msgstr "Hona konektatzen" + +#: seq/aseqnet/aseqnet.c:414 +#, c-format +msgid "too many connections!\n" +msgstr "konexio gehiegi!\n" + +#: seq/aseqnet/aseqnet.c:425 +#, c-format +msgid "accepted[%d]\n" +msgstr "onartua[%d]\n" + +#: seq/aseqnet/aseqnet.c:447 +#, c-format +msgid "can't get address %s\n" +msgstr "ezin da %s helbidea lortu\n" + +#: seq/aseqnet/aseqnet.c:475 +#, c-format +msgid "ok.. connected\n" +msgstr "ados... konektatuta\n" + +#: seq/aseqnet/aseqnet.c:574 +#, c-format +msgid "Channel %2d: Control event : %5d\n" +msgstr "%2d kanala: kontrol-gertaera : %5d\n" + +#: seq/aseqnet/aseqnet.c:578 +#, c-format +msgid "Channel %2d: Pitchbender : %5d\n" +msgstr "%2d kanala: Tonu aldatzailea : %5d\n" + +#: seq/aseqnet/aseqnet.c:582 +#, c-format +msgid "Channel %2d: Note On event : %5d\n" +msgstr "%2d kanala: 'Oharra gaituta' gertaera : %5d\n" + +#: seq/aseqnet/aseqnet.c:586 +#, c-format +msgid "Channel %2d: Note Off event: %5d\n" +msgstr "%2d kanala: 'Oharra desgaituta' gertaera : %5d\n" + +#: seq/aseqnet/aseqnet.c:641 +#, c-format +msgid "disconnected\n" +msgstr "deskonektatuta\n" + +#: speaker-test/speaker-test.c:120 +msgid "Front Left" +msgstr "Aurrealde ezkerra" + +#: speaker-test/speaker-test.c:121 +msgid "Front Right" +msgstr "Aurrealde eskuina" + +#: speaker-test/speaker-test.c:122 +msgid "Rear Left" +msgstr "Atzealde ezkerra" + +#: speaker-test/speaker-test.c:123 +msgid "Rear Right" +msgstr "Atzealde eskuina" + +#: speaker-test/speaker-test.c:125 +msgid "LFE" +msgstr "LFE" + +#: speaker-test/speaker-test.c:126 +msgid "Side Left" +msgstr "Ezker aldea" + +#: speaker-test/speaker-test.c:127 +msgid "Side Right" +msgstr "Eskuin aldea" + +#: speaker-test/speaker-test.c:128 +msgid "Channel 9" +msgstr "9 kanala" + +#: speaker-test/speaker-test.c:129 +msgid "Channel 10" +msgstr "10 kanala" + +#: speaker-test/speaker-test.c:130 +msgid "Channel 11" +msgstr "11 kanala" + +#: speaker-test/speaker-test.c:131 +msgid "Channel 12" +msgstr "12 kanala" + +#: speaker-test/speaker-test.c:132 +msgid "Channel 13" +msgstr "13 kanala" + +#: speaker-test/speaker-test.c:133 +msgid "Channel 14" +msgstr "14 kanala" + +#: speaker-test/speaker-test.c:134 +msgid "Channel 15" +msgstr "15 kanala" + +#: speaker-test/speaker-test.c:135 +msgid "Channel 16" +msgstr "16 kanala" + +#: speaker-test/speaker-test.c:440 +#, c-format +msgid "Broken configuration for playback: no configurations available: %s\n" +msgstr "" +"Erreprodukziorako konfigurazio hautsia: ez dago konfigurazio erabilgarririk: " +"%s\n" + +#: speaker-test/speaker-test.c:447 +#, c-format +msgid "Access type not available for playback: %s\n" +msgstr "Sarbide mota ez erabilgarri erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:454 +#, c-format +msgid "Sample format not available for playback: %s\n" +msgstr "Lagin formatua ez erabilgarri erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:461 +#, c-format +msgid "Channels count (%i) not available for playbacks: %s\n" +msgstr "Kanal zenbaketa (%i) ez erabilgarri erreprodukzioetarako: %s \n" + +#: speaker-test/speaker-test.c:469 +#, c-format +msgid "Rate %iHz not available for playback: %s\n" +msgstr "%iHz lagin-tasa ez erabilgarri erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:474 +#, c-format +msgid "Rate doesn't match (requested %iHz, get %iHz, err %d)\n" +msgstr "" +"Lagin-tasa ez dator bat (eskatutakoa %iHz, eskuratutakoa %iHz, errorea %d)\n" + +#: speaker-test/speaker-test.c:478 +#, c-format +msgid "Rate set to %iHz (requested %iHz)\n" +msgstr "Lagin-tasa %iHz-tan ezarria (eskatutakoa %iHz)\n" + +#: speaker-test/speaker-test.c:484 +#, c-format +msgid "Buffer size range from %lu to %lu\n" +msgstr "Buffer tamainaren barrutia %lu(e)tik %lu(e)ra\n" + +#: speaker-test/speaker-test.c:485 +#, c-format +msgid "Period size range from %lu to %lu\n" +msgstr "Periodo tamainaren barrutia %lu(e)tik %lu(e)ra\n" + +#: speaker-test/speaker-test.c:487 +#, c-format +msgid "Requested period time %u us\n" +msgstr "Eskatutako periodo denbora %u µs\n" + +#: speaker-test/speaker-test.c:490 +#, c-format +msgid "Unable to set period time %u us for playback: %s\n" +msgstr "Ezin da ezarri periodo denbora %u µs gisa erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:496 +#, c-format +msgid "Requested buffer time %u us\n" +msgstr "Eskatutako buffer denbora %u µs\n" + +#: speaker-test/speaker-test.c:499 +#, c-format +msgid "Unable to set buffer time %u us for playback: %s\n" +msgstr "Ezin da ezarri buffer denbora %u µs gisa erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:508 +#, c-format +msgid "Using max buffer size %lu\n" +msgstr "Buffer tamaina handiena erabiltzen: %lu\n" + +#: speaker-test/speaker-test.c:511 +#, c-format +msgid "Unable to set buffer size %lu for playback: %s\n" +msgstr "Ezin da ezarri buffer tamaina %lu gisa erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:517 +#, c-format +msgid "Periods = %u\n" +msgstr "Periodoak = %u\n" + +#: speaker-test/speaker-test.c:520 +#, c-format +msgid "Unable to set nperiods %u for playback: %s\n" +msgstr "Ezin dira ezarri nperiods-ak %u gisa erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:529 +#, c-format +msgid "Unable to set hw params for playback: %s\n" +msgstr "Ezin dira ezarri hw parametroak erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:535 +#, c-format +msgid "was set period_size = %lu\n" +msgstr "period_size ezarri da = %lu\n" + +#: speaker-test/speaker-test.c:536 +#, c-format +msgid "was set buffer_size = %lu\n" +msgstr "buffer_size ezarri da = %lu\n" + +#: speaker-test/speaker-test.c:538 +#, c-format +msgid "buffer to small, could not use\n" +msgstr "buffer txikiegia, ezin izan da erabili\n" + +#: speaker-test/speaker-test.c:551 +#, c-format +msgid "Unable to determine current swparams for playback: %s\n" +msgstr "Ezin dira zehaztu oraingo sw parametroak erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:558 +#, c-format +msgid "Unable to set start threshold mode for playback: %s\n" +msgstr "Ezin da ezarri 'hasi atalasea' modua erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:565 +#, c-format +msgid "Unable to set avail min for playback: %s\n" +msgstr "Ezin da ezarri 'avail min' erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:572 +#, c-format +msgid "Unable to set sw params for playback: %s\n" +msgstr "Ezin dira ezarri sw parametroak erreprodukziorako: %s\n" + +#: speaker-test/speaker-test.c:592 +#, c-format +msgid "Unable to set channel map: %s\n" +msgstr "Ezin da ezarri kanal-mapa: %s\n" + +#: speaker-test/speaker-test.c:617 +#, c-format +msgid "Can't recovery from underrun, prepare failed: %s\n" +msgstr "" +"Ezin da berreskuratu azpiratzetik (underrun), prestakuntzak huts egin du: " +"%s\n" + +#: speaker-test/speaker-test.c:628 +#, c-format +msgid "Can't recovery from suspend, prepare failed: %s\n" +msgstr "Ezin da berreskuratu esekitzetik, prestakuntzak huts egin du: %s\n" + +#: speaker-test/speaker-test.c:692 speaker-test/speaker-test.c:1207 +#, c-format +msgid "No enough memory\n" +msgstr "Ez dago behar adina memoria\n" + +#: speaker-test/speaker-test.c:697 +#, c-format +msgid "Cannot open WAV file %s\n" +msgstr "Ezin da ireki %s WAV fitxategia\n" + +#: speaker-test/speaker-test.c:701 speaker-test/speaker-test.c:730 +#, c-format +msgid "Invalid WAV file %s\n" +msgstr "%s WAV fitxategi baliogabea\n" + +#: speaker-test/speaker-test.c:706 +#, c-format +msgid "Not a WAV file: %s\n" +msgstr "Ez da WAV fitxategia: %s\n" + +#: speaker-test/speaker-test.c:710 +#, c-format +msgid "Unsupported WAV format %d for %s\n" +msgstr "Euskarririk gabeko %d WAV formatua %s(r)entzat\n" + +#: speaker-test/speaker-test.c:715 +#, c-format +msgid "%s is not a mono stream (%d channels)\n" +msgstr "%s ez da mono bidalketa (%d kanal)\n" + +#: speaker-test/speaker-test.c:720 +#, c-format +msgid "Sample rate doesn't match (%d) for %s\n" +msgstr "Lagin-tasa ez dator bat (%d) %s(r)ekin\n" + +#: speaker-test/speaker-test.c:725 +#, c-format +msgid "Unsupported sample format bits %d for %s\n" +msgstr "Euskarririk gabeko %d lagin formatu bitak %s(r)entzat\n" + +#: speaker-test/speaker-test.c:786 +#, c-format +msgid "Undefined channel %d\n" +msgstr "%d kanal zehaztugabea\n" + +#: speaker-test/speaker-test.c:837 +#, c-format +msgid "Write error: %d,%s\n" +msgstr "Idazte errorea: %d,%s\n" + +#: speaker-test/speaker-test.c:839 +#, c-format +msgid "xrun_recovery failed: %d,%s\n" +msgstr "xrun_recovery ekintzak huts egin du: %d,%s\n" + +#: speaker-test/speaker-test.c:942 +#, c-format +msgid "" +"Usage: speaker-test [OPTION]... \n" +"-h,--help\thelp\n" +"-D,--device\tplayback device\n" +"-r,--rate\tstream rate in Hz\n" +"-c,--channels\tcount of channels in stream\n" +"-f,--frequency\tsine wave frequency in Hz\n" +"-F,--format\tsample format\n" +"-b,--buffer\tring buffer size in us\n" +"-p,--period\tperiod size in us\n" +"-P,--nperiods\tnumber of periods\n" +"-t,--test\tpink=use pink noise, sine=use sine wave, wav=WAV file\n" +"-l,--nloops\tspecify number of loops to test, 0 = infinite\n" +"-s,--speaker\tsingle speaker test. Values 1=Left, 2=right, etc\n" +"-w,--wavfile\tUse the given WAV file as a test sound\n" +"-W,--wavdir\tSpecify the directory containing WAV files\n" +"-m,--chmap\tSpecify the channel map to override\n" +"-X,--force-frequency\tforce frequencies outside the 30-8000hz range\n" +"-S,--scale\tScale of generated test tones in percent (default=80)\n" +"\n" +msgstr "" +"Erabilera: speaker-test [AUKERA]... \n" +"-h,--help\tlaguntza\n" +"-D,--device\terreprodukzio gailua\n" +"-r,--rate\tbidalketaren lagin-tasa Hz-tan\n" +"-c,--channels\tbidalt¡keta burutzen ari diren kanalen zenbaketa\n" +"-f,--frequency\tuhin sinusoidalaren frekuentzia Hz-tan\n" +"-F,--format\tlagin formatua\n" +"-b,--buffer\teraztun-bufferraren tamaina µs-tan\n" +"-p,--period\tperiodo taimaina µs-tan\n" +"-P,--nperiods\tperiodo kopurua\n" +"-t,--test\tpink=erabili soinu arrosa, sine=erabili uhin sinusoidala, wav=WAV " +"fitxategia\n" +"-l,--nloops\tzehaztu proba egiteko begizta kopurua, 0 = mugagabe\n" +"-s,--speaker\tbozgorailu bakarreko proba. Balioak: 1=Ezkerra, 2=Eskuina, " +"etb.\n" +"-w,--wavfile\tErabili emandako WAV fitxategia probarako soinutzat\n" +"-W,--wavdir\tZehaztu WAV fitxategiak dituen direktorioa\n" +"-m,--chmap\tZehaztu gainidatziko den kanal-mapa\n" +"-X,--force-frequency\tbehartu 30-8.000Hz barruti kanpoko frekuentziak\n" +"-S,--scale\tSortutako proba-tonuen eskala portzentaian (lehenetsia=80)\n" +"\n" + +#: speaker-test/speaker-test.c:1074 +#, c-format +msgid "Invalid number of periods %d\n" +msgstr "%d periodo kopuru baliogabea\n" + +#: speaker-test/speaker-test.c:1090 speaker-test/speaker-test.c:1094 +#, c-format +msgid "Invalid test type %s\n" +msgstr "%s proba mota baliogabea\n" + +#: speaker-test/speaker-test.c:1127 +#, c-format +msgid "Unknown option '%c'\n" +msgstr "'%c' aukera ezezaguna\n" + +#: speaker-test/speaker-test.c:1141 +#, c-format +msgid "Invalid parameter for -s option.\n" +msgstr "-s aukerarako parametro baliogabea.\n" + +#: speaker-test/speaker-test.c:1156 +#, c-format +msgid "Playback device is %s\n" +msgstr "Erreprodukzio gailua %s da\n" + +#: speaker-test/speaker-test.c:1157 +#, c-format +msgid "Stream parameters are %iHz, %s, %i channels\n" +msgstr "Erreprodukzio parametroak %iHz, %s, %i kanal dira\n" + +#: speaker-test/speaker-test.c:1160 +#, c-format +msgid "Using 16 octaves of pink noise\n" +msgstr "Soinu arroseko 16 zortzidun erabiltzen\n" + +#: speaker-test/speaker-test.c:1163 +#, c-format +msgid "Sine wave rate is %.4fHz\n" +msgstr "Uhin sinusoidalaren tasa %.4fHz da\n" + +#: speaker-test/speaker-test.c:1166 +#, c-format +msgid "WAV file(s)\n" +msgstr "" +"WAV fitxategia(k)\n" +"\n" + +#: speaker-test/speaker-test.c:1176 +#, c-format +msgid "Playback open error: %d,%s\n" +msgstr "Erreprodukzio irekitze errorea: %d,%s\n" + +#: speaker-test/speaker-test.c:1182 +#, c-format +msgid "Setting of hwparams failed: %s\n" +msgstr "hwparams-eko hobespenek huts egin dute: %s\n" + +#: speaker-test/speaker-test.c:1186 +#, c-format +msgid "Setting of swparams failed: %s\n" +msgstr "swparams-eko hobespenek huts egin dute: %s\n" + +#: speaker-test/speaker-test.c:1232 speaker-test/speaker-test.c:1254 +#, c-format +msgid "Transfer failed: %s\n" +msgstr "Bidalketak huts egin du: %s\n" + +#: speaker-test/speaker-test.c:1240 +#, c-format +msgid "Time per period = %lf\n" +msgstr "Denbora periodoko = %lf\n" + +#, c-format +#~ msgid "service '%s' is not found in /etc/services\n" +#~ msgstr "ez da aurkitu '%s' zerbitzua /etc/services direktorioan\n" Binary files /tmp/tmp9067orz6/0nqitZVa9r/alsa-utils-1.2.2/po/fr.gmo and /tmp/tmp9067orz6/GaGL_6JOvv/alsa-utils-1.2.6/po/fr.gmo differ diff -Nru alsa-utils-1.2.2/po/fr.po alsa-utils-1.2.6/po/fr.po --- alsa-utils-1.2.2/po/fr.po 2020-02-19 12:07:36.000000000 +0000 +++ alsa-utils-1.2.6/po/fr.po 2021-12-06 11:44:59.000000000 +0000 @@ -2,224 +2,237 @@ # Copyright (C) 2011 The ALSA Team # This file is distributed under the same license as the alsa-utils package. # Christoph J. Thompson , 2011. +# Olivier Humbert , 2020 # msgid "" msgstr "" "Project-Id-Version: alsa-utils 1.0.23\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 12:07+0000\n" -"PO-Revision-Date: 2011-01-07 06:23+0100\n" -"Last-Translator: Christoph J. Thompson \n" +"POT-Creation-Date: 2021-12-06 11:44+0000\n" +"PO-Revision-Date: 2020-07-08 16:05+0100\n" +"Last-Translator: Olivier Humbert \n" "Language-Team: French \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: alsamixer/card_select.c:126 alsamixer/device_name.c:126 +#: alsamixer/card_select.c:77 alsamixer/device_name.c:127 msgid "Sound Card" msgstr "Carte Son" -#: alsamixer/card_select.c:181 +#: alsamixer/card_select.c:115 msgid "(default)" msgstr "(par défaut)" -#: alsamixer/card_select.c:191 +#: alsamixer/card_select.c:125 msgid "cannot enumerate sound cards" msgstr "les cartes son n'ont pas pu être énumérées" -#: alsamixer/card_select.c:215 +#: alsamixer/card_select.c:151 msgid "enter device name..." msgstr "entrez le nom du périphérique..." -#: alsamixer/cli.c:40 +#: alsamixer/cli.c:43 msgid "Usage: alsamixer [options]" -msgstr "Utilisation: alsamixer [options]" +msgstr "Utilisation : alsamixer [options]" -#: alsamixer/cli.c:41 +#: alsamixer/cli.c:44 +#, fuzzy +#| msgid "" +#| "Useful options:\n" +#| " -h, --help this help\n" +#| " -c, --card=NUMBER sound card number or id\n" +#| " -D, --device=NAME mixer device name\n" +#| " -V, --view=MODE starting view mode: playback/capture/all" msgid "" "Useful options:\n" " -h, --help this help\n" " -c, --card=NUMBER sound card number or id\n" " -D, --device=NAME mixer device name\n" +" -m, --mouse enable mouse\n" +" -M, --no-mouse disable mouse\n" +" -f, --config=FILE configuration file\n" +" -F, --no-config do not load configuration file\n" " -V, --view=MODE starting view mode: playback/capture/all" msgstr "" "Options utiles:\n" " -h, --help cette aide\n" " -c, --card=NUMÉRO numéro ou identifiant de la carte son\n" " -D, --device=NOM nom du périphérique de mixage\n" -" -V, --view=MODE mode de visualisation par défaut: lecture/capture/tous" +" -V, --view=MODE mode de visualisation par défaut : lecture/capture/" +"tous" -#: alsamixer/cli.c:46 +#: alsamixer/cli.c:53 msgid "" "Debugging options:\n" " -g, --no-color toggle using of colors\n" " -a, --abstraction=NAME mixer abstraction level: none/basic" msgstr "" "Options de débogage:\n" -" -g, --no-color supprimer la couleur\n" -" -a, --abstraction=NOM niveau d'abstraction du mixeur: aucun/basique" +" -g, --no-color basculer l'utilisation de la couleur\n" +" -a, --abstraction=NOM niveau d'abstraction du mixeur : aucun/basique" -#: alsamixer/cli.c:77 +#: alsamixer/cli.c:88 #, c-format msgid "invalid card index: %s\n" -msgstr "index de carte invalide: %s\n" +msgstr "index de carte invalide : %s\n" -#: alsamixer/cli.c:103 +#: alsamixer/cli.c:130 #, c-format msgid "unknown abstraction level: %s\n" -msgstr "niveau d'abstraction inconnu: %s\n" +msgstr "niveau d'abstraction inconnu : %s\n" -#: alsamixer/cli.c:108 +#: alsamixer/cli.c:135 #, c-format msgid "unknown option: %c\n" -msgstr "option inconnue: %c\n" +msgstr "option inconnue : %c\n" -#: alsamixer/cli.c:110 +#: alsamixer/cli.c:137 msgid "try `alsamixer --help' for more information\n" -msgstr "essayez `alsamixer --help' pour plus d'information\n" +msgstr "essayez `alsamixer --help' pour plus d'informations\n" #: alsamixer/device_name.c:177 msgid "Device name:" -msgstr "Nom du périphérique:" +msgstr "Nom du périphérique :" #: alsamixer/die.c:37 #, c-format msgid "%s: %s\n" msgstr "%s: %s\n" -#: alsamixer/mixer_display.c:98 +#: alsamixer/mixer_display.c:99 msgid "Card:" -msgstr "Carte:" +msgstr "Carte :" -#: alsamixer/mixer_display.c:99 +#: alsamixer/mixer_display.c:100 msgid "Chip:" -msgstr "Puce:" +msgstr "Puce :" -#: alsamixer/mixer_display.c:100 +#: alsamixer/mixer_display.c:101 msgid "View:" -msgstr "Vue:" +msgstr "Vue :" -#: alsamixer/mixer_display.c:101 +#: alsamixer/mixer_display.c:102 msgid "Item:" -msgstr "Contrôle:" +msgstr "Élement :" -#: alsamixer/mixer_display.c:104 +#: alsamixer/mixer_display.c:105 msgid "F1: Help" -msgstr "F1: Aide" +msgstr "F1 : Aide" -#: alsamixer/mixer_display.c:105 +#: alsamixer/mixer_display.c:106 msgid "F2: System information" -msgstr "F2: Informations Système" +msgstr "F2 : Informations système" -#: alsamixer/mixer_display.c:106 +#: alsamixer/mixer_display.c:107 msgid "F6: Select sound card" -msgstr "F6: Choisir la carte son" +msgstr "F6 : Choisir la carte son" -#: alsamixer/mixer_display.c:107 +#: alsamixer/mixer_display.c:108 msgid "Esc: Exit" -msgstr "Esc: Quitter" +msgstr "Esc : quitter" -#: alsamixer/mixer_display.c:174 +#: alsamixer/mixer_display.c:179 msgid "(unplugged)" msgstr "(non branché)" -#: alsamixer/mixer_display.c:192 +#: alsamixer/mixer_display.c:197 msgid "Playback" msgstr "Lecture" -#: alsamixer/mixer_display.c:193 +#: alsamixer/mixer_display.c:198 msgid "Capture" msgstr "Capture" -#: alsamixer/mixer_display.c:194 +#: alsamixer/mixer_display.c:199 msgid "All" msgstr "Tout" -#: alsamixer/mixer_display.c:234 +#: alsamixer/mixer_display.c:240 msgid "mute" msgstr "muet" -#: alsamixer/mixer_display.c:275 alsamixer/mixer_display.c:285 +#: alsamixer/mixer_display.c:281 alsamixer/mixer_display.c:291 msgid "dB gain:" -msgstr "gain dB:" +msgstr "gain dB :" -#: alsamixer/mixer_display.c:285 +#: alsamixer/mixer_display.c:291 #, c-format msgid " [%s %s, %s]" msgstr " [%s %s, %s]" -#: alsamixer/mixer_display.c:294 alsamixer/mixer_display.c:300 -#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:312 +#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:306 +#: alsamixer/mixer_display.c:312 alsamixer/mixer_display.c:318 msgid "Off" msgstr "Fermé" -#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:312 +#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:318 msgid "On" msgstr "Ouvert" -#: alsamixer/mixer_display.c:363 +#: alsamixer/mixer_display.c:370 msgid "The sound device was unplugged." -msgstr "Le périphérique a été débranché" +msgstr "Le périphérique son a été débranché" -#: alsamixer/mixer_display.c:364 +#: alsamixer/mixer_display.c:371 msgid "Press F6 to select another sound card." -msgstr "Appuyez sur F6 pour choisir une autre carte son." +msgstr "Appuyez sur F6 pour sélectionner une autre carte son." -#: alsamixer/mixer_display.c:379 +#: alsamixer/mixer_display.c:386 msgid "This sound device does not have any playback controls." -msgstr "Ce périphérique n'a pas de commandes de lecture." +msgstr "Ce périphérique son n'a pas de commandes de lecture." -#: alsamixer/mixer_display.c:381 +#: alsamixer/mixer_display.c:388 msgid "This sound device does not have any capture controls." -msgstr "Ce périphérique n'a pas de commandes de capture." +msgstr "Ce périphérique son n'a pas de commandes de capture." -#: alsamixer/mixer_display.c:383 +#: alsamixer/mixer_display.c:390 msgid "This sound device does not have any controls." -msgstr "Ce périphérique n'a pas de commandes." +msgstr "Ce périphérique son n'a pas de commandes." #. TRANSLATORS: playback on; one character -#: alsamixer/mixer_display.c:516 alsamixer/mixer_display.c:521 +#: alsamixer/mixer_display.c:523 alsamixer/mixer_display.c:528 msgid "O" msgstr "O" #. TRANSLATORS: playback muted; one character -#: alsamixer/mixer_display.c:518 alsamixer/mixer_display.c:522 +#: alsamixer/mixer_display.c:525 alsamixer/mixer_display.c:529 msgid "M" msgstr "M" #. TRANSLATORS: "left"; no more than two characters -#: alsamixer/mixer_display.c:536 +#: alsamixer/mixer_display.c:545 msgid "L" msgstr "G" #. TRANSLATORS: "right"; no more than two characters -#: alsamixer/mixer_display.c:540 +#: alsamixer/mixer_display.c:551 msgid "R" msgstr "D" #. TRANSLATORS: no more than eight characters -#: alsamixer/mixer_display.c:542 +#: alsamixer/mixer_display.c:555 msgid "CAPTURE" msgstr "CAPTURE" -#: alsamixer/mixer_display.c:592 +#: alsamixer/mixer_display.c:611 msgid "Front" msgstr "Avant" -#: alsamixer/mixer_display.c:595 +#: alsamixer/mixer_display.c:614 msgid "Rear" msgstr "Arrière" -#: alsamixer/mixer_display.c:598 speaker-test/speaker-test.c:124 +#: alsamixer/mixer_display.c:617 speaker-test/speaker-test.c:124 msgid "Center" msgstr "Centre" -#: alsamixer/mixer_display.c:601 +#: alsamixer/mixer_display.c:620 msgid "Woofer" msgstr "Basses" -#: alsamixer/mixer_display.c:604 +#: alsamixer/mixer_display.c:623 msgid "Side" msgstr "Côté" @@ -229,7 +242,7 @@ #: alsamixer/mixer_widget.c:102 alsamixer/mixer_widget.c:179 msgid "cannot load mixer controls" -msgstr "les commandes de mixage ne peuvent pas être chargés" +msgstr "les contrôles de mixage ne peuvent pas être chargés" #: alsamixer/mixer_widget.c:169 #, c-format @@ -250,19 +263,19 @@ #: alsamixer/mixer_widget.c:193 msgid "F3 Show playback controls" -msgstr "F3 Afficher les commandes de lecture" +msgstr "F3 Afficher les contrôles de lecture" #: alsamixer/mixer_widget.c:194 msgid "F4 Show capture controls" -msgstr "F4 Afficher les commandes de capture" +msgstr "F4 Afficher les contrôles de capture" #: alsamixer/mixer_widget.c:195 msgid "F5 Show all controls" -msgstr "F5 Afficher toutes les commandes" +msgstr "F5 Afficher tous les contrôles" #: alsamixer/mixer_widget.c:196 msgid "Tab Toggle view mode (F3/F4/F5)" -msgstr "Tab Choisir le mode de visualisation (F3/F4/F5)" +msgstr "Tab Basculer le mode de visualisation (F3/F4/F5)" #: alsamixer/mixer_widget.c:197 msgid "F6 S Select sound card" @@ -270,27 +283,27 @@ #: alsamixer/mixer_widget.c:198 msgid "L Redraw screen" -msgstr "L Actualiser l'écran" +msgstr "L Rafraîchir l'écran" #: alsamixer/mixer_widget.c:200 msgid "Left Move to the previous control" -msgstr "Gauche Aller à la commande précédente" +msgstr "Gauche Aller au contrôle précédent" #: alsamixer/mixer_widget.c:201 msgid "Right Move to the next control" -msgstr "Droite Aller à la commande suivante" +msgstr "Droite Aller au contrôle suivant" #: alsamixer/mixer_widget.c:203 msgid "Up/Down Change volume" -msgstr "Haut/Bas Ajuster le volume" +msgstr "Haut/Bas Modifier le volume" #: alsamixer/mixer_widget.c:204 msgid "+ - Change volume" -msgstr "+ - Ajuster le volume" +msgstr "+ - Modifier le volume" #: alsamixer/mixer_widget.c:205 msgid "Page Up/Dn Change volume in big steps" -msgstr "Page Préc./Suiv. Ajuster le volume en grandes intervalles" +msgstr "Page Préc./Suiv. Modifier le volume par grands intervalles" #: alsamixer/mixer_widget.c:206 msgid "End Set volume to 0%" @@ -315,25 +328,25 @@ #: alsamixer/mixer_widget.c:213 msgid "M Toggle mute" -msgstr "M (Dés)activer le mode muet" +msgstr "M Basculer le mode muet" #. TRANSLATORS: or , . #: alsamixer/mixer_widget.c:215 msgid "< > Toggle left/right mute" -msgstr "< > (Dés)activer le mode muet à gauche et à droite" +msgstr "< > Basculer le mode muet à gauche et à droite" #: alsamixer/mixer_widget.c:217 msgid "Space Toggle capture" -msgstr "Espace (Dés)activer la capture" +msgstr "Espace Basculer la capture" #. TRANSLATORS: or Insert Delete #: alsamixer/mixer_widget.c:219 msgid "; ' Toggle left/right capture" -msgstr "; (Dés)activer la capture à gauche et à droite" +msgstr "; Basculer la capture à gauche et à droite" #: alsamixer/mixer_widget.c:221 msgid "Authors:" -msgstr "Auteurs:" +msgstr "Auteurs :" #: alsamixer/mixer_widget.c:222 msgid " Tim Janik" @@ -351,11 +364,11 @@ msgid "Help" msgstr "Aide" -#: alsamixer/proc_files.c:103 +#: alsamixer/proc_files.c:56 msgid "Select File" -msgstr "Choisir un Fichier" +msgstr "Choisir un fichier" -#: alsamixer/textbox.c:52 alsamixer/textbox.c:66 +#: alsamixer/textbox.c:51 alsamixer/textbox.c:65 msgid "Error" msgstr "Erreur" @@ -381,7 +394,7 @@ msgstr "" #: aplay/aplay.c:205 -#, fuzzy, c-format +#, c-format msgid "" "Usage: %s [OPTION]... [FILE]...\n" "\n" @@ -435,8 +448,9 @@ "\n" "-h, --help aide\n" " --version afficher la version du programme\n" -"-l, --list-devices afficher la listes des périphériques\n" -"-L, --list-pcms afficher la liste des noms de périphériques\n" +"-l, --list-devices lister tous périphériques audio-numériques et cartes " +"son\n" +"-L, --list-pcms lister les noms de périphériques\n" "-D, --device=NOM choisir le périphérique PCM par son nom\n" "-Q, --quiet mode silencieux\n" "-t, --file-type TYPE type de fichier (voc, wav, raw ou au)\n" @@ -444,45 +458,50 @@ "-f, --format=FORMAT format d'échantillonage (insensible à la casse)\n" "-r, --rate=# fréquence d'échantillonage\n" "-d, --duration=# interrompre après # secondes\n" -"-M, --mmap charger le flux en mémoire avec mmap\n" +"-s, --samples=# interrompre après # échantillons par canal\n" +"-M, --mmap flux mmap\n" "-N, --nonblock mode non-bloquant\n" -"-F, --period-time=# # microsecondes entre chaque interruption\n" +"-F, --period-time=# la durée entre les interruptions est de\n" +"# microsecondes\n" "-B, --buffer-time=# la durée du tampon est de # microsecondes\n" -" --period-size=# # trames entre chaque interruption\n" +" --period-size=# la durée entre interruptions est # trames\n" " --buffer-size=# la durée du tampon est de # trames\n" -"-A, --avail-min=# # microsecondes min. disponibles entre chaque " -"réveil\n" -"-R, --start-delay=# # microsecondes de délai avant le démarrage\n" -" automatique du périphérique PCM (relatif à la " -"taille\n" -" du tampon si <= 0)\n" +"-A, --avail-min=# l'espace minimum disponible pour le réveil est de\n" +"# microsecondes\n" +"-R, --start-delay=# le délai pour le démarrage PCM automtique est de \n" +"# microsecondes (relatif à la taille du tampon si\n" +"<= 0)\n" "-T, --stop-delay=# # microsecondes de délai depuis xrun avant l'arrêt\n" -" automatique du périphérique PCM \n" +"automatique du périphérique PCM \n" "-v, --verbose afficher la structure et la configuration du\n" -" périphérique PCM (accumulatif)\n" -"-V, --vumeter=TYPE activer le VU-mètre (TYPE: mono ou stereo)\n" +"périphérique PCM (accumulatif)\n" +"-V, --vumeter=TYPE activer le VU-mètre (TYPE : mono ou stéréo)\n" "-I, --separate-channels un fichier par canal\n" +"-i, --interactive permet une opération interactive depuis stdin\n" +"-m, --chmap=ch1,ch2,.. donne la carte du canal à écraser ou suivre\n" " --disable-resample désactiver le rééchantillonage de fréquence\n" -" automatique\n" +"automatique\n" " --disable-channels désactiver les conversions automatiques de canal\n" " --disable-format désactiver les conversions automatiques de format\n" -" --disable-softvol désactiver la commande du volume logicielle\n" +" --disable-softvol désactiver le contrôle du volume logiciel (softvol)\n" " --test-position tester la position du tampon circulaire\n" " --test-coef=# test coefficient pour la position du tampon\n" -" circulaire (par défaut 8). L'expression pour la\n" -" validation est : coef * (taille_tampon / 2)\n" +"circulaire (par défaut 8). L'expression pour la\n" +"validation est : coef * (taille_tampon / 2)\n" " --test-nowait ne pas attendre le tampon circulaire - prend toutes\n" -" les resources du processeur\n" +"les resources du processeur\n" " --max-file-time=# commencer un autre fichier de capture quand " "l'ancien\n" -" fichier a enregistré pendant # secondes\n" +"fichier a enregistré pendant X secondes\n" " --process-id-file écrire l'identifiant du processus ici\n" -" --use-strftime utiliser strftime pour le nom du fichier de capture\n" +" --use-strftime utiliser strftime pour le nom du fichier de sortie\n" +" --dump-hw-params récupérer le hw_params du périphérique\n" +" --fatal-errors traiter toutes les erreurs comme fatales\n" -#: aplay/aplay.c:250 speaker-test/speaker-test.c:945 +#: aplay/aplay.c:250 speaker-test/speaker-test.c:961 #, c-format msgid "Recognized sample formats are:" -msgstr "Les formats d'échantillonage connus sont:" +msgstr "Les formats d'échantillonage connus sont :" #: aplay/aplay.c:256 #, c-format @@ -491,12 +510,13 @@ "Some of these may not be available on selected hardware\n" msgstr "" "\n" -"Certains de ceux-ci ne sont peut être pas disponibles avec ce matériel\n" +"Certains de ceux-ci ne sont peut être pas disponibles avec le matériel " +"sélectionné\n" #: aplay/aplay.c:257 -#, fuzzy, c-format +#, c-format msgid "The available format shortcuts are:\n" -msgstr "Les raccourcis format disponibles sont:\n" +msgstr "Les raccourcis format disponibles sont :\n" #: aplay/aplay.c:258 #, c-format @@ -520,22 +540,22 @@ #: aplay/aplay.c:277 #, c-format msgid "**** List of %s Hardware Devices ****\n" -msgstr "**** Liste des Périphériques Matériels %s ****\n" +msgstr "**** Liste des périphériques matériels %s ****\n" #: aplay/aplay.c:306 #, c-format msgid "card %i: %s [%s], device %i: %s [%s]\n" -msgstr "carte %i: %s [%s], périphérique %i: %s [%s]\n" +msgstr "carte %i : %s [%s], périphérique %i : %s [%s]\n" #: aplay/aplay.c:312 #, c-format msgid " Subdevices: %i/%i\n" -msgstr " Sous-périphériques: %i/%i\n" +msgstr " Sous-périphériques : %i/%i\n" #: aplay/aplay.c:319 #, c-format msgid " Subdevice #%i: %s\n" -msgstr " Sous-périphérique #%i: %s\n" +msgstr " Sous-périphérique #%i : %s\n" #: aplay/aplay.c:400 #, c-format @@ -552,139 +572,143 @@ msgstr "format de fichier inconnu %s" #: aplay/aplay.c:606 -#, fuzzy, c-format +#, c-format msgid "invalid channels argument '%s'" -msgstr "l'addresse envoyeur %s est incorrecte\n" +msgstr "argument des canaux invalides '%s'" #: aplay/aplay.c:610 #, c-format msgid "value %i for channels is invalid" msgstr "la valeur %i pour les canaux est incorrecte" -#: aplay/aplay.c:629 +#: aplay/aplay.c:630 #, c-format msgid "wrong extended format '%s'" msgstr "format étendu '%s' erronné" -#: aplay/aplay.c:637 -#, fuzzy, c-format +#: aplay/aplay.c:638 +#, c-format msgid "invalid rate argument '%s'" -msgstr "addresse source %s incorrecte\n" +msgstr "argument de taux invalide '%s'" -#: aplay/aplay.c:644 +#: aplay/aplay.c:645 #, c-format msgid "bad speed value %i" msgstr "mauvaise valeur de vitesse %i" -#: aplay/aplay.c:650 +#: aplay/aplay.c:651 msgid "duration and samples arguments cannot be used together" msgstr "" +"la durée et les arguments d'échantillons ne peuvent pas être utilisés " +"ensemble" -#: aplay/aplay.c:655 -#, fuzzy, c-format +#: aplay/aplay.c:656 +#, c-format msgid "invalid duration argument '%s'" -msgstr "l'addresse destinataire %s est incorrecte\n" +msgstr "argument de durée invalide '%s'" -#: aplay/aplay.c:662 +#: aplay/aplay.c:663 msgid "samples and duration arguments cannot be used together" msgstr "" +"les échantillons et les arguments de durée ne peuvent pas être utilisés " +"ensemble" -#: aplay/aplay.c:667 -#, fuzzy, c-format +#: aplay/aplay.c:668 +#, c-format msgid "invalid samples argument '%s'" -msgstr "l'addresse envoyeur %s est incorrecte\n" +msgstr "argument d'échantillon invalide '%s'" -#: aplay/aplay.c:679 -#, fuzzy, c-format +#: aplay/aplay.c:680 +#, c-format msgid "invalid period time argument '%s'" -msgstr "l'addresse envoyeur %s est incorrecte\n" +msgstr "argument de temps de période invalide '%s'" -#: aplay/aplay.c:686 -#, fuzzy, c-format +#: aplay/aplay.c:687 +#, c-format msgid "invalid buffer time argument '%s'" -msgstr "addresse source %s incorrecte\n" +msgstr "argument de temps de tampon invalide '%s'" -#: aplay/aplay.c:693 -#, fuzzy, c-format +#: aplay/aplay.c:694 +#, c-format msgid "invalid period size argument '%s'" -msgstr "l'addresse envoyeur %s est incorrecte\n" +msgstr "argument de taille de période invalide '%s'" -#: aplay/aplay.c:700 -#, fuzzy, c-format +#: aplay/aplay.c:701 +#, c-format msgid "invalid buffer size argument '%s'" -msgstr "addresse source %s incorrecte\n" +msgstr "argument de taille de tampon invalide '%s'" -#: aplay/aplay.c:707 +#: aplay/aplay.c:708 #, c-format msgid "invalid min available space argument '%s'" -msgstr "" +msgstr "argument d'espace disponible minimum invalide '%s'" -#: aplay/aplay.c:714 -#, fuzzy, c-format +#: aplay/aplay.c:715 +#, c-format msgid "invalid start delay argument '%s'" -msgstr "l'addresse envoyeur %s est incorrecte\n" +msgstr "argument de délai de départ invalide '%s'" -#: aplay/aplay.c:721 -#, fuzzy, c-format +#: aplay/aplay.c:722 +#, c-format msgid "invalid stop delay argument '%s'" -msgstr "l'addresse envoyeur %s est incorrecte\n" +msgstr "argument de délai d'arrêt invalide '%s'" -#: aplay/aplay.c:776 -#, fuzzy, c-format +#: aplay/aplay.c:777 +#, c-format msgid "invalid test coef argument '%s'" -msgstr "addresse source %s incorrecte\n" +msgstr "argument de coef de test invalide '%s'" -#: aplay/aplay.c:788 +#: aplay/aplay.c:789 #, c-format msgid "invalid max file time argument '%s'" -msgstr "" +msgstr "argument de temps de fichier maximum invalide '%s'" -#: aplay/aplay.c:808 speaker-test/speaker-test.c:571 +#: aplay/aplay.c:809 speaker-test/speaker-test.c:587 #, c-format msgid "Unable to parse channel map string: %s\n" -msgstr "" +msgstr "Impossible d'analyser la chaîne de map du canal : %s\n" -#: aplay/aplay.c:814 +#: aplay/aplay.c:815 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "Essayez `%s --help' pour plus d'informations.\n" -#: aplay/aplay.c:830 +#: aplay/aplay.c:831 #, c-format msgid "audio open error: %s" -msgstr "erreur à l'ouverture audio: %s" +msgstr "erreur à l'ouverture audio : %s" -#: aplay/aplay.c:835 +#: aplay/aplay.c:836 #, c-format msgid "info error: %s" -msgstr "erreur info: %s" +msgstr "erreur info : %s" -#: aplay/aplay.c:842 +#: aplay/aplay.c:843 #, c-format msgid "nonblock setting error: %s" -msgstr "paramètre de non-blocage erronné: %s" +msgstr "paramètre de non-blocage erronné : %s" -#: aplay/aplay.c:852 aplay/aplay.c:976 aplay/aplay.c:1266 aplay/aplay.c:1466 -#: aplay/aplay.c:1989 aplay/aplay.c:2019 +#: aplay/aplay.c:861 aplay/aplay.c:985 aplay/aplay.c:1275 aplay/aplay.c:1475 +#: aplay/aplay.c:2055 aplay/aplay.c:2085 msgid "not enough memory" msgstr "pas assez de mémoire" -#: aplay/aplay.c:876 +#: aplay/aplay.c:885 #, c-format msgid "Cannot create process ID file %s: %s" -msgstr "Le fichier de numéro de processus %s n'a pas pu être créé: %s" +msgstr "Le fichier d'identifiant de processus %s n'a pas pu être créé : %s" -#: aplay/aplay.c:966 +#: aplay/aplay.c:975 #, c-format msgid "read error (called from line %i)" msgstr "erreur de lecture (appelé à la ligne %i)" -#: aplay/aplay.c:1033 +#: aplay/aplay.c:1042 #, c-format msgid "unknown length of 'fmt ' chunk (read %u, should be %u at least)" msgstr "longueur du morceau 'fmt ' inconnue (lu %u, devrait être au moins %u)" -#: aplay/aplay.c:1044 +#: aplay/aplay.c:1053 #, c-format msgid "" "unknown length of extensible 'fmt ' chunk (read %u, should be %u at least)" @@ -692,366 +716,412 @@ "longueur du morceau 'fmt ' extensible inconnue (lu %u, devrait être au moins " "%u)" -#: aplay/aplay.c:1049 +#: aplay/aplay.c:1058 msgid "wrong format tag in extensible 'fmt ' chunk" msgstr "libellé de format erronné dans le morceau extensible 'fmt '" -#: aplay/aplay.c:1056 +#: aplay/aplay.c:1065 #, c-format msgid "can't play WAVE-file format 0x%04x which is not PCM or FLOAT encoded" msgstr "" -"Les formats de ficher WAVE 0x%04x qui ne sont pas encodés en PCM ouFLOAT ne " +"Les formats de ficher WAVE 0x%04x qui ne sont pas encodés en PCM ou FLOAT ne " "sont pas supportés" -#: aplay/aplay.c:1061 +#: aplay/aplay.c:1070 #, c-format msgid "can't play WAVE-files with %d tracks" msgstr "Les fichiers WAVE avec %d pistes ne sont pas supportés" -#: aplay/aplay.c:1069 aplay/aplay.c:1195 +#: aplay/aplay.c:1078 aplay/aplay.c:1204 #, c-format msgid "Warning: format is changed to U8\n" -msgstr "Avertissement: le format est changé en U8\n" +msgstr "Avertissement : le format est changé en U8\n" -#: aplay/aplay.c:1079 aplay/aplay.c:1092 aplay/aplay.c:1103 -#, fuzzy, c-format +#: aplay/aplay.c:1088 aplay/aplay.c:1101 aplay/aplay.c:1112 +#, c-format msgid "Warning: format is changed to %s\n" -msgstr "Avertissement: le format est changé en U8\n" +msgstr "Avertissement : le format est changé en %s\n" -#: aplay/aplay.c:1108 +#: aplay/aplay.c:1117 #, c-format msgid "" " can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)" msgstr "" " les fichiers WAVE échantillonés %d bits par %d octets en largeur (%d " -"canaux)ne sont pas supportés" +"canaux) ne sont pas supportés" -#: aplay/aplay.c:1131 +#: aplay/aplay.c:1140 #, c-format msgid " can't play WAVE-files with sample %d bits wide" msgstr "" -" les fichiers WAVES échantillonés %d bits en largeur ne sont passupportés" +" les fichiers WAVES échantillonés %d bits en largeur ne sont pas supportés" -#: aplay/aplay.c:1189 +#: aplay/aplay.c:1198 #, c-format msgid "Warning: format is changed to MU_LAW\n" -msgstr "Avertissement: le format est changé en MU_LAW\n" +msgstr "Avertissement : le format est changé en MU_LAW\n" -#: aplay/aplay.c:1201 +#: aplay/aplay.c:1210 #, c-format msgid "Warning: format is changed to S16_BE\n" -msgstr "Avertissement: le format est changé en S16_BE\n" +msgstr "Avertissement : le format est changé en S16_BE\n" -#: aplay/aplay.c:1214 aplay/aplay.c:2304 aplay/aplay.c:2311 aplay/aplay.c:2836 +#: aplay/aplay.c:1223 aplay/aplay.c:2376 aplay/aplay.c:2383 aplay/aplay.c:2912 msgid "read error" msgstr "erreur de lecture" -#: aplay/aplay.c:1244 +#: aplay/aplay.c:1253 msgid "Channel numbers don't match between hw_params and channel map" msgstr "" +"Les numéros de canal ne correspondent pas entre hw_params et la carte de " +"canal" -#: aplay/aplay.c:1253 +#: aplay/aplay.c:1262 #, c-format msgid "Warning: unable to get channel map\n" -msgstr "" +msgstr "Avertissement : impossible d'obtenir la carte de canal\n" -#: aplay/aplay.c:1287 -#, c-format -msgid "Channel %d doesn't match with hw_parmas" -msgstr "" +#: aplay/aplay.c:1296 +#, fuzzy, c-format +#| msgid "Channel %d doesn't match with hw_parmas" +msgid "Channel %d doesn't match with hw_params" +msgstr "Le canal %d ne correspond pas avec hw_parmas" -#: aplay/aplay.c:1314 +#: aplay/aplay.c:1323 msgid "Broken configuration for this PCM: no configurations available" -msgstr "Configuration erronée pour ce périphérique PCM: pas de configuration" +msgstr "Configuration erronée pour ce PCM : pas de configuration disponible" -#: aplay/aplay.c:1318 +#: aplay/aplay.c:1327 #, c-format msgid "HW Params of device \"%s\":\n" -msgstr "" +msgstr "Params HW pour le périphérique \"%s\" :\n" -#: aplay/aplay.c:1338 +#: aplay/aplay.c:1347 msgid "Access type not available" msgstr "Ce type d'accès n'est pas disponible" -#: aplay/aplay.c:1343 +#: aplay/aplay.c:1352 msgid "Sample format non available" msgstr "Ce format d'échantillonage n'est pas disponible" -#: aplay/aplay.c:1349 +#: aplay/aplay.c:1358 msgid "Channels count non available" msgstr "Nombre de canaux non disponible" -#: aplay/aplay.c:1364 +#: aplay/aplay.c:1373 #, c-format msgid "Warning: rate is not accurate (requested = %iHz, got = %iHz)\n" msgstr "" -"Avertissement: la fréquence n'est pas précise (demandé = %iHz,\n" +"Avertissement : la fréquence n'est pas précise (demandé = %iHz,\n" "obtenu = %iHz)\n" -#: aplay/aplay.c:1370 +#: aplay/aplay.c:1379 #, c-format msgid " please, try the plug plugin %s\n" msgstr " veuillez essayez le greffon de branchement %s\n" -#: aplay/aplay.c:1407 +#: aplay/aplay.c:1416 msgid "Unable to install hw params:" -msgstr "Les paramètres matériel n'ont pas pu être installés:" +msgstr "Les paramètres matériel n'ont pas pu être installés :" -#: aplay/aplay.c:1414 +#: aplay/aplay.c:1423 #, c-format msgid "Can't use period equal to buffer size (%lu == %lu)" msgstr "" -"Une période égale à la taille du tampon (%lu == %lu) ne peut êtreutilisée" +"Une période égale à la taille du tampon (%lu == %lu) ne peut être utilisée" -#: aplay/aplay.c:1420 +#: aplay/aplay.c:1429 #, fuzzy +#| msgid "unable to install sw params:" msgid "Unable to get current sw params." -msgstr "Les paramètres logiciel n'ont pas pu être installés:" +msgstr "Les paramètres logiciel n'ont pas pu être installés :" -#: aplay/aplay.c:1449 +#: aplay/aplay.c:1458 msgid "unable to install sw params:" -msgstr "Les paramètres logiciel n'ont pas pu être installés:" +msgstr "Les paramètres logiciel n'ont pas pu être installés :" -#: aplay/aplay.c:1484 +#: aplay/aplay.c:1493 #, c-format msgid "snd_pcm_mmap_begin problem: %s" -msgstr "" +msgstr "problème snd_pcm_mmap_begin : %s" -#: aplay/aplay.c:1513 +#: aplay/aplay.c:1522 #, c-format msgid "stdin O_NONBLOCK flag setup failed\n" -msgstr "" +msgstr "paramétrage du fanion stdin O_NONBLOCK échoué\n" -#: aplay/aplay.c:1537 +#: aplay/aplay.c:1559 #, c-format msgid "\rPAUSE command ignored (no hw support)\n" -msgstr "" +msgstr "commande \rPAUSE ignorée (pas de support hw)\n" -#: aplay/aplay.c:1545 -#, fuzzy, c-format +#: aplay/aplay.c:1567 +#, c-format msgid "pause push error: %s" -msgstr "erreur d'état: %s" +msgstr "erreur de poussée de pause : %s" -#: aplay/aplay.c:1556 -#, fuzzy, c-format +#: aplay/aplay.c:1578 +#, c-format msgid "pause release error: %s" -msgstr "suspension: prepare error: %s" +msgstr "erreur de la relâche de la pause : %s" -#: aplay/aplay.c:1572 +#: aplay/aplay.c:1594 #, c-format msgid "" "\r=== PAUSE === " msgstr "" -#: aplay/aplay.c:1614 +#: aplay/aplay.c:1636 #, c-format msgid "status error: %s" -msgstr "erreur d'état: %s" +msgstr "erreur d'état : %s" -#: aplay/aplay.c:1619 -#, fuzzy, c-format +#: aplay/aplay.c:1641 +#, c-format msgid "fatal %s: %s" -msgstr "%s: %s\n" +msgstr "fatal %s : %s" -#: aplay/aplay.c:1620 aplay/aplay.c:1631 aplay/aplay.c:1634 aplay/aplay.c:1642 +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1656 aplay/aplay.c:1664 msgid "underrun" msgstr "perte" -#: aplay/aplay.c:1620 aplay/aplay.c:1631 aplay/aplay.c:1642 +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1664 msgid "overrun" msgstr "dépassement" -#: aplay/aplay.c:1630 aplay/aplay.c:1641 +#: aplay/aplay.c:1652 aplay/aplay.c:1663 #, c-format msgid "%s!!! (at least %.3f ms long)\n" msgstr "%s!!! (au moins longue de %.3f ms)\n" -#: aplay/aplay.c:1646 +#: aplay/aplay.c:1668 #, c-format msgid "Status:\n" -msgstr "État:\n" +msgstr "État :\n" -#: aplay/aplay.c:1650 +#: aplay/aplay.c:1672 #, c-format msgid "xrun: prepare error: %s" -msgstr "" +msgstr "xrun : erreur de préparation : %s" -#: aplay/aplay.c:1656 +#: aplay/aplay.c:1679 #, c-format msgid "Status(DRAINING):\n" -msgstr "" +msgstr "Statut (DRAINAGE) :\n" -#: aplay/aplay.c:1660 +#: aplay/aplay.c:1683 #, c-format msgid "capture stream format change? attempting recover...\n" msgstr "" -"changement de format de flux de capture? tentative de récupération...\n" +"changement de format de flux de capture ? tentative de récupération...\n" -#: aplay/aplay.c:1662 +#: aplay/aplay.c:1685 #, c-format msgid "xrun(DRAINING): prepare error: %s" -msgstr "" +msgstr "xrun(DRAINAGE) : erreur de préparation : %s" -#: aplay/aplay.c:1669 +#: aplay/aplay.c:1692 #, c-format msgid "Status(R/W):\n" -msgstr "" +msgstr "Status(R/W) :\n" -#: aplay/aplay.c:1672 +#: aplay/aplay.c:1695 #, c-format msgid "read/write error, state = %s" msgstr "erreur de lecture/écriture, état = %s" -#: aplay/aplay.c:1682 +#: aplay/aplay.c:1705 #, c-format msgid "Suspended. Trying resume. " msgstr "Suspendu. Tentative de reprise. " -#: aplay/aplay.c:1688 +#: aplay/aplay.c:1711 #, c-format msgid "Failed. Restarting stream. " msgstr "Échec. Redémarrage du flux." -#: aplay/aplay.c:1691 +#: aplay/aplay.c:1714 #, c-format msgid "suspend: prepare error: %s" -msgstr "suspension: prepare error: %s" +msgstr "suspension : prepare error : %s" -#: aplay/aplay.c:1696 +#: aplay/aplay.c:1719 #, c-format msgid "Done.\n" msgstr "Terminé.\n" -#: aplay/aplay.c:1718 +#: aplay/aplay.c:1741 #, c-format msgid " !clip " msgstr "" -#: aplay/aplay.c:1865 +#: aplay/aplay.c:1893 #, c-format msgid "Unsupported bit size %d.\n" msgstr "%d bit(s) non supporté(s).\n" -#: aplay/aplay.c:1899 +#: aplay/aplay.c:1929 #, c-format msgid "Max peak (%li samples): 0x%08x " -msgstr "Pic max. (%li échantillons): 0x%08x " +msgstr "Pic max. (%li échantillons) : 0x%08x " -#: aplay/aplay.c:1933 +#: aplay/aplay.c:1970 #, c-format msgid "" "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer = " "%li\n" msgstr "" -"Position de tampon suspicieuse (total %li): dispo = %li, délai = %li, tampon " -"= %li\n" +"Position de tampon suspicieuse (total %li) : dispo = %li, délai = %li, " +"tampon = %li\n" -#: aplay/aplay.c:2061 +#: aplay/aplay.c:1979 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious status buffer position (%li total): avail = %li, delay = %li, " +"buffer = %li\n" +msgstr "" +"Position de tampon suspicieuse (total %li) : dispo = %li, délai = %li, " +"tampon = %li\n" + +#: aplay/aplay.c:1983 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious buffer position avail > delay (%li total): avail = %li, delay = " +"%li\n" +msgstr "" +"Position de tampon suspicieuse (total %li) : dispo = %li, délai = %li, " +"tampon = %li\n" + +#: aplay/aplay.c:1987 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious status buffer position avail > delay (%li total): avail = %li, " +"delay = %li\n" +msgstr "" +"Position de tampon suspicieuse (total %li) : dispo = %li, délai = %li, " +"tampon = %li\n" + +#: aplay/aplay.c:2030 +#, c-format +msgid "Status(R/W) (standalone avail=%li delay=%li):\n" +msgstr "" + +#: aplay/aplay.c:2127 #, c-format msgid "write error: %s" -msgstr "erreur en écriture: %s" +msgstr "erreur en écriture : %s" -#: aplay/aplay.c:2109 +#: aplay/aplay.c:2175 #, c-format msgid "writev error: %s" -msgstr "erreur de writev: %s" +msgstr "erreur de writev : %s" -#: aplay/aplay.c:2153 +#: aplay/aplay.c:2221 #, c-format msgid "read error: %s" -msgstr "erreur en lecture: %s" +msgstr "erreur en lecture : %s" -#: aplay/aplay.c:2197 +#: aplay/aplay.c:2268 #, c-format msgid "readv error: %s" -msgstr "erreur de readv: %s" +msgstr "erreur de readv : %s" -#: aplay/aplay.c:2245 +#: aplay/aplay.c:2317 msgid "can't allocate buffer for silence" msgstr "Un tampon pour silence n'a pas pu être alloué" -#: aplay/aplay.c:2254 aplay/aplay.c:2482 aplay/aplay.c:2487 aplay/aplay.c:2537 -#: aplay/aplay.c:2546 aplay/aplay.c:2553 aplay/aplay.c:2563 aplay/aplay.c:2569 -#: aplay/aplay.c:2641 aplay/aplay.c:2671 aplay/aplay.c:2685 +#: aplay/aplay.c:2326 aplay/aplay.c:2554 aplay/aplay.c:2559 aplay/aplay.c:2611 +#: aplay/aplay.c:2620 aplay/aplay.c:2627 aplay/aplay.c:2637 aplay/aplay.c:2643 +#: aplay/aplay.c:2715 aplay/aplay.c:2745 aplay/aplay.c:2759 msgid "write error" msgstr "erreur en écriture" -#: aplay/aplay.c:2267 +#: aplay/aplay.c:2339 #, c-format msgid "voc_pcm_flush - silence error" msgstr "voc_pcm_flush - erreur de silence" -#: aplay/aplay.c:2270 +#: aplay/aplay.c:2342 msgid "voc_pcm_flush error" msgstr "erreur voc_pcm_flush" -#: aplay/aplay.c:2295 +#: aplay/aplay.c:2367 msgid "malloc error" msgstr "erreur malloc" -#: aplay/aplay.c:2299 +#: aplay/aplay.c:2371 #, c-format msgid "Playing Creative Labs Channel file '%s'...\n" msgstr "Lecture du ficher de canaux Creative Labs '%s'...\n" -#: aplay/aplay.c:2367 aplay/aplay.c:2462 +#: aplay/aplay.c:2439 aplay/aplay.c:2534 msgid "can't play packed .voc files" msgstr "les fichiers .voc de type 'packed' ne sont pas supportés" -#: aplay/aplay.c:2422 +#: aplay/aplay.c:2494 #, c-format msgid "can't play loops; %s isn't seekable\n" msgstr "%s n'est pas navigable; les motifs n'ont pas pu être lus\n" -#: aplay/aplay.c:2471 +#: aplay/aplay.c:2543 #, c-format msgid "unknown blocktype %d. terminate." msgstr "type de bloc %d inconnu. fin." -#: aplay/aplay.c:2605 +#: aplay/aplay.c:2679 #, c-format msgid "Wave doesn't support %s format..." msgstr "Le format wave %s n'est pas supporté..." -#: aplay/aplay.c:2665 +#: aplay/aplay.c:2739 #, c-format msgid "Sparc Audio doesn't support %s format..." msgstr "Le format %s Sparc Audio n'est pas supporté..." -#: aplay/aplay.c:2740 +#: aplay/aplay.c:2814 msgid "Playing" msgstr "Lecture" -#: aplay/aplay.c:2740 +#: aplay/aplay.c:2814 msgid "Recording" msgstr "Capture" -#: aplay/aplay.c:2744 +#: aplay/aplay.c:2818 #, c-format msgid "Rate %d Hz, " msgstr "Fréquence %d Hz, " -#: aplay/aplay.c:2746 +#: aplay/aplay.c:2820 #, c-format msgid "Mono" msgstr "" -#: aplay/aplay.c:2748 +#: aplay/aplay.c:2822 #, c-format msgid "Stereo" msgstr "Stéréo" -#: aplay/aplay.c:2750 +#: aplay/aplay.c:2824 #, c-format msgid "Channels %i" msgstr "%i Canaux" -#: aplay/aplay.c:3351 +#: aplay/aplay.c:3431 #, fuzzy, c-format +#| msgid "You need to specify %d files" msgid "You need to specify %u files" msgstr "Vous devez spécifier %d fichiers" -#: aplay/aplay.c:3404 +#: aplay/aplay.c:3484 #, c-format msgid "You need to specify %d files" msgstr "Vous devez spécifier %d fichiers" @@ -1069,7 +1139,7 @@ #: seq/aconnect/aconnect.c:51 #, c-format msgid "Usage:\n" -msgstr "Utilisation:\n" +msgstr "Utilisation :\n" #: seq/aconnect/aconnect.c:52 #, c-format @@ -1099,39 +1169,39 @@ #: seq/aconnect/aconnect.c:57 #, c-format msgid " -r,--real # convert real-time-stamp on queue\n" -msgstr "" +msgstr " -r,--real # convertit real-time-stamp à la queue\n" #: seq/aconnect/aconnect.c:58 #, c-format msgid " -t,--tick # convert tick-time-stamp on queue\n" -msgstr "" +msgstr " -t,--tick # convertit tick-time-stamp à la queue\n" #: seq/aconnect/aconnect.c:59 #, c-format msgid " * List connected ports (no subscription action)\n" -msgstr " * Afficher la liste des ports connectés (pas de souscription)\n" +msgstr " * Lister les ports connectés (pas de souscription)\n" #: seq/aconnect/aconnect.c:60 #, c-format msgid " aconnect -i|-o [-options]\n" -msgstr " aconnect -i|-o [-options]\n" +msgstr "" #: seq/aconnect/aconnect.c:61 #, c-format msgid " -i,--input list input (readable) ports\n" -msgstr " -i,--input afficher la liste des ports d'entrée\n" +msgstr " -i,--input lister les ports (lisibles) d'entrée\n" #: seq/aconnect/aconnect.c:62 #, c-format msgid " -o,--output list output (writable) ports\n" -msgstr " -o,--output afficher la liste des ports de sortie\n" +msgstr " -o,--output lister les ports (écrivables) de sortie\n" #: seq/aconnect/aconnect.c:63 #, c-format msgid " -l,--list list current connections of each port\n" msgstr "" -" -l,--list afficher la liste des connexions en cours\n" -" sur chaque port\n" +" -l,--list lister les connexions en cours\n" +" de chaque port\n" #: seq/aconnect/aconnect.c:64 #, c-format @@ -1141,20 +1211,20 @@ #: seq/aconnect/aconnect.c:65 #, c-format msgid " -x, --removeall\n" -msgstr " -x, --removeall\n" +msgstr "" #: seq/aconnect/aconnect.c:132 msgid "Connecting To" -msgstr "Connexion À" +msgstr "Connexion à" #: seq/aconnect/aconnect.c:133 msgid "Connected From" -msgstr "Connecté Depuis" +msgstr "Connecté depuis" #: seq/aconnect/aconnect.c:171 -#, fuzzy, c-format +#, c-format msgid "client %d: '%s' [type=%s" -msgstr "client %d: '%s' [type=%s]\n" +msgstr "client %d : '%s' [type=%s" #: seq/aconnect/aconnect.c:175 msgid "user" @@ -1182,12 +1252,12 @@ #: seq/aconnect/aconnect.c:365 #, c-format msgid "invalid sender address %s\n" -msgstr "l'addresse envoyeur %s est incorrecte\n" +msgstr "l'adresse envoyeur %s est incorrecte\n" -#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:290 +#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:303 #, c-format msgid "invalid destination address %s\n" -msgstr "l'addresse destinataire %s est incorrecte\n" +msgstr "l'adresse destinataire %s est incorrecte\n" #: seq/aconnect/aconnect.c:384 #, c-format @@ -1209,146 +1279,163 @@ msgid "Connection failed (%s)\n" msgstr "Échec de connexion (%s)\n" -#: seq/aseqnet/aseqnet.c:164 +#: seq/aseqnet/aseqnet.c:171 #, c-format msgid "aseqnet - network client/server on ALSA sequencer\n" msgstr "aseqnet - client/serveur réseau sur le séquenceur ALSA\n" -#: seq/aseqnet/aseqnet.c:165 +#: seq/aseqnet/aseqnet.c:172 #, c-format msgid " Copyright (C) 1999 Takashi Iwai\n" msgstr "" -#: seq/aseqnet/aseqnet.c:166 +#: seq/aseqnet/aseqnet.c:173 #, c-format msgid "usage:\n" -msgstr "utilisation:\n" +msgstr "utilisation :\n" -#: seq/aseqnet/aseqnet.c:167 +#: seq/aseqnet/aseqnet.c:174 #, c-format msgid " server mode: aseqnet [-options]\n" -msgstr " mode serveur: aseqnet [-options]\n" +msgstr " mode serveur : aseqnet [-options]\n" -#: seq/aseqnet/aseqnet.c:168 +#: seq/aseqnet/aseqnet.c:175 #, c-format msgid " client mode: aseqnet [-options] server_host\n" -msgstr " mode client: aseqnet [-options] hôte_serveur\n" +msgstr " mode client : aseqnet [-options] hôte_serveur\n" -#: seq/aseqnet/aseqnet.c:169 +#: seq/aseqnet/aseqnet.c:176 #, c-format msgid "options:\n" -msgstr "options:\n" +msgstr "options :\n" -#: seq/aseqnet/aseqnet.c:170 -#, fuzzy, c-format +#: seq/aseqnet/aseqnet.c:177 +#, c-format +msgid " -6,--ipv6 : use IPv6 TCP protocol\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:178 +#, c-format msgid " -p,--port # : specify TCP port (digit or service name)\n" -msgstr " -p,--port # : spécifier le port TCP (numéro ou nom de service)\n" +msgstr " -p,--port # : spécifie le port TCP (numéro ou nom de service)\n" -#: seq/aseqnet/aseqnet.c:171 +#: seq/aseqnet/aseqnet.c:179 #, c-format msgid " -s,--source addr : read from given addr (client:port)\n" -msgstr " -s,--source addr : lire à partir de l'addr. donnée (client:port)\n" +msgstr " -s,--source addr : lire à partir de l'adr. donnée (client:port)\n" -#: seq/aseqnet/aseqnet.c:172 +#: seq/aseqnet/aseqnet.c:180 #, c-format msgid " -d,--dest addr : write to given addr (client:port)\n" -msgstr " -d,--dest addr : écrire à l'addr. donnée (client:port)\n" +msgstr " -d,--dest addr : écrire à l'adr. donnée (client:port)\n" -#: seq/aseqnet/aseqnet.c:173 +#: seq/aseqnet/aseqnet.c:181 +#, c-format +msgid " -n,--name value : use a specific midi process name\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:182 #, c-format msgid " -v, --verbose : print verbose messages\n" msgstr " -v, --verbose : affichage locace de messages\n" -#: seq/aseqnet/aseqnet.c:174 +#: seq/aseqnet/aseqnet.c:183 #, c-format msgid " -i, --info : print certain received events\n" msgstr " -i, --info : afficher certains évènements reçus\n" -#: seq/aseqnet/aseqnet.c:188 +#: seq/aseqnet/aseqnet.c:197 #, c-format msgid "can't malloc\n" msgstr "échec allocation mémoire (malloc)\n" -#: seq/aseqnet/aseqnet.c:213 +#: seq/aseqnet/aseqnet.c:222 #, c-format msgid "closing files..\n" msgstr "fermeture des fichiers...\n" -#: seq/aseqnet/aseqnet.c:272 +#: seq/aseqnet/aseqnet.c:285 #, c-format msgid "sequencer opened: %d:%d\n" -msgstr "séquenceur ouvert: %d:%d\n" +msgstr "séquenceur ouvert : %d:%d\n" -#: seq/aseqnet/aseqnet.c:279 +#: seq/aseqnet/aseqnet.c:292 #, c-format msgid "invalid source address %s\n" -msgstr "addresse source %s incorrecte\n" +msgstr "adresse source %s incorrecte\n" -#: seq/aseqnet/aseqnet.c:309 -#, c-format -msgid "service '%s' is not found in /etc/services\n" -msgstr "le service '%s' n'as pas été trouvé dans /etc/services\n" +#: seq/aseqnet/aseqnet.c:362 +#, fuzzy, c-format +#| msgid "can't get address %s\n" +msgid "can't get address\n" +msgstr "l'adresse %s na pas pu être obtenue\n" -#: seq/aseqnet/aseqnet.c:377 +#: seq/aseqnet/aseqnet.c:376 seq/aseqnet/aseqnet.c:461 +#, fuzzy, c-format +#| msgid "Connecting To" +msgid "connecting to: %s\n" +msgstr "Connexion à" + +#: seq/aseqnet/aseqnet.c:414 #, c-format msgid "too many connections!\n" -msgstr "trop de connexions!\n" +msgstr "trop de connexions !\n" -#: seq/aseqnet/aseqnet.c:388 +#: seq/aseqnet/aseqnet.c:425 #, c-format msgid "accepted[%d]\n" msgstr "accepté[%d]\n" -#: seq/aseqnet/aseqnet.c:411 +#: seq/aseqnet/aseqnet.c:447 #, c-format msgid "can't get address %s\n" -msgstr "l'addresse %s na pas pu être obtenue\n" +msgstr "l'adresse %s na pas pu être obtenue\n" -#: seq/aseqnet/aseqnet.c:422 +#: seq/aseqnet/aseqnet.c:475 #, c-format msgid "ok.. connected\n" msgstr "ok.. connecté\n" -#: seq/aseqnet/aseqnet.c:518 +#: seq/aseqnet/aseqnet.c:574 #, c-format msgid "Channel %2d: Control event : %5d\n" -msgstr "Canal %2d: Évènement de contrôle: %5d\n" +msgstr "Canal %2d : évènement de contrôle : %5d\n" -#: seq/aseqnet/aseqnet.c:522 +#: seq/aseqnet/aseqnet.c:578 #, c-format msgid "Channel %2d: Pitchbender : %5d\n" -msgstr "Canal %2d: Pitchbender : %5d\n" +msgstr "Canal %2d : Pitchbender : %5d\n" -#: seq/aseqnet/aseqnet.c:526 +#: seq/aseqnet/aseqnet.c:582 #, c-format msgid "Channel %2d: Note On event : %5d\n" -msgstr "Canal %2d: évènement Note On : %5d\n" +msgstr "Canal %2d : évènement Note On : %5d\n" -#: seq/aseqnet/aseqnet.c:530 +#: seq/aseqnet/aseqnet.c:586 #, c-format msgid "Channel %2d: Note Off event: %5d\n" -msgstr "Canal %2d: évènement Note Off : %5d\n" +msgstr "Canal %2d : évènement Note Off : %5d\n" -#: seq/aseqnet/aseqnet.c:585 +#: seq/aseqnet/aseqnet.c:641 #, c-format msgid "disconnected\n" msgstr "déconnecté\n" #: speaker-test/speaker-test.c:120 msgid "Front Left" -msgstr "Avant Gauche" +msgstr "Avant gauche" #: speaker-test/speaker-test.c:121 msgid "Front Right" -msgstr "Avant Droit" +msgstr "Avant droit" #: speaker-test/speaker-test.c:122 msgid "Rear Left" -msgstr "Arrière Gauche" +msgstr "Arrière gauche" #: speaker-test/speaker-test.c:123 msgid "Rear Right" -msgstr "Arrière Droit" +msgstr "Arrière droit" #: speaker-test/speaker-test.c:125 msgid "LFE" @@ -1356,11 +1443,11 @@ #: speaker-test/speaker-test.c:126 msgid "Side Left" -msgstr "Côté Gauche" +msgstr "Côté gauche" #: speaker-test/speaker-test.c:127 msgid "Side Right" -msgstr "Côté Droit" +msgstr "Côté droit" #: speaker-test/speaker-test.c:128 msgid "Channel 9" @@ -1394,209 +1481,214 @@ msgid "Channel 16" msgstr "Canal 16" -#: speaker-test/speaker-test.c:424 +#: speaker-test/speaker-test.c:440 #, c-format msgid "Broken configuration for playback: no configurations available: %s\n" -msgstr "Configuration erronée pour la lecture: pas de configuration: %s\n" +msgstr "" +"Configuration erronée pour la lecture : pas de configuration disponible : " +"%s\n" -#: speaker-test/speaker-test.c:431 +#: speaker-test/speaker-test.c:447 #, c-format msgid "Access type not available for playback: %s\n" -msgstr "Le type d'accès est indisponible à la lecture: %s\n" +msgstr "Le type d'accès est indisponible à la lecture : %s\n" -#: speaker-test/speaker-test.c:438 +#: speaker-test/speaker-test.c:454 #, c-format msgid "Sample format not available for playback: %s\n" -msgstr "Le format d'échantillonage est indisponible à la lecture: %s\n" +msgstr "Le format d'échantillonage est indisponible à la lecture : %s\n" -#: speaker-test/speaker-test.c:445 +#: speaker-test/speaker-test.c:461 #, c-format msgid "Channels count (%i) not available for playbacks: %s\n" -msgstr "Le nombre (%i) de canaux est indisponible à la lecture: %s\n" +msgstr "Le nombre (%i) de canaux est indisponible à la lecture : %s\n" -#: speaker-test/speaker-test.c:453 +#: speaker-test/speaker-test.c:469 #, c-format msgid "Rate %iHz not available for playback: %s\n" -msgstr "La fréquence %iHz est indisponible à la lecture: %s\n" +msgstr "La fréquence %iHz est indisponible à la lecture : %s\n" -#: speaker-test/speaker-test.c:458 +#: speaker-test/speaker-test.c:474 #, c-format msgid "Rate doesn't match (requested %iHz, get %iHz, err %d)\n" msgstr "" -"La fréquence ne correspond pas (demandée: %iHz, obtenue %iHz, err %d)\n" +"La fréquence ne correspond pas (demandée : %iHz, obtenue %iHz, err %d)\n" -#: speaker-test/speaker-test.c:462 +#: speaker-test/speaker-test.c:478 #, c-format msgid "Rate set to %iHz (requested %iHz)\n" msgstr "La fréquence est %iHz (demandée %iHz)\n" -#: speaker-test/speaker-test.c:468 +#: speaker-test/speaker-test.c:484 #, c-format msgid "Buffer size range from %lu to %lu\n" msgstr "L'intervalle de la taille du tampon est de %lu à %lu\n" -#: speaker-test/speaker-test.c:469 +#: speaker-test/speaker-test.c:485 #, c-format msgid "Period size range from %lu to %lu\n" msgstr "L'intervalle de la taille de la période est de %lu à %lu\n" -#: speaker-test/speaker-test.c:471 +#: speaker-test/speaker-test.c:487 #, c-format msgid "Requested period time %u us\n" msgstr "Temps de période demandé %u µs\n" -#: speaker-test/speaker-test.c:474 +#: speaker-test/speaker-test.c:490 #, c-format msgid "Unable to set period time %u us for playback: %s\n" -msgstr "Le temps de période %u µs n'a pas pu être défini pour la lecture: %s\n" +msgstr "" +"Le temps de période %u µs n'a pas pu être défini pour la lecture : %s\n" -#: speaker-test/speaker-test.c:480 +#: speaker-test/speaker-test.c:496 #, c-format msgid "Requested buffer time %u us\n" msgstr "Temps tampon demandé %u µs\n" -#: speaker-test/speaker-test.c:483 +#: speaker-test/speaker-test.c:499 #, c-format msgid "Unable to set buffer time %u us for playback: %s\n" -msgstr "Le temps tampon de %u µs n'a pas pu être définie pour la lecture: %s\n" +msgstr "" +"Le temps tampon de %u µs n'a pas pu être définie pour la lecture : %s\n" -#: speaker-test/speaker-test.c:492 +#: speaker-test/speaker-test.c:508 #, c-format msgid "Using max buffer size %lu\n" msgstr "Taille max. de tampon %lu utilisée\n" -#: speaker-test/speaker-test.c:495 +#: speaker-test/speaker-test.c:511 #, c-format msgid "Unable to set buffer size %lu for playback: %s\n" -msgstr "La taile de tampon %lu n'a pas pu être définie pour la lecture: %s\n" +msgstr "La taile de tampon %lu n'a pas pu être définie pour la lecture : %s\n" -#: speaker-test/speaker-test.c:501 +#: speaker-test/speaker-test.c:517 #, c-format msgid "Periods = %u\n" msgstr "Périodes = %u\n" -#: speaker-test/speaker-test.c:504 +#: speaker-test/speaker-test.c:520 #, c-format msgid "Unable to set nperiods %u for playback: %s\n" -msgstr "nperiods %u n'a pas pu être défini pour la lecture: %s\n" +msgstr "nperiods %u n'a pas pu être défini pour la lecture : %s\n" -#: speaker-test/speaker-test.c:513 +#: speaker-test/speaker-test.c:529 #, c-format msgid "Unable to set hw params for playback: %s\n" msgstr "" -"Les paramètres matériel n'ont pas pu être définis pour la lecture: %s\n" +"Les paramètres matériel n'ont pas pu être définis pour la lecture : %s\n" -#: speaker-test/speaker-test.c:519 +#: speaker-test/speaker-test.c:535 #, c-format msgid "was set period_size = %lu\n" -msgstr "" +msgstr "était paramétré pour period_size = %lu\n" -#: speaker-test/speaker-test.c:520 +#: speaker-test/speaker-test.c:536 #, c-format msgid "was set buffer_size = %lu\n" -msgstr "" +msgstr "était paramétré pour buffer_size = %lu\n" -#: speaker-test/speaker-test.c:522 +#: speaker-test/speaker-test.c:538 #, c-format msgid "buffer to small, could not use\n" msgstr "tampon trop petit, il n'a pas pu être utilisé\n" -#: speaker-test/speaker-test.c:535 +#: speaker-test/speaker-test.c:551 #, c-format msgid "Unable to determine current swparams for playback: %s\n" msgstr "" "Les paramètres logiciels actuels n'ont pas pu être déterminés pour la " -"lecture: %s\n" +"lecture : %s\n" -#: speaker-test/speaker-test.c:542 +#: speaker-test/speaker-test.c:558 #, c-format msgid "Unable to set start threshold mode for playback: %s\n" msgstr "" +"Impossible de paramétrer le mode de déclenchement de démarrage pour la " +"lecture : %s\n" -#: speaker-test/speaker-test.c:549 +#: speaker-test/speaker-test.c:565 #, c-format msgid "Unable to set avail min for playback: %s\n" -msgstr "" +msgstr "Impossible de paramétrer le minimum disponible pour la lecture : %s\n" -#: speaker-test/speaker-test.c:556 +#: speaker-test/speaker-test.c:572 #, c-format msgid "Unable to set sw params for playback: %s\n" msgstr "" -"Les paramètres logiciel n'ont pas pu être définis pour la lecture: %s\n" +"Les paramètres logiciel n'ont pas pu être définis pour la lecture : %s\n" -#: speaker-test/speaker-test.c:576 -#, fuzzy, c-format +#: speaker-test/speaker-test.c:592 +#, c-format msgid "Unable to set channel map: %s\n" -msgstr "" -"Les paramètres matériel n'ont pas pu être définis pour la lecture: %s\n" +msgstr "Impossible de paramètrer la carte de canal : %s\n" -#: speaker-test/speaker-test.c:601 +#: speaker-test/speaker-test.c:617 #, c-format msgid "Can't recovery from underrun, prepare failed: %s\n" -msgstr "" +msgstr "Impossible de récupérer depuis une perte, préparation échouée : %s\n" -#: speaker-test/speaker-test.c:612 +#: speaker-test/speaker-test.c:628 #, c-format msgid "Can't recovery from suspend, prepare failed: %s\n" -msgstr "" +msgstr "N'a pas pu récupérer depuis suspend, préparation échouée : %s\n" -#: speaker-test/speaker-test.c:676 speaker-test/speaker-test.c:1191 +#: speaker-test/speaker-test.c:692 speaker-test/speaker-test.c:1207 #, c-format msgid "No enough memory\n" msgstr "Pas assez de mémoire\n" -#: speaker-test/speaker-test.c:681 +#: speaker-test/speaker-test.c:697 #, c-format msgid "Cannot open WAV file %s\n" msgstr "Le fichier WAV %s n'a pas pu être ouvert\n" -#: speaker-test/speaker-test.c:685 speaker-test/speaker-test.c:714 +#: speaker-test/speaker-test.c:701 speaker-test/speaker-test.c:730 #, c-format msgid "Invalid WAV file %s\n" msgstr "Fichier WAV incorrect %s\n" -#: speaker-test/speaker-test.c:690 +#: speaker-test/speaker-test.c:706 #, c-format msgid "Not a WAV file: %s\n" msgstr "Le fichier %s n'est pas au format WAV\n" -#: speaker-test/speaker-test.c:694 +#: speaker-test/speaker-test.c:710 #, c-format msgid "Unsupported WAV format %d for %s\n" msgstr "Format WAV %d non supporté pour %s\n" -#: speaker-test/speaker-test.c:699 +#: speaker-test/speaker-test.c:715 #, c-format msgid "%s is not a mono stream (%d channels)\n" msgstr "%s n'est pas un flux en mono (%d canaux)\n" -#: speaker-test/speaker-test.c:704 +#: speaker-test/speaker-test.c:720 #, c-format msgid "Sample rate doesn't match (%d) for %s\n" msgstr "La fréquence d'échantillonage (%d) ne correspond pas à %s\n" -#: speaker-test/speaker-test.c:709 +#: speaker-test/speaker-test.c:725 #, c-format msgid "Unsupported sample format bits %d for %s\n" msgstr "Le format d'échantillonage %d bits n'est pas supporté pour %s\n" -#: speaker-test/speaker-test.c:770 +#: speaker-test/speaker-test.c:786 #, c-format msgid "Undefined channel %d\n" msgstr "Canal non-défini %d\n" -#: speaker-test/speaker-test.c:821 +#: speaker-test/speaker-test.c:837 #, c-format msgid "Write error: %d,%s\n" -msgstr "Erreur en écriture: %d,%s\n" +msgstr "Erreur en écriture : %d,%s\n" -#: speaker-test/speaker-test.c:823 +#: speaker-test/speaker-test.c:839 #, c-format msgid "xrun_recovery failed: %d,%s\n" -msgstr "" +msgstr "xrun_recovery échoué : %d,%s\n" -#: speaker-test/speaker-test.c:926 -#, fuzzy, c-format +#: speaker-test/speaker-test.c:942 +#, c-format msgid "" "Usage: speaker-test [OPTION]... \n" "-h,--help\thelp\n" @@ -1618,100 +1710,106 @@ "-S,--scale\tScale of generated test tones in percent (default=80)\n" "\n" msgstr "" -"Utilisation: speaker-test [OPTION]...\n" +"Utilisation : speaker-test [OPTION]... \n" "-h,--help\taide\n" "-D,--device\tpériphérique de lecture\n" "-r,--rate\tfréquence du flux en Hz\n" "-c,--channels\tnombre de canaux du flux\n" -"-f,--frequency\tfréquence courbe sinus en Hz\n" +"-f,--frequency\tfréquence d'onde sinus en Hz\n" "-F,--format\tformat d'échantillonage\n" "-b,--buffer\ttaille en µs du tampon circulaire\n" "-p,--period\ttaille de la période en µs\n" "-P,--nperiods\tnombre de périodes\n" -"-t,--test\tpink=pink noise, sine=courbe sinus, wav=fichier WAV\n" -"-l,--nloops\tspécifier le nombre de motifs à tester, 0 = infini\n" +"-t,--test\tpink=bruit rose, sine=courbe sinus, wav=fichier WAV\n" +"-l,--nloops\tspécifier le nombre de boucles à tester, 0 = infini\n" "-s,--speaker\ttest sur une seule enceinte.\n" -"\t\tValeurs 1=Gauche, 2=Droite, et c.\n" -"-w,--wavfile\tUtiliser le fichier WAV spécifié pour le test\n" +"\t\tValeurs 1=Gauche, 2=Droite, etc.\n" +"-w,--wavfile\tUtiliser le fichier WAV spécifié pour le test sonore\n" "-w,--wavdir\tSpécifier le répertoire contenant les fichiers WAV\n" +"-m,--chmap\tSpécifier la carte de canal à écraser\n" "-X,--force-frequency\tpermettre fréquences en dehors de la gamme 30-8000Hz\n" +"-S,--scale\tÉchelle des tonalités de test générées en pourcent (défaut=80)\n" "\n" -#: speaker-test/speaker-test.c:1058 +#: speaker-test/speaker-test.c:1074 #, c-format msgid "Invalid number of periods %d\n" msgstr "Nombre de périodes %d incorrect\n" -#: speaker-test/speaker-test.c:1074 speaker-test/speaker-test.c:1078 +#: speaker-test/speaker-test.c:1090 speaker-test/speaker-test.c:1094 #, c-format msgid "Invalid test type %s\n" msgstr "Type de test %s incorrect\n" -#: speaker-test/speaker-test.c:1111 +#: speaker-test/speaker-test.c:1127 #, c-format msgid "Unknown option '%c'\n" msgstr "Option '%c' inconnue\n" -#: speaker-test/speaker-test.c:1125 +#: speaker-test/speaker-test.c:1141 #, c-format msgid "Invalid parameter for -s option.\n" msgstr "Paramètre incorrect pour l'option -s.\n" -#: speaker-test/speaker-test.c:1140 +#: speaker-test/speaker-test.c:1156 #, c-format msgid "Playback device is %s\n" msgstr "Le périphérique de lecture est %s\n" -#: speaker-test/speaker-test.c:1141 +#: speaker-test/speaker-test.c:1157 #, c-format msgid "Stream parameters are %iHz, %s, %i channels\n" msgstr "Les paramètres du flux sont %iHz, %s, %i canaux\n" -#: speaker-test/speaker-test.c:1144 +#: speaker-test/speaker-test.c:1160 #, c-format msgid "Using 16 octaves of pink noise\n" -msgstr "Utilisation de 16 octaves de 'pink noise'\n" +msgstr "Utilisation de 16 octaves de bruit rose\n" -#: speaker-test/speaker-test.c:1147 +#: speaker-test/speaker-test.c:1163 #, c-format msgid "Sine wave rate is %.4fHz\n" msgstr "La fréquence de la courbe sinus est %.4fHz\n" -#: speaker-test/speaker-test.c:1150 +#: speaker-test/speaker-test.c:1166 #, c-format msgid "WAV file(s)\n" msgstr "fichier(s) WAV\n" -#: speaker-test/speaker-test.c:1160 +#: speaker-test/speaker-test.c:1176 #, c-format msgid "Playback open error: %d,%s\n" -msgstr "Erreur d'ouverture à la lecture: %d,%s\n" +msgstr "Erreur d'ouverture à la lecture : %d,%s\n" -#: speaker-test/speaker-test.c:1166 +#: speaker-test/speaker-test.c:1182 #, c-format msgid "Setting of hwparams failed: %s\n" -msgstr "Échec de la configuration des paramètres matériel: %s\n" +msgstr "Échec de la configuration des paramètres matériel : %s\n" -#: speaker-test/speaker-test.c:1170 +#: speaker-test/speaker-test.c:1186 #, c-format msgid "Setting of swparams failed: %s\n" -msgstr "Échec de la configuration des paramètres logiciel: %s\n" +msgstr "Échec de la configuration des paramètres logiciel : %s\n" -#: speaker-test/speaker-test.c:1216 speaker-test/speaker-test.c:1238 +#: speaker-test/speaker-test.c:1232 speaker-test/speaker-test.c:1254 #, c-format msgid "Transfer failed: %s\n" -msgstr "Échec du transfer: %s\n" +msgstr "Échec du transfer : %s\n" -#: speaker-test/speaker-test.c:1224 +#: speaker-test/speaker-test.c:1240 #, c-format msgid "Time per period = %lf\n" msgstr "Temps par période = %lf\n" +#, c-format +#~ msgid "service '%s' is not found in /etc/services\n" +#~ msgstr "le service '%s' n'as pas été trouvé dans /etc/services\n" + #~ msgid "Warning: format is changed to S16_LE\n" -#~ msgstr "Avertissement: le format est changé en S16_LE\n" +#~ msgstr "Avertissement : le format est changé en S16_LE\n" #~ msgid "Warning: format is changed to S24_3LE\n" -#~ msgstr "Avertissement: le format est changé en S24_3LE\n" +#~ msgstr "Avertissement : le format est changé en S24_3LE\n" #~ msgid "Warning: format is changed to S24_LE\n" -#~ msgstr "Avertissement: le format est changé en S24_LE\n" +#~ msgstr "Avertissement : le format est changé en S24_LE\n" diff -Nru alsa-utils-1.2.2/po/insert-header.sin alsa-utils-1.2.6/po/insert-header.sin --- alsa-utils-1.2.2/po/insert-header.sin 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/po/insert-header.sin 2021-12-06 11:44:41.000000000 +0000 @@ -1,5 +1,10 @@ # Sed script that inserts the file called HEADER before the header entry. # +# Copyright (C) 2001 Free Software Foundation, Inc. +# Written by Bruno Haible , 2001. +# This file is free software; the Free Software Foundation gives +# unlimited permission to use, copy, distribute, and modify it. +# # At each occurrence of a line starting with "msgid ", we execute the following # commands. At the first occurrence, insert the file. At the following # occurrences, do nothing. The distinction between the first and the following Binary files /tmp/tmp9067orz6/0nqitZVa9r/alsa-utils-1.2.2/po/ja.gmo and /tmp/tmp9067orz6/GaGL_6JOvv/alsa-utils-1.2.6/po/ja.gmo differ diff -Nru alsa-utils-1.2.2/po/ja.po alsa-utils-1.2.6/po/ja.po --- alsa-utils-1.2.2/po/ja.po 2020-02-19 12:07:36.000000000 +0000 +++ alsa-utils-1.2.6/po/ja.po 2021-12-06 11:44:59.000000000 +0000 @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: alsa-utils 1.0.9a\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-19 12:07+0000\n" +"POT-Creation-Date: 2021-12-06 11:44+0000\n" "PO-Revision-Date: 2009-05-27 15:08+0200\n" "Last-Translator: Takashi Iwai \n" "Language-Team: Japanese\n" @@ -18,32 +18,43 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: alsamixer/card_select.c:126 alsamixer/device_name.c:126 +#: alsamixer/card_select.c:77 alsamixer/device_name.c:127 msgid "Sound Card" msgstr "サウンドカード" -#: alsamixer/card_select.c:181 +#: alsamixer/card_select.c:115 msgid "(default)" msgstr "(デフォルト)" -#: alsamixer/card_select.c:191 +#: alsamixer/card_select.c:125 msgid "cannot enumerate sound cards" msgstr "サウンドカードを検出できません" -#: alsamixer/card_select.c:215 +#: alsamixer/card_select.c:151 msgid "enter device name..." msgstr "デバイス名入力..." -#: alsamixer/cli.c:40 +#: alsamixer/cli.c:43 msgid "Usage: alsamixer [options]" msgstr "使用法: alsamixer [オプション]" -#: alsamixer/cli.c:41 +#: alsamixer/cli.c:44 +#, fuzzy +#| msgid "" +#| "Useful options:\n" +#| " -h, --help this help\n" +#| " -c, --card=NUMBER sound card number or id\n" +#| " -D, --device=NAME mixer device name\n" +#| " -V, --view=MODE starting view mode: playback/capture/all" msgid "" "Useful options:\n" " -h, --help this help\n" " -c, --card=NUMBER sound card number or id\n" " -D, --device=NAME mixer device name\n" +" -m, --mouse enable mouse\n" +" -M, --no-mouse disable mouse\n" +" -f, --config=FILE configuration file\n" +" -F, --no-config do not load configuration file\n" " -V, --view=MODE starting view mode: playback/capture/all" msgstr "" "主なオプション:\n" @@ -52,7 +63,7 @@ " -D, --device=名前 ミキサーデバイス名\n" " -V, --view=表示モード 開始時の表示モード: playback/capture/all" -#: alsamixer/cli.c:46 +#: alsamixer/cli.c:53 msgid "" "Debugging options:\n" " -g, --no-color toggle using of colors\n" @@ -62,22 +73,22 @@ " -g, --no-color カラー/モノクロ表示\n" " -a, --abstraction=名前 ミキサー抽象レベル: none/basic" -#: alsamixer/cli.c:77 +#: alsamixer/cli.c:88 #, c-format msgid "invalid card index: %s\n" msgstr "不正なカード番号: %s\n" -#: alsamixer/cli.c:103 +#: alsamixer/cli.c:130 #, c-format msgid "unknown abstraction level: %s\n" msgstr "未知の抽象レベル: %s\n" -#: alsamixer/cli.c:108 +#: alsamixer/cli.c:135 #, c-format msgid "unknown option: %c\n" msgstr "未知のオプション '%c'\n" -#: alsamixer/cli.c:110 +#: alsamixer/cli.c:137 msgid "try `alsamixer --help' for more information\n" msgstr "より詳しい情報は「alsamixer --help」を実行してください\n" @@ -90,138 +101,138 @@ msgid "%s: %s\n" msgstr "" -#: alsamixer/mixer_display.c:98 +#: alsamixer/mixer_display.c:99 msgid "Card:" msgstr "カード:" -#: alsamixer/mixer_display.c:99 +#: alsamixer/mixer_display.c:100 msgid "Chip:" msgstr "チップ:" -#: alsamixer/mixer_display.c:100 +#: alsamixer/mixer_display.c:101 msgid "View:" msgstr "表示:" -#: alsamixer/mixer_display.c:101 +#: alsamixer/mixer_display.c:102 msgid "Item:" msgstr "項目:" -#: alsamixer/mixer_display.c:104 +#: alsamixer/mixer_display.c:105 msgid "F1: Help" msgstr "F1: ヘルプ" -#: alsamixer/mixer_display.c:105 +#: alsamixer/mixer_display.c:106 msgid "F2: System information" msgstr "F2: システム情報" -#: alsamixer/mixer_display.c:106 +#: alsamixer/mixer_display.c:107 msgid "F6: Select sound card" msgstr "F6: サウンドカード選択" -#: alsamixer/mixer_display.c:107 +#: alsamixer/mixer_display.c:108 msgid "Esc: Exit" msgstr "Esc: 終了" -#: alsamixer/mixer_display.c:174 +#: alsamixer/mixer_display.c:179 msgid "(unplugged)" msgstr "" -#: alsamixer/mixer_display.c:192 +#: alsamixer/mixer_display.c:197 msgid "Playback" msgstr "再生" -#: alsamixer/mixer_display.c:193 +#: alsamixer/mixer_display.c:198 msgid "Capture" msgstr "録音" -#: alsamixer/mixer_display.c:194 +#: alsamixer/mixer_display.c:199 msgid "All" msgstr "全て" -#: alsamixer/mixer_display.c:234 +#: alsamixer/mixer_display.c:240 msgid "mute" msgstr "ミュート" -#: alsamixer/mixer_display.c:275 alsamixer/mixer_display.c:285 +#: alsamixer/mixer_display.c:281 alsamixer/mixer_display.c:291 msgid "dB gain:" msgstr "dBゲイン:" -#: alsamixer/mixer_display.c:285 +#: alsamixer/mixer_display.c:291 #, c-format msgid " [%s %s, %s]" msgstr "" -#: alsamixer/mixer_display.c:294 alsamixer/mixer_display.c:300 -#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:312 +#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:306 +#: alsamixer/mixer_display.c:312 alsamixer/mixer_display.c:318 msgid "Off" msgstr "オフ" -#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:312 +#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:318 msgid "On" msgstr "オン" -#: alsamixer/mixer_display.c:363 +#: alsamixer/mixer_display.c:370 msgid "The sound device was unplugged." msgstr "デバイスが接続されていません" -#: alsamixer/mixer_display.c:364 +#: alsamixer/mixer_display.c:371 msgid "Press F6 to select another sound card." msgstr "他のカードを選択するにはF6を押して下さい" -#: alsamixer/mixer_display.c:379 +#: alsamixer/mixer_display.c:386 msgid "This sound device does not have any playback controls." msgstr "このカードには再生ミキサーがありません" -#: alsamixer/mixer_display.c:381 +#: alsamixer/mixer_display.c:388 msgid "This sound device does not have any capture controls." msgstr "このカードには録音ミキサーがありません" -#: alsamixer/mixer_display.c:383 +#: alsamixer/mixer_display.c:390 msgid "This sound device does not have any controls." msgstr "このカードには制御可能なミキサーがありません" #. TRANSLATORS: playback on; one character -#: alsamixer/mixer_display.c:516 alsamixer/mixer_display.c:521 +#: alsamixer/mixer_display.c:523 alsamixer/mixer_display.c:528 msgid "O" msgstr "" #. TRANSLATORS: playback muted; one character -#: alsamixer/mixer_display.c:518 alsamixer/mixer_display.c:522 +#: alsamixer/mixer_display.c:525 alsamixer/mixer_display.c:529 msgid "M" msgstr "" #. TRANSLATORS: "left"; no more than two characters -#: alsamixer/mixer_display.c:536 +#: alsamixer/mixer_display.c:545 msgid "L" msgstr "" #. TRANSLATORS: "right"; no more than two characters -#: alsamixer/mixer_display.c:540 +#: alsamixer/mixer_display.c:551 msgid "R" msgstr "" #. TRANSLATORS: no more than eight characters -#: alsamixer/mixer_display.c:542 +#: alsamixer/mixer_display.c:555 msgid "CAPTURE" msgstr "録音" -#: alsamixer/mixer_display.c:592 +#: alsamixer/mixer_display.c:611 msgid "Front" msgstr "フロント" -#: alsamixer/mixer_display.c:595 +#: alsamixer/mixer_display.c:614 msgid "Rear" msgstr "リア" -#: alsamixer/mixer_display.c:598 speaker-test/speaker-test.c:124 +#: alsamixer/mixer_display.c:617 speaker-test/speaker-test.c:124 msgid "Center" msgstr "センター" -#: alsamixer/mixer_display.c:601 +#: alsamixer/mixer_display.c:620 msgid "Woofer" msgstr "低音" -#: alsamixer/mixer_display.c:604 +#: alsamixer/mixer_display.c:623 msgid "Side" msgstr "サイド" @@ -354,11 +365,11 @@ msgid "Help" msgstr "ヘルプ" -#: alsamixer/proc_files.c:103 +#: alsamixer/proc_files.c:56 msgid "Select File" msgstr "ファイル選択" -#: alsamixer/textbox.c:52 alsamixer/textbox.c:66 +#: alsamixer/textbox.c:51 alsamixer/textbox.c:65 msgid "Error" msgstr "エラー" @@ -469,7 +480,7 @@ " テスト範囲: coef * (buffer_size / 2)\n" " --test-nowait リングバッファのウエイトを禁止 - 注意:高CPU負荷\n" -#: aplay/aplay.c:250 speaker-test/speaker-test.c:945 +#: aplay/aplay.c:250 speaker-test/speaker-test.c:961 #, c-format msgid "Recognized sample formats are:" msgstr "認識されるサンプルフォーマット:" @@ -551,160 +562,160 @@ msgid "value %i for channels is invalid" msgstr "不正なチャネル数 %i" -#: aplay/aplay.c:629 +#: aplay/aplay.c:630 #, c-format msgid "wrong extended format '%s'" msgstr "不正な拡張フォーマット '%s'" -#: aplay/aplay.c:637 +#: aplay/aplay.c:638 #, fuzzy, c-format msgid "invalid rate argument '%s'" msgstr "不正な送信アドレス %s\n" -#: aplay/aplay.c:644 +#: aplay/aplay.c:645 #, c-format msgid "bad speed value %i" msgstr "不正なレート値 %i" -#: aplay/aplay.c:650 +#: aplay/aplay.c:651 msgid "duration and samples arguments cannot be used together" msgstr "" -#: aplay/aplay.c:655 +#: aplay/aplay.c:656 #, fuzzy, c-format msgid "invalid duration argument '%s'" msgstr "受信アドレスが不正です: %s\n" -#: aplay/aplay.c:662 +#: aplay/aplay.c:663 msgid "samples and duration arguments cannot be used together" msgstr "" -#: aplay/aplay.c:667 +#: aplay/aplay.c:668 #, fuzzy, c-format msgid "invalid samples argument '%s'" msgstr "送信アドレスが不正です: %s\n" -#: aplay/aplay.c:679 +#: aplay/aplay.c:680 #, fuzzy, c-format msgid "invalid period time argument '%s'" msgstr "送信アドレスが不正です: %s\n" -#: aplay/aplay.c:686 +#: aplay/aplay.c:687 #, fuzzy, c-format msgid "invalid buffer time argument '%s'" msgstr "不正な送信アドレス %s\n" -#: aplay/aplay.c:693 +#: aplay/aplay.c:694 #, fuzzy, c-format msgid "invalid period size argument '%s'" msgstr "送信アドレスが不正です: %s\n" -#: aplay/aplay.c:700 +#: aplay/aplay.c:701 #, fuzzy, c-format msgid "invalid buffer size argument '%s'" msgstr "不正な送信アドレス %s\n" -#: aplay/aplay.c:707 +#: aplay/aplay.c:708 #, c-format msgid "invalid min available space argument '%s'" msgstr "" -#: aplay/aplay.c:714 +#: aplay/aplay.c:715 #, fuzzy, c-format msgid "invalid start delay argument '%s'" msgstr "送信アドレスが不正です: %s\n" -#: aplay/aplay.c:721 +#: aplay/aplay.c:722 #, fuzzy, c-format msgid "invalid stop delay argument '%s'" msgstr "送信アドレスが不正です: %s\n" -#: aplay/aplay.c:776 +#: aplay/aplay.c:777 #, fuzzy, c-format msgid "invalid test coef argument '%s'" msgstr "不正な送信アドレス %s\n" -#: aplay/aplay.c:788 +#: aplay/aplay.c:789 #, c-format msgid "invalid max file time argument '%s'" msgstr "" -#: aplay/aplay.c:808 speaker-test/speaker-test.c:571 +#: aplay/aplay.c:809 speaker-test/speaker-test.c:587 #, fuzzy, c-format msgid "Unable to parse channel map string: %s\n" msgstr "avail_min を設定できません: %s\n" -#: aplay/aplay.c:814 +#: aplay/aplay.c:815 #, c-format msgid "Try `%s --help' for more information.\n" msgstr "より詳しい情報は「%s --help」を実行してください\n" -#: aplay/aplay.c:830 +#: aplay/aplay.c:831 #, c-format msgid "audio open error: %s" msgstr "" -#: aplay/aplay.c:835 +#: aplay/aplay.c:836 #, c-format msgid "info error: %s" msgstr "" -#: aplay/aplay.c:842 +#: aplay/aplay.c:843 #, c-format msgid "nonblock setting error: %s" msgstr "" -#: aplay/aplay.c:852 aplay/aplay.c:976 aplay/aplay.c:1266 aplay/aplay.c:1466 -#: aplay/aplay.c:1989 aplay/aplay.c:2019 +#: aplay/aplay.c:861 aplay/aplay.c:985 aplay/aplay.c:1275 aplay/aplay.c:1475 +#: aplay/aplay.c:2055 aplay/aplay.c:2085 msgid "not enough memory" msgstr "メモリが足りません" -#: aplay/aplay.c:876 +#: aplay/aplay.c:885 #, fuzzy, c-format msgid "Cannot create process ID file %s: %s" msgstr "WAVファイルがオープンできません: %s\n" -#: aplay/aplay.c:966 +#: aplay/aplay.c:975 #, c-format msgid "read error (called from line %i)" msgstr "リードエラー (%i 行)" -#: aplay/aplay.c:1033 +#: aplay/aplay.c:1042 #, c-format msgid "unknown length of 'fmt ' chunk (read %u, should be %u at least)" msgstr "" -#: aplay/aplay.c:1044 +#: aplay/aplay.c:1053 #, c-format msgid "" "unknown length of extensible 'fmt ' chunk (read %u, should be %u at least)" msgstr "" -#: aplay/aplay.c:1049 +#: aplay/aplay.c:1058 msgid "wrong format tag in extensible 'fmt ' chunk" msgstr "" -#: aplay/aplay.c:1056 +#: aplay/aplay.c:1065 #, c-format msgid "can't play WAVE-file format 0x%04x which is not PCM or FLOAT encoded" msgstr "" -#: aplay/aplay.c:1061 +#: aplay/aplay.c:1070 #, c-format msgid "can't play WAVE-files with %d tracks" msgstr "%d トラックを含む WAVE ファイルは再生できません" -#: aplay/aplay.c:1069 aplay/aplay.c:1195 +#: aplay/aplay.c:1078 aplay/aplay.c:1204 #, c-format msgid "Warning: format is changed to U8\n" msgstr "警告: フォーマットは U8 に変更されます\n" -#: aplay/aplay.c:1079 aplay/aplay.c:1092 aplay/aplay.c:1103 +#: aplay/aplay.c:1088 aplay/aplay.c:1101 aplay/aplay.c:1112 #, fuzzy, c-format msgid "Warning: format is changed to %s\n" msgstr "警告: フォーマットは U8 に変更されます\n" -#: aplay/aplay.c:1108 +#: aplay/aplay.c:1117 #, c-format msgid "" " can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)" @@ -712,325 +723,353 @@ "%2$d バイト長 %1$d サンプルビット (%3$d チャネル) の WAVE ファイルは再生でき" "ません" -#: aplay/aplay.c:1131 +#: aplay/aplay.c:1140 #, c-format msgid " can't play WAVE-files with sample %d bits wide" msgstr "%d ビット長のサンプルの WAVE ファイルは再生できません" -#: aplay/aplay.c:1189 +#: aplay/aplay.c:1198 #, c-format msgid "Warning: format is changed to MU_LAW\n" msgstr "警告: フォーマットは MU_LAW に変更されます\n" -#: aplay/aplay.c:1201 +#: aplay/aplay.c:1210 #, c-format msgid "Warning: format is changed to S16_BE\n" msgstr "警告: フォーマットは S16_BE に変更されます\n" -#: aplay/aplay.c:1214 aplay/aplay.c:2304 aplay/aplay.c:2311 aplay/aplay.c:2836 +#: aplay/aplay.c:1223 aplay/aplay.c:2376 aplay/aplay.c:2383 aplay/aplay.c:2912 msgid "read error" msgstr "リードエラー" -#: aplay/aplay.c:1244 +#: aplay/aplay.c:1253 msgid "Channel numbers don't match between hw_params and channel map" msgstr "" -#: aplay/aplay.c:1253 +#: aplay/aplay.c:1262 #, c-format msgid "Warning: unable to get channel map\n" msgstr "" -#: aplay/aplay.c:1287 +#: aplay/aplay.c:1296 #, c-format -msgid "Channel %d doesn't match with hw_parmas" +msgid "Channel %d doesn't match with hw_params" msgstr "" -#: aplay/aplay.c:1314 +#: aplay/aplay.c:1323 msgid "Broken configuration for this PCM: no configurations available" msgstr "指定の PCM を使用できません: 設定がありません" -#: aplay/aplay.c:1318 +#: aplay/aplay.c:1327 #, c-format msgid "HW Params of device \"%s\":\n" msgstr "" -#: aplay/aplay.c:1338 +#: aplay/aplay.c:1347 msgid "Access type not available" msgstr "アクセスタイプが使用不可能" -#: aplay/aplay.c:1343 +#: aplay/aplay.c:1352 msgid "Sample format non available" msgstr "サンプルフォーマットが使用不可能" -#: aplay/aplay.c:1349 +#: aplay/aplay.c:1358 msgid "Channels count non available" msgstr "チャネル数が使用不可能" -#: aplay/aplay.c:1364 +#: aplay/aplay.c:1373 #, c-format msgid "Warning: rate is not accurate (requested = %iHz, got = %iHz)\n" msgstr "警告: レートが不正確です (要求値 = %iHz, 使用値 = %iHz)\n" -#: aplay/aplay.c:1370 +#: aplay/aplay.c:1379 #, c-format msgid " please, try the plug plugin %s\n" msgstr " plug プラグイン%s を使用してください\n" -#: aplay/aplay.c:1407 +#: aplay/aplay.c:1416 msgid "Unable to install hw params:" msgstr "hw params のインストールに失敗しました:" -#: aplay/aplay.c:1414 +#: aplay/aplay.c:1423 #, c-format msgid "Can't use period equal to buffer size (%lu == %lu)" msgstr "period と buffer サイズには同じ値を使用できません (%lu == %lu)" -#: aplay/aplay.c:1420 +#: aplay/aplay.c:1429 #, fuzzy +#| msgid "unable to install sw params:" msgid "Unable to get current sw params." msgstr "sw params のインストールに失敗しました:" -#: aplay/aplay.c:1449 +#: aplay/aplay.c:1458 msgid "unable to install sw params:" msgstr "sw params のインストールに失敗しました:" -#: aplay/aplay.c:1484 +#: aplay/aplay.c:1493 #, c-format msgid "snd_pcm_mmap_begin problem: %s" msgstr "" -#: aplay/aplay.c:1513 +#: aplay/aplay.c:1522 #, c-format msgid "stdin O_NONBLOCK flag setup failed\n" msgstr "" -#: aplay/aplay.c:1537 +#: aplay/aplay.c:1559 #, c-format msgid "\rPAUSE command ignored (no hw support)\n" msgstr "" -#: aplay/aplay.c:1545 +#: aplay/aplay.c:1567 #, fuzzy, c-format msgid "pause push error: %s" msgstr "ステータスエラー: %s" -#: aplay/aplay.c:1556 +#: aplay/aplay.c:1578 #, fuzzy, c-format msgid "pause release error: %s" msgstr "サスペンド: prepare エラー: %s" -#: aplay/aplay.c:1572 +#: aplay/aplay.c:1594 #, c-format msgid "" "\r=== PAUSE === " msgstr "" -#: aplay/aplay.c:1614 +#: aplay/aplay.c:1636 #, c-format msgid "status error: %s" msgstr "ステータスエラー: %s" -#: aplay/aplay.c:1619 +#: aplay/aplay.c:1641 #, c-format msgid "fatal %s: %s" msgstr "" -#: aplay/aplay.c:1620 aplay/aplay.c:1631 aplay/aplay.c:1634 aplay/aplay.c:1642 +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1656 aplay/aplay.c:1664 msgid "underrun" msgstr "アンダーラン" -#: aplay/aplay.c:1620 aplay/aplay.c:1631 aplay/aplay.c:1642 +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1664 msgid "overrun" msgstr "オーバーラン" -#: aplay/aplay.c:1630 aplay/aplay.c:1641 +#: aplay/aplay.c:1652 aplay/aplay.c:1663 #, c-format msgid "%s!!! (at least %.3f ms long)\n" msgstr "%s!!! (少なくとも %.3f ms)\n" -#: aplay/aplay.c:1646 +#: aplay/aplay.c:1668 #, c-format msgid "Status:\n" msgstr "ステータス:\n" -#: aplay/aplay.c:1650 +#: aplay/aplay.c:1672 #, c-format msgid "xrun: prepare error: %s" msgstr "" -#: aplay/aplay.c:1656 +#: aplay/aplay.c:1679 #, c-format msgid "Status(DRAINING):\n" msgstr "ステータス(DRAINING):\n" -#: aplay/aplay.c:1660 +#: aplay/aplay.c:1683 #, c-format msgid "capture stream format change? attempting recover...\n" msgstr "録音ストリームのフォーマットが変更? 修復を試みます...\n" -#: aplay/aplay.c:1662 +#: aplay/aplay.c:1685 #, c-format msgid "xrun(DRAINING): prepare error: %s" msgstr "" -#: aplay/aplay.c:1669 +#: aplay/aplay.c:1692 #, c-format msgid "Status(R/W):\n" msgstr "ステータス(R/W):\n" -#: aplay/aplay.c:1672 +#: aplay/aplay.c:1695 #, c-format msgid "read/write error, state = %s" msgstr "読み書きエラー, ステータス = %s" -#: aplay/aplay.c:1682 +#: aplay/aplay.c:1705 #, c-format msgid "Suspended. Trying resume. " msgstr "サスペンド中です。レジュームします。" -#: aplay/aplay.c:1688 +#: aplay/aplay.c:1711 #, c-format msgid "Failed. Restarting stream. " msgstr "失敗しました。ストリームを再スタートします。" -#: aplay/aplay.c:1691 +#: aplay/aplay.c:1714 #, c-format msgid "suspend: prepare error: %s" msgstr "サスペンド: prepare エラー: %s" -#: aplay/aplay.c:1696 +#: aplay/aplay.c:1719 #, c-format msgid "Done.\n" msgstr "終了\n" -#: aplay/aplay.c:1718 +#: aplay/aplay.c:1741 #, c-format msgid " !clip " msgstr "" -#: aplay/aplay.c:1865 +#: aplay/aplay.c:1893 #, c-format msgid "Unsupported bit size %d.\n" msgstr "" -#: aplay/aplay.c:1899 +#: aplay/aplay.c:1929 #, c-format msgid "Max peak (%li samples): 0x%08x " msgstr "最大ピーク (%li サンプル): 0x%08x " -#: aplay/aplay.c:1933 +#: aplay/aplay.c:1970 #, c-format msgid "" "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer = " "%li\n" msgstr "" -#: aplay/aplay.c:2061 +#: aplay/aplay.c:1979 +#, c-format +msgid "" +"Suspicious status buffer position (%li total): avail = %li, delay = %li, " +"buffer = %li\n" +msgstr "" + +#: aplay/aplay.c:1983 +#, c-format +msgid "" +"Suspicious buffer position avail > delay (%li total): avail = %li, delay = " +"%li\n" +msgstr "" + +#: aplay/aplay.c:1987 +#, c-format +msgid "" +"Suspicious status buffer position avail > delay (%li total): avail = %li, " +"delay = %li\n" +msgstr "" + +#: aplay/aplay.c:2030 +#, c-format +msgid "Status(R/W) (standalone avail=%li delay=%li):\n" +msgstr "" + +#: aplay/aplay.c:2127 #, c-format msgid "write error: %s" msgstr "書込エラー: %s" -#: aplay/aplay.c:2109 +#: aplay/aplay.c:2175 #, c-format msgid "writev error: %s" msgstr "書込(writev)エラー: %s" -#: aplay/aplay.c:2153 +#: aplay/aplay.c:2221 #, c-format msgid "read error: %s" msgstr "読込エラー: %s" -#: aplay/aplay.c:2197 +#: aplay/aplay.c:2268 #, c-format msgid "readv error: %s" msgstr "読込(readv)エラー: %s" -#: aplay/aplay.c:2245 +#: aplay/aplay.c:2317 msgid "can't allocate buffer for silence" msgstr "サイレンス用のバッファの取得に失敗しました" -#: aplay/aplay.c:2254 aplay/aplay.c:2482 aplay/aplay.c:2487 aplay/aplay.c:2537 -#: aplay/aplay.c:2546 aplay/aplay.c:2553 aplay/aplay.c:2563 aplay/aplay.c:2569 -#: aplay/aplay.c:2641 aplay/aplay.c:2671 aplay/aplay.c:2685 +#: aplay/aplay.c:2326 aplay/aplay.c:2554 aplay/aplay.c:2559 aplay/aplay.c:2611 +#: aplay/aplay.c:2620 aplay/aplay.c:2627 aplay/aplay.c:2637 aplay/aplay.c:2643 +#: aplay/aplay.c:2715 aplay/aplay.c:2745 aplay/aplay.c:2759 msgid "write error" msgstr "書込エラー" -#: aplay/aplay.c:2267 +#: aplay/aplay.c:2339 #, c-format msgid "voc_pcm_flush - silence error" msgstr "" -#: aplay/aplay.c:2270 +#: aplay/aplay.c:2342 msgid "voc_pcm_flush error" msgstr "" -#: aplay/aplay.c:2295 +#: aplay/aplay.c:2367 msgid "malloc error" msgstr "malloc エラー" -#: aplay/aplay.c:2299 +#: aplay/aplay.c:2371 #, c-format msgid "Playing Creative Labs Channel file '%s'...\n" msgstr "Creative Labs Channel ファイル '%s' を演奏中...\n" -#: aplay/aplay.c:2367 aplay/aplay.c:2462 +#: aplay/aplay.c:2439 aplay/aplay.c:2534 msgid "can't play packed .voc files" msgstr "packed .voc ファイルは演奏できません" -#: aplay/aplay.c:2422 +#: aplay/aplay.c:2494 #, c-format msgid "can't play loops; %s isn't seekable\n" msgstr "ループ演奏できません。%s はシーク不可能です\n" -#: aplay/aplay.c:2471 +#: aplay/aplay.c:2543 #, c-format msgid "unknown blocktype %d. terminate." msgstr "未知のブロックタイプ %d: 終了します。" -#: aplay/aplay.c:2605 +#: aplay/aplay.c:2679 #, c-format msgid "Wave doesn't support %s format..." msgstr "WAVE は %s フォーマットをサポートしません..." -#: aplay/aplay.c:2665 +#: aplay/aplay.c:2739 #, c-format msgid "Sparc Audio doesn't support %s format..." msgstr "Sparc オーディオは %s フォーマットをサポートしません..." -#: aplay/aplay.c:2740 +#: aplay/aplay.c:2814 msgid "Playing" msgstr "再生中" -#: aplay/aplay.c:2740 +#: aplay/aplay.c:2814 msgid "Recording" msgstr "録音中" -#: aplay/aplay.c:2744 +#: aplay/aplay.c:2818 #, c-format msgid "Rate %d Hz, " msgstr "レート %d Hz, " -#: aplay/aplay.c:2746 +#: aplay/aplay.c:2820 #, c-format msgid "Mono" msgstr "モノラル" -#: aplay/aplay.c:2748 +#: aplay/aplay.c:2822 #, c-format msgid "Stereo" msgstr "ステレオ" -#: aplay/aplay.c:2750 +#: aplay/aplay.c:2824 #, c-format msgid "Channels %i" msgstr "チャネル数 %i" -#: aplay/aplay.c:3351 +#: aplay/aplay.c:3431 #, fuzzy, c-format +#| msgid "You need to specify %d files" msgid "You need to specify %u files" msgstr "%d 個のファイルを指定してください" -#: aplay/aplay.c:3404 +#: aplay/aplay.c:3484 #, c-format msgid "You need to specify %d files" msgstr "%d 個のファイルを指定してください" @@ -1161,7 +1200,7 @@ msgid "invalid sender address %s\n" msgstr "送信アドレスが不正です: %s\n" -#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:290 +#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:303 #, c-format msgid "invalid destination address %s\n" msgstr "受信アドレスが不正です: %s\n" @@ -1186,127 +1225,144 @@ msgid "Connection failed (%s)\n" msgstr "接続に失敗 (%s)\n" -#: seq/aseqnet/aseqnet.c:164 +#: seq/aseqnet/aseqnet.c:171 #, c-format msgid "aseqnet - network client/server on ALSA sequencer\n" msgstr "aseqnet - ALSA sequencer 上のネットワーククライアント/サーバ\n" -#: seq/aseqnet/aseqnet.c:165 +#: seq/aseqnet/aseqnet.c:172 #, c-format msgid " Copyright (C) 1999 Takashi Iwai\n" msgstr "" -#: seq/aseqnet/aseqnet.c:166 +#: seq/aseqnet/aseqnet.c:173 #, c-format msgid "usage:\n" msgstr "使用法:\n" -#: seq/aseqnet/aseqnet.c:167 +#: seq/aseqnet/aseqnet.c:174 #, c-format msgid " server mode: aseqnet [-options]\n" msgstr " サーバモード: aseqnet [-オプション]\n" -#: seq/aseqnet/aseqnet.c:168 +#: seq/aseqnet/aseqnet.c:175 #, c-format msgid " client mode: aseqnet [-options] server_host\n" msgstr " クライアントモード: aseqnet [-オプション] サーバホスト\n" -#: seq/aseqnet/aseqnet.c:169 +#: seq/aseqnet/aseqnet.c:176 #, c-format msgid "options:\n" msgstr "オプション:\n" -#: seq/aseqnet/aseqnet.c:170 +#: seq/aseqnet/aseqnet.c:177 +#, c-format +msgid " -6,--ipv6 : use IPv6 TCP protocol\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:178 #, fuzzy, c-format msgid " -p,--port # : specify TCP port (digit or service name)\n" msgstr " -p,--port # : TCP ポートの指定 (数字またはサービス名)\n" -#: seq/aseqnet/aseqnet.c:171 +#: seq/aseqnet/aseqnet.c:179 #, c-format msgid " -s,--source addr : read from given addr (client:port)\n" msgstr " -s,--source addr : 指定のアドレス(クライアント:ポート)から読み込む\n" -#: seq/aseqnet/aseqnet.c:172 +#: seq/aseqnet/aseqnet.c:180 #, c-format msgid " -d,--dest addr : write to given addr (client:port)\n" msgstr " -d,--dest addr : 指定のアドレス(クライアント:ポート)に書き込む\n" -#: seq/aseqnet/aseqnet.c:173 +#: seq/aseqnet/aseqnet.c:181 +#, c-format +msgid " -n,--name value : use a specific midi process name\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:182 #, c-format msgid " -v, --verbose : print verbose messages\n" msgstr " -v,--verbose : 冗長メッセージ表示\n" -#: seq/aseqnet/aseqnet.c:174 +#: seq/aseqnet/aseqnet.c:183 #, c-format msgid " -i, --info : print certain received events\n" msgstr " -i,--info : 受信イベントを表示する\n" -#: seq/aseqnet/aseqnet.c:188 +#: seq/aseqnet/aseqnet.c:197 #, c-format msgid "can't malloc\n" msgstr "malloc できません\n" -#: seq/aseqnet/aseqnet.c:213 +#: seq/aseqnet/aseqnet.c:222 #, c-format msgid "closing files..\n" msgstr "ファイルを閉じます..\n" -#: seq/aseqnet/aseqnet.c:272 +#: seq/aseqnet/aseqnet.c:285 #, c-format msgid "sequencer opened: %d:%d\n" msgstr "" -#: seq/aseqnet/aseqnet.c:279 +#: seq/aseqnet/aseqnet.c:292 #, c-format msgid "invalid source address %s\n" msgstr "不正な送信アドレス %s\n" -#: seq/aseqnet/aseqnet.c:309 -#, c-format -msgid "service '%s' is not found in /etc/services\n" -msgstr "サービス '%s' が /etc/services に見つかりません\n" +#: seq/aseqnet/aseqnet.c:362 +#, fuzzy, c-format +#| msgid "can't get address %s\n" +msgid "can't get address\n" +msgstr "アドレス %s を取得できません\n" + +#: seq/aseqnet/aseqnet.c:376 seq/aseqnet/aseqnet.c:461 +#, fuzzy, c-format +#| msgid "Connecting To" +msgid "connecting to: %s\n" +msgstr "接続先" -#: seq/aseqnet/aseqnet.c:377 +#: seq/aseqnet/aseqnet.c:414 #, c-format msgid "too many connections!\n" msgstr "接続が多すぎます!\n" -#: seq/aseqnet/aseqnet.c:388 +#: seq/aseqnet/aseqnet.c:425 #, c-format msgid "accepted[%d]\n" msgstr "了解[%d]\n" -#: seq/aseqnet/aseqnet.c:411 +#: seq/aseqnet/aseqnet.c:447 #, c-format msgid "can't get address %s\n" msgstr "アドレス %s を取得できません\n" -#: seq/aseqnet/aseqnet.c:422 +#: seq/aseqnet/aseqnet.c:475 #, c-format msgid "ok.. connected\n" msgstr "ok.. 接続\n" -#: seq/aseqnet/aseqnet.c:518 +#: seq/aseqnet/aseqnet.c:574 #, c-format msgid "Channel %2d: Control event : %5d\n" msgstr "チャネル %2d: コントロール : %5d\n" -#: seq/aseqnet/aseqnet.c:522 +#: seq/aseqnet/aseqnet.c:578 #, c-format msgid "Channel %2d: Pitchbender : %5d\n" msgstr "チャネル %2d: ピッチベンド : %5d\n" -#: seq/aseqnet/aseqnet.c:526 +#: seq/aseqnet/aseqnet.c:582 #, c-format msgid "Channel %2d: Note On event : %5d\n" msgstr "チャネル %2d: ノートオン : %5d\n" -#: seq/aseqnet/aseqnet.c:530 +#: seq/aseqnet/aseqnet.c:586 #, c-format msgid "Channel %2d: Note Off event: %5d\n" msgstr "チャネル %2d: ノートオフ : %5d\n" -#: seq/aseqnet/aseqnet.c:585 +#: seq/aseqnet/aseqnet.c:641 #, c-format msgid "disconnected\n" msgstr "切り離し\n" @@ -1371,202 +1427,202 @@ msgid "Channel 16" msgstr "" -#: speaker-test/speaker-test.c:424 +#: speaker-test/speaker-test.c:440 #, c-format msgid "Broken configuration for playback: no configurations available: %s\n" msgstr "再生用に設定できません: 設定がみつかりません: %s\n" -#: speaker-test/speaker-test.c:431 +#: speaker-test/speaker-test.c:447 #, c-format msgid "Access type not available for playback: %s\n" msgstr "アクセスタイプが不正です: %s\n" -#: speaker-test/speaker-test.c:438 +#: speaker-test/speaker-test.c:454 #, c-format msgid "Sample format not available for playback: %s\n" msgstr "指定のサンプルフォーマットを使用できません: %s\n" -#: speaker-test/speaker-test.c:445 +#: speaker-test/speaker-test.c:461 #, c-format msgid "Channels count (%i) not available for playbacks: %s\n" msgstr "チャネル数 (%i) を使用できません: %s\n" -#: speaker-test/speaker-test.c:453 +#: speaker-test/speaker-test.c:469 #, c-format msgid "Rate %iHz not available for playback: %s\n" msgstr "レート %iHz を使用できません: %s\n" -#: speaker-test/speaker-test.c:458 +#: speaker-test/speaker-test.c:474 #, c-format msgid "Rate doesn't match (requested %iHz, get %iHz, err %d)\n" msgstr "設定レートが一致しません< (要求値 %iHz, 取得値 %iHz, エラー %d)\n" -#: speaker-test/speaker-test.c:462 +#: speaker-test/speaker-test.c:478 #, c-format msgid "Rate set to %iHz (requested %iHz)\n" msgstr "レート %iHz (要求値 %iHz)\n" -#: speaker-test/speaker-test.c:468 +#: speaker-test/speaker-test.c:484 #, c-format msgid "Buffer size range from %lu to %lu\n" msgstr "バッファサイズ範囲 %lu 〜 %lu\n" -#: speaker-test/speaker-test.c:469 +#: speaker-test/speaker-test.c:485 #, c-format msgid "Period size range from %lu to %lu\n" msgstr "ピリオドサイズ範囲 %lu 〜 %lu\n" -#: speaker-test/speaker-test.c:471 +#: speaker-test/speaker-test.c:487 #, c-format msgid "Requested period time %u us\n" msgstr "要求されたピリオド長 %u us\n" -#: speaker-test/speaker-test.c:474 +#: speaker-test/speaker-test.c:490 #, c-format msgid "Unable to set period time %u us for playback: %s\n" msgstr "ピリオド長 %u us を設定できません: %s\n" -#: speaker-test/speaker-test.c:480 +#: speaker-test/speaker-test.c:496 #, c-format msgid "Requested buffer time %u us\n" msgstr "要求されたバッファ長 %u us\n" -#: speaker-test/speaker-test.c:483 +#: speaker-test/speaker-test.c:499 #, c-format msgid "Unable to set buffer time %u us for playback: %s\n" msgstr "バッファ長 %u us を設定できません: %s\n" -#: speaker-test/speaker-test.c:492 +#: speaker-test/speaker-test.c:508 #, c-format msgid "Using max buffer size %lu\n" msgstr "最大バッファサイズ %lu を使用\n" -#: speaker-test/speaker-test.c:495 +#: speaker-test/speaker-test.c:511 #, c-format msgid "Unable to set buffer size %lu for playback: %s\n" msgstr "バッファサイズ %lu を設定できません: %s\n" -#: speaker-test/speaker-test.c:501 +#: speaker-test/speaker-test.c:517 #, c-format msgid "Periods = %u\n" msgstr "ピリオド数 = %u\n" -#: speaker-test/speaker-test.c:504 +#: speaker-test/speaker-test.c:520 #, c-format msgid "Unable to set nperiods %u for playback: %s\n" msgstr "ピリオド数 %u を設定できません: %s\n" -#: speaker-test/speaker-test.c:513 +#: speaker-test/speaker-test.c:529 #, c-format msgid "Unable to set hw params for playback: %s\n" msgstr "hw params を設定できません: %s\n" -#: speaker-test/speaker-test.c:519 +#: speaker-test/speaker-test.c:535 #, c-format msgid "was set period_size = %lu\n" msgstr "period_size = %lu で設定\n" -#: speaker-test/speaker-test.c:520 +#: speaker-test/speaker-test.c:536 #, c-format msgid "was set buffer_size = %lu\n" msgstr "buffer_size = %lu で設定\n" -#: speaker-test/speaker-test.c:522 +#: speaker-test/speaker-test.c:538 #, c-format msgid "buffer to small, could not use\n" msgstr "バッファが小さすぎます\n" -#: speaker-test/speaker-test.c:535 +#: speaker-test/speaker-test.c:551 #, c-format msgid "Unable to determine current swparams for playback: %s\n" msgstr "現在の swparams を取得できません: %s\n" -#: speaker-test/speaker-test.c:542 +#: speaker-test/speaker-test.c:558 #, c-format msgid "Unable to set start threshold mode for playback: %s\n" msgstr "start_threshold モードを設定できません: %s\n" -#: speaker-test/speaker-test.c:549 +#: speaker-test/speaker-test.c:565 #, c-format msgid "Unable to set avail min for playback: %s\n" msgstr "avail_min を設定できません: %s\n" -#: speaker-test/speaker-test.c:556 +#: speaker-test/speaker-test.c:572 #, c-format msgid "Unable to set sw params for playback: %s\n" msgstr "再生用の sw params を設定できません: %s\n" -#: speaker-test/speaker-test.c:576 +#: speaker-test/speaker-test.c:592 #, fuzzy, c-format msgid "Unable to set channel map: %s\n" msgstr "avail_min を設定できません: %s\n" -#: speaker-test/speaker-test.c:601 +#: speaker-test/speaker-test.c:617 #, c-format msgid "Can't recovery from underrun, prepare failed: %s\n" msgstr "アンダーランから復帰失敗: %s\n" -#: speaker-test/speaker-test.c:612 +#: speaker-test/speaker-test.c:628 #, c-format msgid "Can't recovery from suspend, prepare failed: %s\n" msgstr "サスペンドから復帰失敗: %s\n" -#: speaker-test/speaker-test.c:676 speaker-test/speaker-test.c:1191 +#: speaker-test/speaker-test.c:692 speaker-test/speaker-test.c:1207 #, c-format msgid "No enough memory\n" msgstr "メモリが足りません\n" -#: speaker-test/speaker-test.c:681 +#: speaker-test/speaker-test.c:697 #, c-format msgid "Cannot open WAV file %s\n" msgstr "WAVファイルがオープンできません: %s\n" -#: speaker-test/speaker-test.c:685 speaker-test/speaker-test.c:714 +#: speaker-test/speaker-test.c:701 speaker-test/speaker-test.c:730 #, c-format msgid "Invalid WAV file %s\n" msgstr "不正なWAVファイルです: %s\n" -#: speaker-test/speaker-test.c:690 +#: speaker-test/speaker-test.c:706 #, c-format msgid "Not a WAV file: %s\n" msgstr "WAVファイルではありません: %s\n" -#: speaker-test/speaker-test.c:694 +#: speaker-test/speaker-test.c:710 #, c-format msgid "Unsupported WAV format %d for %s\n" msgstr "未サポートのWAVフォーマット %d: %s\n" -#: speaker-test/speaker-test.c:699 +#: speaker-test/speaker-test.c:715 #, c-format msgid "%s is not a mono stream (%d channels)\n" msgstr "%s はモノストリームではありません (%d チャネル)\n" -#: speaker-test/speaker-test.c:704 +#: speaker-test/speaker-test.c:720 #, c-format msgid "Sample rate doesn't match (%d) for %s\n" msgstr "サンプルレートが不一致です(%d): %s\n" -#: speaker-test/speaker-test.c:709 +#: speaker-test/speaker-test.c:725 #, c-format msgid "Unsupported sample format bits %d for %s\n" msgstr "未サポートのサンプルフォーマットビット %d: %s\n" -#: speaker-test/speaker-test.c:770 +#: speaker-test/speaker-test.c:786 #, c-format msgid "Undefined channel %d\n" msgstr "未定義のチャネル %d\n" -#: speaker-test/speaker-test.c:821 +#: speaker-test/speaker-test.c:837 #, c-format msgid "Write error: %d,%s\n" msgstr "書込エラー: %d,%s\n" -#: speaker-test/speaker-test.c:823 +#: speaker-test/speaker-test.c:839 #, c-format msgid "xrun_recovery failed: %d,%s\n" msgstr "xrun_recovery 失敗: %d,%s\n" -#: speaker-test/speaker-test.c:926 +#: speaker-test/speaker-test.c:942 #, fuzzy, c-format msgid "" "Usage: speaker-test [OPTION]... \n" @@ -1608,76 +1664,80 @@ "-X,--force-frequency\t30-8000Hz範囲外許可\n" "\n" -#: speaker-test/speaker-test.c:1058 +#: speaker-test/speaker-test.c:1074 #, c-format msgid "Invalid number of periods %d\n" msgstr "不正なピリオド数 %d\n" -#: speaker-test/speaker-test.c:1074 speaker-test/speaker-test.c:1078 +#: speaker-test/speaker-test.c:1090 speaker-test/speaker-test.c:1094 #, c-format msgid "Invalid test type %s\n" msgstr "不正なテストタイプ %s\n" -#: speaker-test/speaker-test.c:1111 +#: speaker-test/speaker-test.c:1127 #, c-format msgid "Unknown option '%c'\n" msgstr "未知のオプション '%c'\n" -#: speaker-test/speaker-test.c:1125 +#: speaker-test/speaker-test.c:1141 #, c-format msgid "Invalid parameter for -s option.\n" msgstr "-s オプションの値が不正です\n" -#: speaker-test/speaker-test.c:1140 +#: speaker-test/speaker-test.c:1156 #, c-format msgid "Playback device is %s\n" msgstr "再生デバイス: %s\n" -#: speaker-test/speaker-test.c:1141 +#: speaker-test/speaker-test.c:1157 #, c-format msgid "Stream parameters are %iHz, %s, %i channels\n" msgstr "ストリームパラメータ: %iHz, %s, %i チャネル\n" -#: speaker-test/speaker-test.c:1144 +#: speaker-test/speaker-test.c:1160 #, c-format msgid "Using 16 octaves of pink noise\n" msgstr "16 オクターブのピンクノイズを使用\n" -#: speaker-test/speaker-test.c:1147 +#: speaker-test/speaker-test.c:1163 #, c-format msgid "Sine wave rate is %.4fHz\n" msgstr "正弦波レート: %.4fHz\n" -#: speaker-test/speaker-test.c:1150 +#: speaker-test/speaker-test.c:1166 #, c-format msgid "WAV file(s)\n" msgstr "WAV ファイル\n" -#: speaker-test/speaker-test.c:1160 +#: speaker-test/speaker-test.c:1176 #, c-format msgid "Playback open error: %d,%s\n" msgstr "再生オープンエラー: %d,%s\n" -#: speaker-test/speaker-test.c:1166 +#: speaker-test/speaker-test.c:1182 #, c-format msgid "Setting of hwparams failed: %s\n" msgstr "hwparams の設定に失敗: %s\n" -#: speaker-test/speaker-test.c:1170 +#: speaker-test/speaker-test.c:1186 #, c-format msgid "Setting of swparams failed: %s\n" msgstr "swparams の設定に失敗: %s\n" -#: speaker-test/speaker-test.c:1216 speaker-test/speaker-test.c:1238 +#: speaker-test/speaker-test.c:1232 speaker-test/speaker-test.c:1254 #, c-format msgid "Transfer failed: %s\n" msgstr "転送に失敗しました: %s\n" -#: speaker-test/speaker-test.c:1224 +#: speaker-test/speaker-test.c:1240 #, c-format msgid "Time per period = %lf\n" msgstr "ピリオド時間 = %lf\n" +#, c-format +#~ msgid "service '%s' is not found in /etc/services\n" +#~ msgstr "サービス '%s' が /etc/services に見つかりません\n" + #~ msgid "Warning: format is changed to S16_LE\n" #~ msgstr "警告: フォーマットは S16_LE に変更されます\n" diff -Nru alsa-utils-1.2.2/po/remove-potcdate.sin alsa-utils-1.2.6/po/remove-potcdate.sin --- alsa-utils-1.2.2/po/remove-potcdate.sin 2020-02-19 12:07:11.000000000 +0000 +++ alsa-utils-1.2.6/po/remove-potcdate.sin 2021-12-06 11:44:41.000000000 +0000 @@ -1,6 +1,12 @@ -# Sed script that remove the POT-Creation-Date line in the header entry +# Sed script that removes the POT-Creation-Date line in the header entry # from a POT file. # +# Copyright (C) 2002 Free Software Foundation, Inc. +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. This file is offered as-is, +# without any warranty. +# # The distinction between the first and the following occurrences of the # pattern is achieved by looking at the hold space. /^"POT-Creation-Date: .*"$/{ Binary files /tmp/tmp9067orz6/0nqitZVa9r/alsa-utils-1.2.2/po/sk.gmo and /tmp/tmp9067orz6/GaGL_6JOvv/alsa-utils-1.2.6/po/sk.gmo differ diff -Nru alsa-utils-1.2.2/po/sk.po alsa-utils-1.2.6/po/sk.po --- alsa-utils-1.2.2/po/sk.po 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/po/sk.po 2021-12-06 11:44:59.000000000 +0000 @@ -0,0 +1,1786 @@ +# Slovak translations for the alsa-utils package. +# Copyright (C) 2009 The ALSA Team +# This file is distributed under the same license as the alsa-utils package. +# Jose Riha , 2020. +# +msgid "" +msgstr "" +"Project-Id-Version: alsa-utils 1.0.23\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2021-12-06 11:44+0000\n" +"PO-Revision-Date: 2020-10-18 15:13+0200\n" +"Last-Translator: Jose Riha \n" +"Language-Team: Slovak\n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.4.1\n" + +#: alsamixer/card_select.c:77 alsamixer/device_name.c:127 +msgid "Sound Card" +msgstr "Zvuková karta" + +#: alsamixer/card_select.c:115 +msgid "(default)" +msgstr "(predvolená)" + +#: alsamixer/card_select.c:125 +msgid "cannot enumerate sound cards" +msgstr "Chyba počas vyčíslovania zvukových kariet" + +#: alsamixer/card_select.c:151 +msgid "enter device name..." +msgstr "zadajte názov zariadenia..." + +#: alsamixer/cli.c:43 +msgid "Usage: alsamixer [options]" +msgstr "Použitie: alsamixer [možnosti]" + +#: alsamixer/cli.c:44 +msgid "" +"Useful options:\n" +" -h, --help this help\n" +" -c, --card=NUMBER sound card number or id\n" +" -D, --device=NAME mixer device name\n" +" -m, --mouse enable mouse\n" +" -M, --no-mouse disable mouse\n" +" -f, --config=FILE configuration file\n" +" -F, --no-config do not load configuration file\n" +" -V, --view=MODE starting view mode: playback/capture/all" +msgstr "" +"Užitočné možnosti:\n" +" -h, --help tento pomocník\n" +" -c, --card=ČÍSLO číslo zvukovej karty alebo id\n" +" -D, --device=NÁZOV názov zariadenia mixéra\n" +" -m, --mouse povoliť myš\n" +" -M, --no-mouse vypnúť myš\n" +" -f, --config=SÚBOR súbor s konfiguráciou\n" +" -F, --no-config nenačítať súbor s konfiguráciou\n" +" -V, --view=REŽIM spustiť v režime zobrazenia: playback/capture/all " +"(prehrávanie/záznam/všetko)" + +#: alsamixer/cli.c:53 +msgid "" +"Debugging options:\n" +" -g, --no-color toggle using of colors\n" +" -a, --abstraction=NAME mixer abstraction level: none/basic" +msgstr "" +"Možnosti pre ladenie:\n" +" -g, --no-color bez farby\n" +" -a, --abstraction=NÁZOV úroveň abstrakcie mixéra: none/basic" + +#: alsamixer/cli.c:88 +#, c-format +msgid "invalid card index: %s\n" +msgstr "neplatné číslo karty: %s\n" + +#: alsamixer/cli.c:130 +#, c-format +msgid "unknown abstraction level: %s\n" +msgstr "neznáma úroveň abstrakcie: %s\n" + +#: alsamixer/cli.c:135 +#, c-format +msgid "unknown option: %c\n" +msgstr "neznáma voľba: %c\n" + +#: alsamixer/cli.c:137 +msgid "try `alsamixer --help' for more information\n" +msgstr "skúste `alsamixer --help' pre viac informácií\n" + +#: alsamixer/device_name.c:177 +msgid "Device name:" +msgstr "Názov zariadenia:" + +#: alsamixer/die.c:37 +#, c-format +msgid "%s: %s\n" +msgstr "%s: %s\n" + +#: alsamixer/mixer_display.c:99 +msgid "Card:" +msgstr "Karta:" + +#: alsamixer/mixer_display.c:100 +msgid "Chip:" +msgstr "Čip:" + +#: alsamixer/mixer_display.c:101 +msgid "View:" +msgstr "Pohľad:" + +#: alsamixer/mixer_display.c:102 +msgid "Item:" +msgstr "Položka:" + +#: alsamixer/mixer_display.c:105 +msgid "F1: Help" +msgstr "F1: Pomocník" + +#: alsamixer/mixer_display.c:106 +msgid "F2: System information" +msgstr "F2: Informácie o systéme" + +#: alsamixer/mixer_display.c:107 +msgid "F6: Select sound card" +msgstr "F6: Výber zvukovej karty" + +#: alsamixer/mixer_display.c:108 +msgid "Esc: Exit" +msgstr "Esc: Ukončiť" + +#: alsamixer/mixer_display.c:179 +msgid "(unplugged)" +msgstr "(odpojená)" + +#: alsamixer/mixer_display.c:197 +msgid "Playback" +msgstr "Prehrávanie" + +#: alsamixer/mixer_display.c:198 +msgid "Capture" +msgstr "Záznam" + +#: alsamixer/mixer_display.c:199 +msgid "All" +msgstr "Všetko" + +#: alsamixer/mixer_display.c:240 +msgid "mute" +msgstr "stlmiť" + +#: alsamixer/mixer_display.c:281 alsamixer/mixer_display.c:291 +msgid "dB gain:" +msgstr "dB zisk:" + +#: alsamixer/mixer_display.c:291 +#, c-format +msgid " [%s %s, %s]" +msgstr " [%s %s; %s]" + +#: alsamixer/mixer_display.c:300 alsamixer/mixer_display.c:306 +#: alsamixer/mixer_display.c:312 alsamixer/mixer_display.c:318 +msgid "Off" +msgstr "Vyp" + +#: alsamixer/mixer_display.c:306 alsamixer/mixer_display.c:318 +msgid "On" +msgstr "Zap" + +#: alsamixer/mixer_display.c:370 +msgid "The sound device was unplugged." +msgstr "Zvukové zariadenie bolo odpojené." + +#: alsamixer/mixer_display.c:371 +msgid "Press F6 to select another sound card." +msgstr "Stlačte F6 pre výber inej zvukovej karty." + +#: alsamixer/mixer_display.c:386 +msgid "This sound device does not have any playback controls." +msgstr "Toto zvukové zariadenie neposkytuje ovládacie prvky pre prehrávanie." + +#: alsamixer/mixer_display.c:388 +msgid "This sound device does not have any capture controls." +msgstr "" +"Toto zvukové zariadenie neposkytuje ovládacie prvky pre zaznamenávanie." + +#: alsamixer/mixer_display.c:390 +msgid "This sound device does not have any controls." +msgstr "Toto zvukové zariadenie neposkytuje žiadne ovládacie prvky." + +#. TRANSLATORS: playback on; one character +#: alsamixer/mixer_display.c:523 alsamixer/mixer_display.c:528 +msgid "O" +msgstr "O" + +#. TRANSLATORS: playback muted; one character +#: alsamixer/mixer_display.c:525 alsamixer/mixer_display.c:529 +msgid "M" +msgstr "M" + +#. TRANSLATORS: "left"; no more than two characters +#: alsamixer/mixer_display.c:545 +msgid "L" +msgstr "Ľ" + +#. TRANSLATORS: "right"; no more than two characters +#: alsamixer/mixer_display.c:551 +msgid "R" +msgstr "P" + +#. TRANSLATORS: no more than eight characters +#: alsamixer/mixer_display.c:555 +msgid "CAPTURE" +msgstr "ZÁZNAM" + +#: alsamixer/mixer_display.c:611 +msgid "Front" +msgstr "Predné" + +#: alsamixer/mixer_display.c:614 +msgid "Rear" +msgstr "Zadné" + +#: alsamixer/mixer_display.c:617 speaker-test/speaker-test.c:124 +msgid "Center" +msgstr "Stredné" + +#: alsamixer/mixer_display.c:620 +msgid "Woofer" +msgstr "Basy" + +#: alsamixer/mixer_display.c:623 +msgid "Side" +msgstr "Bočné" + +#: alsamixer/mixer_widget.c:91 alsamixer/mixer_widget.c:96 +msgid "cannot open mixer" +msgstr "Chyba pri otváraní mixéra" + +#: alsamixer/mixer_widget.c:102 alsamixer/mixer_widget.c:179 +msgid "cannot load mixer controls" +msgstr "Chyba pri načítavaní ovládacích prvkov mixéra" + +#: alsamixer/mixer_widget.c:169 +#, c-format +msgid "Cannot open mixer device '%s'." +msgstr "Chyba pri otváraní zariadenia mixéra '%s'." + +#: alsamixer/mixer_widget.c:190 +msgid "Esc Exit" +msgstr "Esc Ukončiť" + +#: alsamixer/mixer_widget.c:191 +msgid "F1 ? H Help" +msgstr "F1 ? H Pomocník" + +#: alsamixer/mixer_widget.c:192 +msgid "F2 / System information" +msgstr "F2 / Informácie o systéme" + +#: alsamixer/mixer_widget.c:193 +msgid "F3 Show playback controls" +msgstr "F3 Zobraziť ovládacie prvky prehrávania" + +#: alsamixer/mixer_widget.c:194 +msgid "F4 Show capture controls" +msgstr "F4 Zobraziť ovládacie prvky zaznamenávania" + +#: alsamixer/mixer_widget.c:195 +msgid "F5 Show all controls" +msgstr "F5 Zobraziť všetky ovládacie prvky" + +#: alsamixer/mixer_widget.c:196 +msgid "Tab Toggle view mode (F3/F4/F5)" +msgstr "Tab Prepnúť režim zobrazenia (F3/F4/F5)" + +#: alsamixer/mixer_widget.c:197 +msgid "F6 S Select sound card" +msgstr "F6 S Výber zvukovej karty" + +#: alsamixer/mixer_widget.c:198 +msgid "L Redraw screen" +msgstr "L Aktualizovať obrazovku" + +#: alsamixer/mixer_widget.c:200 +msgid "Left Move to the previous control" +msgstr "Doľava Prejsť na predchádzajúci ovládací prvok" + +#: alsamixer/mixer_widget.c:201 +msgid "Right Move to the next control" +msgstr "Doprava Prejsť na ďalší ovládací prvok" + +#: alsamixer/mixer_widget.c:203 +msgid "Up/Down Change volume" +msgstr "Hore/Dole Zmena hlasitosti" + +#: alsamixer/mixer_widget.c:204 +msgid "+ - Change volume" +msgstr "+ - Zmena hlasitosti" + +#: alsamixer/mixer_widget.c:205 +msgid "Page Up/Dn Change volume in big steps" +msgstr "PageUp/Down Zmeniť hlasitosť vo veľkých skokoch" + +#: alsamixer/mixer_widget.c:206 +msgid "End Set volume to 0%" +msgstr "End Nastaviť hlasitosť na 0%" + +#: alsamixer/mixer_widget.c:207 +msgid "0-9 Set volume to 0%-90%" +msgstr "0-9 Nastaviť hlasitosť na 0%-90%" + +#: alsamixer/mixer_widget.c:208 +msgid "Q W E Increase left/both/right volumes" +msgstr "Q W E Zvýšiť hlasitosť pre ľavý/oba/pravý kanál(y)" + +#. TRANSLATORS: or Y instead of Z +#: alsamixer/mixer_widget.c:210 +msgid "Z X C Decrease left/both/right volumes" +msgstr "Y X C Znížiť hlasitosť pre ľavý/oba/pravý kanál(y)" + +#: alsamixer/mixer_widget.c:211 +msgid "B Balance left and right volumes" +msgstr "B Synchronizovať hlasitosť ľavého a pravého kanála" + +#: alsamixer/mixer_widget.c:213 +msgid "M Toggle mute" +msgstr "M Prepnúť stlmenie" + +#. TRANSLATORS: or , . +#: alsamixer/mixer_widget.c:215 +msgid "< > Toggle left/right mute" +msgstr ", . Prepnúť stlmenie ľavého/pravého kanála" + +#: alsamixer/mixer_widget.c:217 +msgid "Space Toggle capture" +msgstr "Medzerník Vypnúť/zapnúť zaznamenávanie" + +#. TRANSLATORS: or Insert Delete +#: alsamixer/mixer_widget.c:219 +msgid "; ' Toggle left/right capture" +msgstr "; ' Prepnúť zaznamenávanie ľavého/pravého kanála" + +#: alsamixer/mixer_widget.c:221 +msgid "Authors:" +msgstr "Autori:" + +#: alsamixer/mixer_widget.c:222 +msgid " Tim Janik" +msgstr " Tim Janik" + +#: alsamixer/mixer_widget.c:223 +msgid " Jaroslav Kysela " +msgstr " Jaroslav Kysela " + +#: alsamixer/mixer_widget.c:224 +msgid " Clemens Ladisch " +msgstr " Clemens Ladisch " + +#: alsamixer/mixer_widget.c:226 +msgid "Help" +msgstr "Pomocník" + +#: alsamixer/proc_files.c:56 +msgid "Select File" +msgstr "Vybrať súbor" + +#: alsamixer/textbox.c:51 alsamixer/textbox.c:65 +msgid "Error" +msgstr "Chyba" + +#: alsamixer/textbox.c:80 +#, c-format +msgid "Cannot open file \"%s\"." +msgstr "Chyba pri otváraní súboru \"%s\"." + +#: aplay/aplay.c:180 +msgid "raw data" +msgstr "surové dáta" + +#: aplay/aplay.c:181 +msgid "VOC" +msgstr "VOC" + +#: aplay/aplay.c:183 +msgid "WAVE" +msgstr "WAVE" + +#: aplay/aplay.c:184 +msgid "Sparc Audio" +msgstr "Sparc-Audio" + +#: aplay/aplay.c:205 +#, c-format +msgid "" +"Usage: %s [OPTION]... [FILE]...\n" +"\n" +"-h, --help help\n" +" --version print current version\n" +"-l, --list-devices list all soundcards and digital audio devices\n" +"-L, --list-pcms list device names\n" +"-D, --device=NAME select PCM by name\n" +"-q, --quiet quiet mode\n" +"-t, --file-type TYPE file type (voc, wav, raw or au)\n" +"-c, --channels=# channels\n" +"-f, --format=FORMAT sample format (case insensitive)\n" +"-r, --rate=# sample rate\n" +"-d, --duration=# interrupt after # seconds\n" +"-s, --samples=# interrupt after # samples per channel\n" +"-M, --mmap mmap stream\n" +"-N, --nonblock nonblocking mode\n" +"-F, --period-time=# distance between interrupts is # microseconds\n" +"-B, --buffer-time=# buffer duration is # microseconds\n" +" --period-size=# distance between interrupts is # frames\n" +" --buffer-size=# buffer duration is # frames\n" +"-A, --avail-min=# min available space for wakeup is # microseconds\n" +"-R, --start-delay=# delay for automatic PCM start is # microseconds \n" +" (relative to buffer size if <= 0)\n" +"-T, --stop-delay=# delay for automatic PCM stop is # microseconds from " +"xrun\n" +"-v, --verbose show PCM structure and setup (accumulative)\n" +"-V, --vumeter=TYPE enable VU meter (TYPE: mono or stereo)\n" +"-I, --separate-channels one file for each channel\n" +"-i, --interactive allow interactive operation from stdin\n" +"-m, --chmap=ch1,ch2,.. Give the channel map to override or follow\n" +" --disable-resample disable automatic rate resample\n" +" --disable-channels disable automatic channel conversions\n" +" --disable-format disable automatic format conversions\n" +" --disable-softvol disable software volume control (softvol)\n" +" --test-position test ring buffer position\n" +" --test-coef=# test coefficient for ring buffer position (default " +"8)\n" +" expression for validation is: coef * (buffer_size / " +"2)\n" +" --test-nowait do not wait for ring buffer - eats whole CPU\n" +" --max-file-time=# start another output file when the old file has " +"recorded\n" +" for this many seconds\n" +" --process-id-file write the process ID here\n" +" --use-strftime apply the strftime facility to the output file name\n" +" --dump-hw-params dump hw_params of the device\n" +" --fatal-errors treat all errors as fatal\n" +msgstr "" +"Syntax: %s [VOĽBA]... [SÚBOR]...\n" +"\n" +"-h, --help pomocník\n" +" --version zobraziť aktuálnu verziu\n" +"-l, --list-devices vypísať zoznam všetkých zvukových kariet a " +"digitálnych zvukových zariadení na systéme\n" +"-L, --list-pcms vypísať zoznam s názvami zariadení\n" +"-D, --device=NAME vybrať zariadenie PCM podľa mena\n" +"-q, --quiet tichý režim\n" +"-t, --file-type TYPE typ súboru (voc, wav, raw alebo au)\n" +"-c, --channels=# kanály\n" +"-f, --format=FORMAT formát vzorkovania (na veľkosti znakov nezáleží)\n" +"-r, --rate=# formát vzorkovania\n" +"-d, --duration=# prerušiť po # sekundách\n" +"-s, --samples=# prerušiť po # vzorkách na kanál\n" +"-M, --mmap mmap prúd\n" +"-N, --nonblock režim bez blokovania\n" +"-F, --period-time=# vzdialenosť medzi prerušeniami je # mikrosekúnd\n" +"-B, --buffer-time=# dĺžka vyrovnávacej pamäte je # mikrosekúnd\n" +" --period-size=# vzdialenosť medzi prerušeniami je # snímkov\n" +" --buffer-size=# dĺžka vyrovnávacej pamäte je # snímkov\n" +"-A, --avail-min=# min. dostupný priestor pre prebudenie (wakeup) je # " +"mikrosekúnd\n" +"-R, --start-delay=# oneskorenie pri automatickom štarte PCM je # " +"mikrosekúnd \n" +" (relatívne k veľkosti vyrovnávacej pamäte ak <= 0)\n" +"-T, --stop-delay=# oneskorenie pri automatickom zastavení PCM je # " +"mikrosekúnd od xrun\n" +"-v, --verbose zobraziť štruktúru a nastavenie PCM (akumulatívne)\n" +"-V, --vumeter=TYPE povoliť VU meter (typ: mono alebo stereo)\n" +"-I, --separate-channels jeden súbor pre každý kanál\n" +"-i, --interactive povoliť interaktívne ovládanie cez štandardný vstup " +"(stdin)\n" +"-m, --chmap=ch1,ch2,.. nastaviť mapu kanálov, ktorá sa má použiť alebo " +"ignorovať\n" +" --disable-resample vypnúť automatickú zmenu frekvencie vzorkovania\n" +" --disable-channels vypnúť automatickú konverziu kanálov\n" +" --disable-format vypnúť automatickú konverziu formátu\n" +" --disable-softvol vypnúť softvérovú zmenu hlasitosti (softvol)\n" +" --test-position testovať pozíciu v ring bufferi\n" +" --test-coef=# testovací koeficient pre kontrolu pozície v ring " +"bufferi (predvolené 8)\n" +" vzorec pre kontrolu je: koef * (velkost_buffera / " +"2)\n" +" --test-nowait nečakať na ring buffer - zhltne celý procesorový " +"čas\n" +" --max-file-time=# začať zápis do ďalšieho súboru po tom, ako je v " +"aktuálnom súbore zaznamenaných # sekúnd\n" +" --process-id-file zapísať číslo procesu do súboru\n" +" --use-strftime formátovať názov súboru funkciou strftime\n" +" --dump-hw-params vypísať hardvérové parametre (hw_params) zariadenia\n" +" --fatal-errors všetky chyby vyhodnotiť ako závažné\n" + +#: aplay/aplay.c:250 speaker-test/speaker-test.c:961 +#, c-format +msgid "Recognized sample formats are:" +msgstr "Podporované formáty vzorkovania sú:" + +#: aplay/aplay.c:256 +#, c-format +msgid "" +"\n" +"Some of these may not be available on selected hardware\n" +msgstr "" +"\n" +"Niektoré z nich nemusia byť dostupné na vybranom hardvéri.\n" + +#: aplay/aplay.c:257 +#, c-format +msgid "The available format shortcuts are:\n" +msgstr "Dostupné skratky formátov sú:\n" + +#: aplay/aplay.c:258 +#, c-format +msgid "-f cd (16 bit little endian, 44100, stereo)\n" +msgstr "-f cd (16 bitov, Little Endian, 44100 Hz, stereo)\n" + +#: aplay/aplay.c:259 +#, c-format +msgid "-f cdr (16 bit big endian, 44100, stereo)\n" +msgstr "-f cdr (16 bitov, Big Endian, 44100 Hz, stereo)\n" + +#: aplay/aplay.c:260 +#, c-format +msgid "-f dat (16 bit little endian, 48000, stereo)\n" +msgstr "-f dat (16 bitov, Little Endian, 48000 Hz, stereo)\n" + +#: aplay/aplay.c:274 +msgid "no soundcards found..." +msgstr "neboli nájdené žiadne zvukové karty..." + +#: aplay/aplay.c:277 +#, c-format +msgid "**** List of %s Hardware Devices ****\n" +msgstr "**** Zoznam hardvérových zariadení (%s) ****\n" + +#: aplay/aplay.c:306 +#, c-format +msgid "card %i: %s [%s], device %i: %s [%s]\n" +msgstr "karta %i: %s [%s], zariadenie %i: %s [%s]\n" + +#: aplay/aplay.c:312 +#, c-format +msgid " Subdevices: %i/%i\n" +msgstr " Podriadené zariadenia: %i/%i\n" + +#: aplay/aplay.c:319 +#, c-format +msgid " Subdevice #%i: %s\n" +msgstr " Podriadené zariadenie #%i: %s\n" + +#: aplay/aplay.c:400 +#, c-format +msgid "Aborted by signal %s...\n" +msgstr "Zrušené signálom %s ...\n" + +#: aplay/aplay.c:555 +msgid "command should be named either arecord or aplay" +msgstr "príkaz by sa mal volať buď arecord alebo aplay" + +#: aplay/aplay.c:599 +#, c-format +msgid "unrecognized file format %s" +msgstr "nerozpoznaný formát súboru %s" + +#: aplay/aplay.c:606 +#, c-format +msgid "invalid channels argument '%s'" +msgstr "neplatný argument kanála '%s'" + +#: aplay/aplay.c:610 +#, c-format +msgid "value %i for channels is invalid" +msgstr "hodnota %i pre kanále je neplatná" + +#: aplay/aplay.c:630 +#, c-format +msgid "wrong extended format '%s'" +msgstr "neplatný rozšírený formát '%s'" + +#: aplay/aplay.c:638 +#, c-format +msgid "invalid rate argument '%s'" +msgstr "neplatný argument frekvencie '%s'" + +#: aplay/aplay.c:645 +#, c-format +msgid "bad speed value %i" +msgstr "nesprávna hodnota rýchlosti %i" + +#: aplay/aplay.c:651 +msgid "duration and samples arguments cannot be used together" +msgstr "argumenty pre trvanie a počet vzoriek nesmú byť použité spolu" + +#: aplay/aplay.c:656 +#, c-format +msgid "invalid duration argument '%s'" +msgstr "neplatný argument trvania '%s'" + +#: aplay/aplay.c:663 +msgid "samples and duration arguments cannot be used together" +msgstr "argumenty pre počet vzoriek a trvanie nesmú byť použité spolu" + +#: aplay/aplay.c:668 +#, c-format +msgid "invalid samples argument '%s'" +msgstr "neplatný argument vzoriek '%s'" + +#: aplay/aplay.c:680 +#, c-format +msgid "invalid period time argument '%s'" +msgstr "neplatný argument času periódy '%s'" + +#: aplay/aplay.c:687 +#, c-format +msgid "invalid buffer time argument '%s'" +msgstr "neplatný argument času vyrovnávacej pamäte '%s'" + +#: aplay/aplay.c:694 +#, c-format +msgid "invalid period size argument '%s'" +msgstr "neplatný argument veľkosti periódy '%s'" + +#: aplay/aplay.c:701 +#, c-format +msgid "invalid buffer size argument '%s'" +msgstr "neplatný argument veľkosti vyrovnávacej pamäte '%s'" + +#: aplay/aplay.c:708 +#, c-format +msgid "invalid min available space argument '%s'" +msgstr "neplatný argument min. dostupného miesta '%s'" + +#: aplay/aplay.c:715 +#, c-format +msgid "invalid start delay argument '%s'" +msgstr "neplatný argument oneskorenia pri štarte '%s'" + +#: aplay/aplay.c:722 +#, c-format +msgid "invalid stop delay argument '%s'" +msgstr "neplatný argument oneskorenia pri zastavení '%s'" + +#: aplay/aplay.c:777 +#, c-format +msgid "invalid test coef argument '%s'" +msgstr "neplatný argument testovacieho koeficienta '%s'" + +#: aplay/aplay.c:789 +#, c-format +msgid "invalid max file time argument '%s'" +msgstr "neplatný argument pre max. čas súboru '%s'" + +#: aplay/aplay.c:809 speaker-test/speaker-test.c:587 +#, c-format +msgid "Unable to parse channel map string: %s\n" +msgstr "Chyba pri dekódovaní reťazca s mapou kanálov: %s\n" + +#: aplay/aplay.c:815 +#, c-format +msgid "Try `%s --help' for more information.\n" +msgstr "Skúste `%s --help' pre ďalšie informácie.\n" + +#: aplay/aplay.c:831 +#, c-format +msgid "audio open error: %s" +msgstr "chyba pri otváraní zariadenia: %s" + +#: aplay/aplay.c:836 +#, c-format +msgid "info error: %s" +msgstr "chyba pri čítaní informácií o zariadení: %s" + +#: aplay/aplay.c:843 +#, c-format +msgid "nonblock setting error: %s" +msgstr "chyba pri nastavovaní režimu bez blokovania: %s" + +#: aplay/aplay.c:861 aplay/aplay.c:985 aplay/aplay.c:1275 aplay/aplay.c:1475 +#: aplay/aplay.c:2055 aplay/aplay.c:2085 +msgid "not enough memory" +msgstr "nedostatok pamäte" + +#: aplay/aplay.c:885 +#, c-format +msgid "Cannot create process ID file %s: %s" +msgstr "Chyba pri vytváraní súboru s ID procesu %s: %s" + +#: aplay/aplay.c:975 +#, c-format +msgid "read error (called from line %i)" +msgstr "chyba pri čítaní (volané na riadku %i)" + +#: aplay/aplay.c:1042 +#, c-format +msgid "unknown length of 'fmt ' chunk (read %u, should be %u at least)" +msgstr "neznáma dĺžka 'fmt ' bloku (prečítané %u, malo by byť aspoň %u)" + +#: aplay/aplay.c:1053 +#, c-format +msgid "" +"unknown length of extensible 'fmt ' chunk (read %u, should be %u at least)" +msgstr "" +"neznáma dĺžka rozšíreného 'fmt ' bloku (prečítané %u, malo by byť aspoň %u)" + +#: aplay/aplay.c:1058 +msgid "wrong format tag in extensible 'fmt ' chunk" +msgstr "neznámy formát značky rozšíreného 'fmt ' bloku" + +#: aplay/aplay.c:1065 +#, c-format +msgid "can't play WAVE-file format 0x%04x which is not PCM or FLOAT encoded" +msgstr "" +"nie je možné prehrať WAV súbor vo formáte 0x%04x, ktorý nie je kódovaný ako " +"PCM alebo FLOAT" + +#: aplay/aplay.c:1070 +#, c-format +msgid "can't play WAVE-files with %d tracks" +msgstr "nie je možné prehrať súbory WAV s %d stopami" + +#: aplay/aplay.c:1078 aplay/aplay.c:1204 +#, c-format +msgid "Warning: format is changed to U8\n" +msgstr "Varovanie: formát bol zmenený na U8\n" + +#: aplay/aplay.c:1088 aplay/aplay.c:1101 aplay/aplay.c:1112 +#, c-format +msgid "Warning: format is changed to %s\n" +msgstr "Varovanie: formát bol zmenený na %s\n" + +#: aplay/aplay.c:1117 +#, c-format +msgid "" +" can't play WAVE-files with sample %d bits in %d bytes wide (%d channels)" +msgstr "" +" nie je možné prehrať súbory WAV s vzorkovaním %d bitov v %d bajtoch (%d " +"kanálov)" + +#: aplay/aplay.c:1140 +#, c-format +msgid " can't play WAVE-files with sample %d bits wide" +msgstr " nie je možné prehrať súbory WAV o šírke vzorky %d bitov" + +#: aplay/aplay.c:1198 +#, c-format +msgid "Warning: format is changed to MU_LAW\n" +msgstr "Varovanie: formát bol zmenený na MU_LAW\n" + +#: aplay/aplay.c:1210 +#, c-format +msgid "Warning: format is changed to S16_BE\n" +msgstr "Varovanie: formát bol zmenený na S16_BE\n" + +#: aplay/aplay.c:1223 aplay/aplay.c:2376 aplay/aplay.c:2383 aplay/aplay.c:2912 +msgid "read error" +msgstr "chyba pri čítaní" + +#: aplay/aplay.c:1253 +msgid "Channel numbers don't match between hw_params and channel map" +msgstr "Počet kanálov medzi hw_params a mapou kanálov nesedí" + +#: aplay/aplay.c:1262 +#, c-format +msgid "Warning: unable to get channel map\n" +msgstr "Varovanie: nie je možné získať mapu kanálov\n" + +#: aplay/aplay.c:1296 +#, c-format +msgid "Channel %d doesn't match with hw_params" +msgstr "Kanál %d nesedí s hardvérovými parametrami (hw_params)" + +#: aplay/aplay.c:1323 +msgid "Broken configuration for this PCM: no configurations available" +msgstr "" +"Neplatná konfigurácia pre toto zariadenie PCM: žiadne dostupné konfigurácie" + +#: aplay/aplay.c:1327 +#, c-format +msgid "HW Params of device \"%s\":\n" +msgstr "HW parametre zariadenia \"%s\":\n" + +#: aplay/aplay.c:1347 +msgid "Access type not available" +msgstr "Typ prístupu nie je dostupný" + +#: aplay/aplay.c:1352 +msgid "Sample format non available" +msgstr "Formát vzorkovania nie je dostupný" + +#: aplay/aplay.c:1358 +msgid "Channels count non available" +msgstr "Počet kanálov nie je dostupný" + +#: aplay/aplay.c:1373 +#, c-format +msgid "Warning: rate is not accurate (requested = %iHz, got = %iHz)\n" +msgstr "" +"Varovanie: frekvencia je nepresná (vyžiadané: %i Hz, obdržané: %i Hz)\n" + +#: aplay/aplay.c:1379 +#, c-format +msgid " please, try the plug plugin %s\n" +msgstr " vyskúšajte, prosím, doplnok plug: %s\n" + +#: aplay/aplay.c:1416 +msgid "Unable to install hw params:" +msgstr "Chyba pri nastavovaní hw parametrov:" + +#: aplay/aplay.c:1423 +#, c-format +msgid "Can't use period equal to buffer size (%lu == %lu)" +msgstr "" +"Nie je možné použiť periódu rovnakú ako veľkosť vyrovnávacej pamäte (%lu == " +"%lu)" + +#: aplay/aplay.c:1429 +msgid "Unable to get current sw params." +msgstr "chyba pri nastavovaní softvérových parametrov:" + +#: aplay/aplay.c:1458 +msgid "unable to install sw params:" +msgstr "chyba pri nastavovaní sw parametrov:" + +#: aplay/aplay.c:1493 +#, c-format +msgid "snd_pcm_mmap_begin problem: %s" +msgstr "problém s snd_pcm_mmap_begin: %s" + +#: aplay/aplay.c:1522 +#, c-format +msgid "stdin O_NONBLOCK flag setup failed\n" +msgstr "chyba pri nastavovaní príznaku O_NONBLOCK\n" + +#: aplay/aplay.c:1559 +#, c-format +msgid "\rPAUSE command ignored (no hw support)\n" +msgstr "\rpríkaz PAUSE ignorovaný (chýba podpora v hardvéri)\n" + +#: aplay/aplay.c:1567 +#, c-format +msgid "pause push error: %s" +msgstr "chyba pri pozastavení: %s" + +#: aplay/aplay.c:1578 +#, c-format +msgid "pause release error: %s" +msgstr "chyba pri ukončovaní pozastavenia: %s" + +#: aplay/aplay.c:1594 +#, c-format +msgid "" +"\r=== PAUSE === " +msgstr "" +"\r=== PAUZA === " + +#: aplay/aplay.c:1636 +#, c-format +msgid "status error: %s" +msgstr "chyba stavu: %s" + +#: aplay/aplay.c:1641 +#, c-format +msgid "fatal %s: %s" +msgstr "fatálna %s: %s" + +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1656 aplay/aplay.c:1664 +msgid "underrun" +msgstr "podtečenie" + +#: aplay/aplay.c:1642 aplay/aplay.c:1653 aplay/aplay.c:1664 +msgid "overrun" +msgstr "pretečenie" + +#: aplay/aplay.c:1652 aplay/aplay.c:1663 +#, c-format +msgid "%s!!! (at least %.3f ms long)\n" +msgstr "%s!!! (o dĺžke aspoň %.3f ms)\n" + +#: aplay/aplay.c:1668 +#, c-format +msgid "Status:\n" +msgstr "Stav:\n" + +#: aplay/aplay.c:1672 +#, c-format +msgid "xrun: prepare error: %s" +msgstr "xrun: chyba pri inicializácii: %s" + +#: aplay/aplay.c:1679 +#, c-format +msgid "Status(DRAINING):\n" +msgstr "Stav (VYČERPANIE):\n" + +#: aplay/aplay.c:1683 +#, c-format +msgid "capture stream format change? attempting recover...\n" +msgstr "zmena formátu prúdu zaznamenávaných dát? pokúšam sa zotaviť...\n" + +#: aplay/aplay.c:1685 +#, c-format +msgid "xrun(DRAINING): prepare error: %s" +msgstr "xrun (VYČERPANIE): chyba počas inicializácie: %s" + +#: aplay/aplay.c:1692 +#, c-format +msgid "Status(R/W):\n" +msgstr "Stav (R/W):\n" + +#: aplay/aplay.c:1695 +#, c-format +msgid "read/write error, state = %s" +msgstr "chyba čítania/zápisu, stav = %s" + +#: aplay/aplay.c:1705 +#, c-format +msgid "Suspended. Trying resume. " +msgstr "Pozastavené. Pokúšam sa prebudiť. " + +#: aplay/aplay.c:1711 +#, c-format +msgid "Failed. Restarting stream. " +msgstr "Zlyhalo. Reštartujem stream. " + +#: aplay/aplay.c:1714 +#, c-format +msgid "suspend: prepare error: %s" +msgstr "Pozastavenie: chyba pri inicializácií: %s" + +#: aplay/aplay.c:1719 +#, c-format +msgid "Done.\n" +msgstr "Hotovo.\n" + +#: aplay/aplay.c:1741 +#, c-format +msgid " !clip " +msgstr " !orezanie " + +#: aplay/aplay.c:1893 +#, c-format +msgid "Unsupported bit size %d.\n" +msgstr "Nepodporovaná bitová dĺžka %d.\n" + +#: aplay/aplay.c:1929 +#, c-format +msgid "Max peak (%li samples): 0x%08x " +msgstr "Max. hodnota (%li vzoriek): 0x%08x " + +#: aplay/aplay.c:1970 +#, c-format +msgid "" +"Suspicious buffer position (%li total): avail = %li, delay = %li, buffer = " +"%li\n" +msgstr "" +"Podozrivá pozícia vyrovnávacej pämate (celkom %li): dostupné = %li, " +"oneskorenie = %li, vyr. pamäť = %li\n" + +#: aplay/aplay.c:1979 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious status buffer position (%li total): avail = %li, delay = %li, " +"buffer = %li\n" +msgstr "" +"Podozrivá pozícia vyrovnávacej pämate (celkom %li): dostupné = %li, " +"oneskorenie = %li, vyr. pamäť = %li\n" + +#: aplay/aplay.c:1983 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious buffer position avail > delay (%li total): avail = %li, delay = " +"%li\n" +msgstr "" +"Podozrivá pozícia vyrovnávacej pämate (celkom %li): dostupné = %li, " +"oneskorenie = %li, vyr. pamäť = %li\n" + +#: aplay/aplay.c:1987 +#, fuzzy, c-format +#| msgid "" +#| "Suspicious buffer position (%li total): avail = %li, delay = %li, buffer " +#| "= %li\n" +msgid "" +"Suspicious status buffer position avail > delay (%li total): avail = %li, " +"delay = %li\n" +msgstr "" +"Podozrivá pozícia vyrovnávacej pämate (celkom %li): dostupné = %li, " +"oneskorenie = %li, vyr. pamäť = %li\n" + +#: aplay/aplay.c:2030 +#, c-format +msgid "Status(R/W) (standalone avail=%li delay=%li):\n" +msgstr "" + +#: aplay/aplay.c:2127 +#, c-format +msgid "write error: %s" +msgstr "Chyba pri zápise: %s" + +#: aplay/aplay.c:2175 +#, c-format +msgid "writev error: %s" +msgstr "Chyba pri zápise vektora: %s" + +#: aplay/aplay.c:2221 +#, c-format +msgid "read error: %s" +msgstr "Chyba pri čítaní: %s" + +#: aplay/aplay.c:2268 +#, c-format +msgid "readv error: %s" +msgstr "Chyba pri čítaní vektora: %s" + +#: aplay/aplay.c:2317 +msgid "can't allocate buffer for silence" +msgstr "Nepodarilo sa alokovať vyrovnávaciu pamäť pre ticho" + +#: aplay/aplay.c:2326 aplay/aplay.c:2554 aplay/aplay.c:2559 aplay/aplay.c:2611 +#: aplay/aplay.c:2620 aplay/aplay.c:2627 aplay/aplay.c:2637 aplay/aplay.c:2643 +#: aplay/aplay.c:2715 aplay/aplay.c:2745 aplay/aplay.c:2759 +msgid "write error" +msgstr "Chyba pri zápise" + +#: aplay/aplay.c:2339 +#, c-format +msgid "voc_pcm_flush - silence error" +msgstr "voc_pcm_flush - chyba pri nastavovaní ticha" + +#: aplay/aplay.c:2342 +msgid "voc_pcm_flush error" +msgstr "chyba voc_pcm_flush" + +#: aplay/aplay.c:2367 +msgid "malloc error" +msgstr "chyba malloc" + +#: aplay/aplay.c:2371 +#, c-format +msgid "Playing Creative Labs Channel file '%s'...\n" +msgstr "Prehrávam súbor Creative Labs Channel '%s'...\n" + +#: aplay/aplay.c:2439 aplay/aplay.c:2534 +msgid "can't play packed .voc files" +msgstr "Nie je možné prehrať komprimované súbory .voc" + +#: aplay/aplay.c:2494 +#, c-format +msgid "can't play loops; %s isn't seekable\n" +msgstr "Nedokážem prehrať slučku; v %s nie je možné skákať\n" + +#: aplay/aplay.c:2543 +#, c-format +msgid "unknown blocktype %d. terminate." +msgstr "Neznámy typ bloku %d. Končím." + +#: aplay/aplay.c:2679 +#, c-format +msgid "Wave doesn't support %s format..." +msgstr "Wave nepodporuje formát %s..." + +#: aplay/aplay.c:2739 +#, c-format +msgid "Sparc Audio doesn't support %s format..." +msgstr "Sparc audio nepodporuje formát %s..." + +#: aplay/aplay.c:2814 +msgid "Playing" +msgstr "Prehrávam" + +#: aplay/aplay.c:2814 +msgid "Recording" +msgstr "Nahrávam" + +#: aplay/aplay.c:2818 +#, c-format +msgid "Rate %d Hz, " +msgstr "Frekvencia: %d Hz, " + +#: aplay/aplay.c:2820 +#, c-format +msgid "Mono" +msgstr "Mono" + +#: aplay/aplay.c:2822 +#, c-format +msgid "Stereo" +msgstr "Stereo" + +#: aplay/aplay.c:2824 +#, c-format +msgid "Channels %i" +msgstr "%i Kanály" + +#: aplay/aplay.c:3431 +#, c-format +msgid "You need to specify %u files" +msgstr "Musíte zadať %u súborov" + +#: aplay/aplay.c:3484 +#, c-format +msgid "You need to specify %d files" +msgstr "Musíte zadať %d súborov." + +#: seq/aconnect/aconnect.c:49 +#, c-format +msgid "aconnect - ALSA sequencer connection manager\n" +msgstr "aconnect - Správca spojení pre ALSA sekvencér\n" + +#: seq/aconnect/aconnect.c:50 +#, c-format +msgid "Copyright (C) 1999-2000 Takashi Iwai\n" +msgstr "Autorské práva © 1999-2000 Takashi Iwai\n" + +#: seq/aconnect/aconnect.c:51 +#, c-format +msgid "Usage:\n" +msgstr "Syntax:\n" + +#: seq/aconnect/aconnect.c:52 +#, c-format +msgid " * Connection/disconnection between two ports\n" +msgstr " * Vytvorenie/zrušenie spojenia dvoch prípojok (portov)\n" + +#: seq/aconnect/aconnect.c:53 +#, c-format +msgid " aconnect [-options] sender receiver\n" +msgstr " aconnect [-možnosti] odosielateľ prijímateľ\n" + +#: seq/aconnect/aconnect.c:54 +#, c-format +msgid " sender, receiver = client:port pair\n" +msgstr " odosielateľ, prijímateľ = pár klient:port\n" + +#: seq/aconnect/aconnect.c:55 +#, c-format +msgid " -d,--disconnect disconnect\n" +msgstr " -d,--disconnect zrušiť spojenie\n" + +#: seq/aconnect/aconnect.c:56 +#, c-format +msgid " -e,--exclusive exclusive connection\n" +msgstr " -e,--exclusive výhradné spojenie\n" + +#: seq/aconnect/aconnect.c:57 +#, c-format +msgid " -r,--real # convert real-time-stamp on queue\n" +msgstr " -r,--real # konvertovať príznak reálneho času zdroja\n" + +#: seq/aconnect/aconnect.c:58 +#, c-format +msgid " -t,--tick # convert tick-time-stamp on queue\n" +msgstr " -t,--tick # konvertovať príznak tiknutia času zdroja\n" + +#: seq/aconnect/aconnect.c:59 +#, c-format +msgid " * List connected ports (no subscription action)\n" +msgstr " * Zobraziť pripojené prípojky (porty), bez vytvárania spojení\n" + +#: seq/aconnect/aconnect.c:60 +#, c-format +msgid " aconnect -i|-o [-options]\n" +msgstr " aconnect -i|-o [-možnosti]\n" + +#: seq/aconnect/aconnect.c:61 +#, c-format +msgid " -i,--input list input (readable) ports\n" +msgstr "" +" -i,--input zobraziť vstupné (čitateľné) prípojky (porty)\n" + +#: seq/aconnect/aconnect.c:62 +#, c-format +msgid " -o,--output list output (writable) ports\n" +msgstr "" +" -o,--output zobraziť výstupné (zapisovateľné) prípojky (porty)\n" + +#: seq/aconnect/aconnect.c:63 +#, c-format +msgid " -l,--list list current connections of each port\n" +msgstr "" +" -l,--list zobraziť aktuálne spojenia pri každej prípojke " +"(porte)\n" + +#: seq/aconnect/aconnect.c:64 +#, c-format +msgid " * Remove all exported connections\n" +msgstr " * Odstrániť všetky exportované spojenia\n" + +#: seq/aconnect/aconnect.c:65 +#, c-format +msgid " -x, --removeall\n" +msgstr " -x,--removeall\n" + +#: seq/aconnect/aconnect.c:132 +msgid "Connecting To" +msgstr "Pripájam k" + +#: seq/aconnect/aconnect.c:133 +msgid "Connected From" +msgstr "Pripojené z" + +#: seq/aconnect/aconnect.c:171 +#, c-format +msgid "client %d: '%s' [type=%s" +msgstr "klient %d: '%s' [typ=%s" + +#: seq/aconnect/aconnect.c:175 +msgid "user" +msgstr "Používateľ" + +#: seq/aconnect/aconnect.c:175 +msgid "kernel" +msgstr "Jadro" + +#: seq/aconnect/aconnect.c:323 +#, c-format +msgid "can't open sequencer\n" +msgstr "Chyba pri otváraní sekvencéra\n" + +#: seq/aconnect/aconnect.c:351 +#, c-format +msgid "can't get client id\n" +msgstr "Chyba pri čítaní id klienta\n" + +#: seq/aconnect/aconnect.c:358 +#, c-format +msgid "can't set client info\n" +msgstr "Chyba pri nastavovaní informácií o klientovi\n" + +#: seq/aconnect/aconnect.c:365 +#, c-format +msgid "invalid sender address %s\n" +msgstr "Neplatná adresa odosielateľa %s\n" + +#: seq/aconnect/aconnect.c:370 seq/aseqnet/aseqnet.c:303 +#, c-format +msgid "invalid destination address %s\n" +msgstr "Neplatná adresa cieľa %s\n" + +#: seq/aconnect/aconnect.c:384 +#, c-format +msgid "No subscription is found\n" +msgstr "Spojenie sa nenašlo\n" + +#: seq/aconnect/aconnect.c:389 +#, c-format +msgid "Disconnection failed (%s)\n" +msgstr "Chyba pri rušení spojenia (%s)\n" + +#: seq/aconnect/aconnect.c:395 +#, c-format +msgid "Connection is already subscribed\n" +msgstr "Spojenie je už zaregistrované\n" + +#: seq/aconnect/aconnect.c:400 +#, c-format +msgid "Connection failed (%s)\n" +msgstr "Chyba spojenia (%s)\n" + +#: seq/aseqnet/aseqnet.c:171 +#, c-format +msgid "aseqnet - network client/server on ALSA sequencer\n" +msgstr "aseqnet - sieťový klient/server pre ALSA sekvencér\n" + +#: seq/aseqnet/aseqnet.c:172 +#, c-format +msgid " Copyright (C) 1999 Takashi Iwai\n" +msgstr " Autorské práva © 1999 Takashi Iwai\n" + +#: seq/aseqnet/aseqnet.c:173 +#, c-format +msgid "usage:\n" +msgstr "Syntax:\n" + +#: seq/aseqnet/aseqnet.c:174 +#, c-format +msgid " server mode: aseqnet [-options]\n" +msgstr " Server-Modus: aseqnet [Optionen]\n" + +#: seq/aseqnet/aseqnet.c:175 +#, c-format +msgid " client mode: aseqnet [-options] server_host\n" +msgstr " Client-Modus: aseqnet [Optionen] ServerHost\n" + +#: seq/aseqnet/aseqnet.c:176 +#, c-format +msgid "options:\n" +msgstr "Možnosti:\n" + +#: seq/aseqnet/aseqnet.c:177 +#, c-format +msgid " -6,--ipv6 : use IPv6 TCP protocol\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:178 +#, c-format +msgid " -p,--port # : specify TCP port (digit or service name)\n" +msgstr " -p,--port # : port TCP (číslo alebo meno služby)\n" + +#: seq/aseqnet/aseqnet.c:179 +#, c-format +msgid " -s,--source addr : read from given addr (client:port)\n" +msgstr " -s,--source # : čítať z adresy (klient:port)\n" + +#: seq/aseqnet/aseqnet.c:180 +#, c-format +msgid " -d,--dest addr : write to given addr (client:port)\n" +msgstr " -d,--dest # : zapísať na adresu (klient:port)\n" + +#: seq/aseqnet/aseqnet.c:181 +#, c-format +msgid " -n,--name value : use a specific midi process name\n" +msgstr "" + +#: seq/aseqnet/aseqnet.c:182 +#, c-format +msgid " -v, --verbose : print verbose messages\n" +msgstr " -v,--verbose : zobraziť podrobnejšie hlásenia\n" + +#: seq/aseqnet/aseqnet.c:183 +#, c-format +msgid " -i, --info : print certain received events\n" +msgstr " -i,--info : zobraziť určité udalosti príjmu\n" + +#: seq/aseqnet/aseqnet.c:197 +#, c-format +msgid "can't malloc\n" +msgstr "chyba pri malloc\n" + +#: seq/aseqnet/aseqnet.c:222 +#, c-format +msgid "closing files..\n" +msgstr "zatváram súbory ...\n" + +#: seq/aseqnet/aseqnet.c:285 +#, c-format +msgid "sequencer opened: %d:%d\n" +msgstr "sekvencér otvorený: %d:%d\n" + +#: seq/aseqnet/aseqnet.c:292 +#, c-format +msgid "invalid source address %s\n" +msgstr "neplatná zdrojová adresa %s\n" + +#: seq/aseqnet/aseqnet.c:362 +#, fuzzy, c-format +#| msgid "can't get address %s\n" +msgid "can't get address\n" +msgstr "nepodarilo sa získať adresu %s\n" + +#: seq/aseqnet/aseqnet.c:376 seq/aseqnet/aseqnet.c:461 +#, fuzzy, c-format +#| msgid "Connecting To" +msgid "connecting to: %s\n" +msgstr "Pripájam k" + +#: seq/aseqnet/aseqnet.c:414 +#, c-format +msgid "too many connections!\n" +msgstr "Príliš veľa spojení!\n" + +#: seq/aseqnet/aseqnet.c:425 +#, c-format +msgid "accepted[%d]\n" +msgstr "prijaté[%d]\n" + +#: seq/aseqnet/aseqnet.c:447 +#, c-format +msgid "can't get address %s\n" +msgstr "nepodarilo sa získať adresu %s\n" + +#: seq/aseqnet/aseqnet.c:475 +#, c-format +msgid "ok.. connected\n" +msgstr "OK ... pripojené\n" + +#: seq/aseqnet/aseqnet.c:574 +#, c-format +msgid "Channel %2d: Control event : %5d\n" +msgstr "Kanál %2d: udalosť ovládania: %5d\n" + +#: seq/aseqnet/aseqnet.c:578 +#, c-format +msgid "Channel %2d: Pitchbender : %5d\n" +msgstr "Kanál %2d: Pitchbender : %5d\n" + +#: seq/aseqnet/aseqnet.c:582 +#, c-format +msgid "Channel %2d: Note On event : %5d\n" +msgstr "Kanál %2d: Udalosť aktivovanej noty : %5d\n" + +#: seq/aseqnet/aseqnet.c:586 +#, c-format +msgid "Channel %2d: Note Off event: %5d\n" +msgstr "Kanál %2d: Udalosť deaktivovanej noty: %5d\n" + +#: seq/aseqnet/aseqnet.c:641 +#, c-format +msgid "disconnected\n" +msgstr "Spojenie zrušené\n" + +#: speaker-test/speaker-test.c:120 +msgid "Front Left" +msgstr "Predný ľavý" + +#: speaker-test/speaker-test.c:121 +msgid "Front Right" +msgstr "Predný pravý" + +#: speaker-test/speaker-test.c:122 +msgid "Rear Left" +msgstr "Zadný ľavý" + +#: speaker-test/speaker-test.c:123 +msgid "Rear Right" +msgstr "Zadný pravý" + +#: speaker-test/speaker-test.c:125 +msgid "LFE" +msgstr "Subwoofer" + +#: speaker-test/speaker-test.c:126 +msgid "Side Left" +msgstr "Stredový ľavý" + +#: speaker-test/speaker-test.c:127 +msgid "Side Right" +msgstr "Stredový pravý" + +#: speaker-test/speaker-test.c:128 +msgid "Channel 9" +msgstr "Kanál 9" + +#: speaker-test/speaker-test.c:129 +msgid "Channel 10" +msgstr "Kanál 10" + +#: speaker-test/speaker-test.c:130 +msgid "Channel 11" +msgstr "Kanál 11" + +#: speaker-test/speaker-test.c:131 +msgid "Channel 12" +msgstr "Kanál 12" + +#: speaker-test/speaker-test.c:132 +msgid "Channel 13" +msgstr "Kanál 13" + +#: speaker-test/speaker-test.c:133 +msgid "Channel 14" +msgstr "Kanál 14" + +#: speaker-test/speaker-test.c:134 +msgid "Channel 15" +msgstr "Kanál 15" + +#: speaker-test/speaker-test.c:135 +msgid "Channel 16" +msgstr "Kanál 16" + +#: speaker-test/speaker-test.c:440 +#, c-format +msgid "Broken configuration for playback: no configurations available: %s\n" +msgstr "Neplatná konfigurácia prehrávania: žiadne dostupné konfigurácie: %s\n" + +#: speaker-test/speaker-test.c:447 +#, c-format +msgid "Access type not available for playback: %s\n" +msgstr "Typ prístupu nie je dostupný pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:454 +#, c-format +msgid "Sample format not available for playback: %s\n" +msgstr "Formát vzorkovania nie je dostupný pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:461 +#, c-format +msgid "Channels count (%i) not available for playbacks: %s\n" +msgstr "Počet kanálov (%i) nie je dostupný pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:469 +#, c-format +msgid "Rate %iHz not available for playback: %s\n" +msgstr "Frekvencia %i Hz nie je dostupná pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:474 +#, c-format +msgid "Rate doesn't match (requested %iHz, get %iHz, err %d)\n" +msgstr "Frekvencia nesedí (vyžiadané: %i Hz, obdržané: %i Hz, kód chyby %d)\n" + +#: speaker-test/speaker-test.c:478 +#, c-format +msgid "Rate set to %iHz (requested %iHz)\n" +msgstr "Frekvencia nastavená na %i Hz (vyžiadané: %i Hz)\n" + +#: speaker-test/speaker-test.c:484 +#, c-format +msgid "Buffer size range from %lu to %lu\n" +msgstr "Veľkosť vyrovnávacej pamäte v rozmedzí od %lu do %lu\n" + +#: speaker-test/speaker-test.c:485 +#, c-format +msgid "Period size range from %lu to %lu\n" +msgstr "Veľkosť periódy v rozmedzí od %lu do %lu\n" + +#: speaker-test/speaker-test.c:487 +#, c-format +msgid "Requested period time %u us\n" +msgstr "Vyžiadaný čas periódy %u µs\n" + +#: speaker-test/speaker-test.c:490 +#, c-format +msgid "Unable to set period time %u us for playback: %s\n" +msgstr "Chyba pri nastavovaní času periódy %u µs pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:496 +#, c-format +msgid "Requested buffer time %u us\n" +msgstr "Vyžiadaný čas vyrovnávacej pamäte %u µs\n" + +#: speaker-test/speaker-test.c:499 +#, c-format +msgid "Unable to set buffer time %u us for playback: %s\n" +msgstr "" +"Chyba pri nastavovaní času vyrovnávacej pamäte %u µs pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:508 +#, c-format +msgid "Using max buffer size %lu\n" +msgstr "Používam max. veľkosť vyrovnávacej pamäte %lu\n" + +#: speaker-test/speaker-test.c:511 +#, c-format +msgid "Unable to set buffer size %lu for playback: %s\n" +msgstr "" +"Chyba pri nastavovaní veľkosti vyrovnávacej pamäte %lu pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:517 +#, c-format +msgid "Periods = %u\n" +msgstr "Periódy = %u\n" + +#: speaker-test/speaker-test.c:520 +#, c-format +msgid "Unable to set nperiods %u for playback: %s\n" +msgstr "Chyba pri nastavovaní počtu periód %u pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:529 +#, c-format +msgid "Unable to set hw params for playback: %s\n" +msgstr "Chyba pri nastavovaní hw parametrov pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:535 +#, c-format +msgid "was set period_size = %lu\n" +msgstr "nastavené: period_size = %lu\n" + +#: speaker-test/speaker-test.c:536 +#, c-format +msgid "was set buffer_size = %lu\n" +msgstr "nastavené: buffer_size = %lu\n" + +#: speaker-test/speaker-test.c:538 +#, c-format +msgid "buffer to small, could not use\n" +msgstr "vyrovnávacia pamäť príliš malá, nedá sa použiť\n" + +#: speaker-test/speaker-test.c:551 +#, c-format +msgid "Unable to determine current swparams for playback: %s\n" +msgstr "Chyba pri zisťovaní softvérových parametrov pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:558 +#, c-format +msgid "Unable to set start threshold mode for playback: %s\n" +msgstr "Chyba pri nastavovaní začiatku prahového režimu pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:565 +#, c-format +msgid "Unable to set avail min for playback: %s\n" +msgstr "Chyba pri nastavovaní dostupného minima pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:572 +#, c-format +msgid "Unable to set sw params for playback: %s\n" +msgstr "Chyba pri nastavovaní softvérových parametrov pre prehrávanie: %s\n" + +#: speaker-test/speaker-test.c:592 +#, c-format +msgid "Unable to set channel map: %s\n" +msgstr "Chyba pri zostavovaní mapy kanálov: %s\n" + +#: speaker-test/speaker-test.c:617 +#, c-format +msgid "Can't recovery from underrun, prepare failed: %s\n" +msgstr "" +"Nepodarilo sa zotaviť z podtečenia (underrun), chyba pri inicializácii: %s\n" + +#: speaker-test/speaker-test.c:628 +#, c-format +msgid "Can't recovery from suspend, prepare failed: %s\n" +msgstr "Nepodarilo sa zotaviť z pozastavenia, chyba pri inicializácii: %s\n" + +#: speaker-test/speaker-test.c:692 speaker-test/speaker-test.c:1207 +#, c-format +msgid "No enough memory\n" +msgstr "Nedostatok pamäte\n" + +#: speaker-test/speaker-test.c:697 +#, c-format +msgid "Cannot open WAV file %s\n" +msgstr "Nepodarilo sa otvoriť súbor WAV %s\n" + +#: speaker-test/speaker-test.c:701 speaker-test/speaker-test.c:730 +#, c-format +msgid "Invalid WAV file %s\n" +msgstr "Neplatný súbor WAV %s\n" + +#: speaker-test/speaker-test.c:706 +#, c-format +msgid "Not a WAV file: %s\n" +msgstr "Toto nie je súbor WAV: %s\n" + +#: speaker-test/speaker-test.c:710 +#, c-format +msgid "Unsupported WAV format %d for %s\n" +msgstr "Neplatný formát WAV súboru %d v %s\n" + +#: speaker-test/speaker-test.c:715 +#, c-format +msgid "%s is not a mono stream (%d channels)\n" +msgstr "%s nie je monofónny prúd (%d kanálov)\n" + +#: speaker-test/speaker-test.c:720 +#, c-format +msgid "Sample rate doesn't match (%d) for %s\n" +msgstr "Frekvencia vzorkovania (%d) nesedí s %s\n" + +#: speaker-test/speaker-test.c:725 +#, c-format +msgid "Unsupported sample format bits %d for %s\n" +msgstr "Nepodporovaný formát vzorkovania s %d bitmi v %s\n" + +#: speaker-test/speaker-test.c:786 +#, c-format +msgid "Undefined channel %d\n" +msgstr "Kanál %d nie je definovaný\n" + +#: speaker-test/speaker-test.c:837 +#, c-format +msgid "Write error: %d,%s\n" +msgstr "Chyba pri zápise: %d, %s\n" + +#: speaker-test/speaker-test.c:839 +#, c-format +msgid "xrun_recovery failed: %d,%s\n" +msgstr "xrun_recovery zlyhalo: %d, %s\n" + +#: speaker-test/speaker-test.c:942 +#, c-format +msgid "" +"Usage: speaker-test [OPTION]... \n" +"-h,--help\thelp\n" +"-D,--device\tplayback device\n" +"-r,--rate\tstream rate in Hz\n" +"-c,--channels\tcount of channels in stream\n" +"-f,--frequency\tsine wave frequency in Hz\n" +"-F,--format\tsample format\n" +"-b,--buffer\tring buffer size in us\n" +"-p,--period\tperiod size in us\n" +"-P,--nperiods\tnumber of periods\n" +"-t,--test\tpink=use pink noise, sine=use sine wave, wav=WAV file\n" +"-l,--nloops\tspecify number of loops to test, 0 = infinite\n" +"-s,--speaker\tsingle speaker test. Values 1=Left, 2=right, etc\n" +"-w,--wavfile\tUse the given WAV file as a test sound\n" +"-W,--wavdir\tSpecify the directory containing WAV files\n" +"-m,--chmap\tSpecify the channel map to override\n" +"-X,--force-frequency\tforce frequencies outside the 30-8000hz range\n" +"-S,--scale\tScale of generated test tones in percent (default=80)\n" +"\n" +msgstr "" +"Syntax: speaker-test [VOĽBA]... \n" +"-h,--help\tpomocník\n" +"-D,--device\tzariadenie prehrávania\n" +"-r,--rate\tfrekvencia vzorkovania v Hz\n" +"-c,--channels\tpočet kanálov v prúde\n" +"-f,--frequency\tfrekvencia sínusovej vlny v Hz\n" +"-F,--format\tformát vzorkovania\n" +"-b,--buffer\tveľkosť ring buffera v µs\n" +"-p,--period\tveľkosť periódy v µs\n" +"-P,--nperiods\tpočet periód\n" +"-t,--test\tpink=použiť ružový šum, sine=použiť sínusovú vlnu, wav=súbor WAV\n" +"-l,--nloops\tpočet slučiek pre test, 0 = nekonečno\n" +"-s,--speaker\totestovať samostatný reproduktor. Hodnoty: 1=ľavý, 2=pravý, " +"atď.\n" +"-w,--wavfile\tpoužiť zadaný WAV súbor pre testovanie\n" +"-W,--wavdir\tpoužiť adresár obsahujúci súbory WAV\n" +"-m,--chmap\tmapa kanálov, ktorá bude použitá\n" +"-X,--force-frequency\tvynútiť frekvencie mimo rozsahu 30-8000 Hz\n" +"-S,--scale\tškálovanie vygenerovaných testovacích tónov v percentách " +"(predvolené=80)\n" +"\n" + +#: speaker-test/speaker-test.c:1074 +#, c-format +msgid "Invalid number of periods %d\n" +msgstr "Neplatný počet periód %d\n" + +#: speaker-test/speaker-test.c:1090 speaker-test/speaker-test.c:1094 +#, c-format +msgid "Invalid test type %s\n" +msgstr "Neplatný typ testu %s\n" + +#: speaker-test/speaker-test.c:1127 +#, c-format +msgid "Unknown option '%c'\n" +msgstr "Neznáma voľba '%c'\n" + +#: speaker-test/speaker-test.c:1141 +#, c-format +msgid "Invalid parameter for -s option.\n" +msgstr "Neplatný parameter pre voľbu -s.\n" + +#: speaker-test/speaker-test.c:1156 +#, c-format +msgid "Playback device is %s\n" +msgstr "Zariadenie prehrávania je %s\n" + +#: speaker-test/speaker-test.c:1157 +#, c-format +msgid "Stream parameters are %iHz, %s, %i channels\n" +msgstr "Parametre prúdu sú %i Hz, %s, %i kanály\n" + +#: speaker-test/speaker-test.c:1160 +#, c-format +msgid "Using 16 octaves of pink noise\n" +msgstr "Používam 16 oktáv ružového šumu\n" + +#: speaker-test/speaker-test.c:1163 +#, c-format +msgid "Sine wave rate is %.4fHz\n" +msgstr "Frekvencia sínusovej vlny je %.4f Hz\n" + +#: speaker-test/speaker-test.c:1166 +#, c-format +msgid "WAV file(s)\n" +msgstr "Súbor(y) WAV\n" + +#: speaker-test/speaker-test.c:1176 +#, c-format +msgid "Playback open error: %d,%s\n" +msgstr "Chyba pri otváraní zariadenia prehrávania: %d, %s\n" + +#: speaker-test/speaker-test.c:1182 +#, c-format +msgid "Setting of hwparams failed: %s\n" +msgstr "Chyba pri nastavovaní hardvérových parametrov (hwparams): %s\n" + +#: speaker-test/speaker-test.c:1186 +#, c-format +msgid "Setting of swparams failed: %s\n" +msgstr "Chyba pri nastavovaní softvérových parametrov (swparams): %s\n" + +#: speaker-test/speaker-test.c:1232 speaker-test/speaker-test.c:1254 +#, c-format +msgid "Transfer failed: %s\n" +msgstr "Chyba pri prenose: %s\n" + +#: speaker-test/speaker-test.c:1240 +#, c-format +msgid "Time per period = %lf\n" +msgstr "Čas na periódu = %lf\n" + +#, c-format +#~ msgid "service '%s' is not found in /etc/services\n" +#~ msgstr "Služba '%s' nebola nájdená v /etc/services\n" diff -Nru alsa-utils-1.2.2/seq/Makefile.in alsa-utils-1.2.6/seq/Makefile.in --- alsa-utils-1.2.2/seq/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/seq/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,7 +90,8 @@ subdir = seq ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -242,8 +243,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -323,6 +324,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/seq/aconnect/Makefile.in alsa-utils-1.2.6/seq/aconnect/Makefile.in --- alsa-utils-1.2.2/seq/aconnect/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/seq/aconnect/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ subdir = seq/aconnect ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -256,8 +257,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -337,6 +338,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/seq/aplaymidi/Makefile.in alsa-utils-1.2.6/seq/aplaymidi/Makefile.in --- alsa-utils-1.2.2/seq/aplaymidi/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/seq/aplaymidi/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ subdir = seq/aplaymidi ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -258,8 +259,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -339,6 +340,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/seq/aseqdump/Makefile.in alsa-utils-1.2.6/seq/aseqdump/Makefile.in --- alsa-utils-1.2.2/seq/aseqdump/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/seq/aseqdump/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ subdir = seq/aseqdump ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -254,8 +255,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -335,6 +336,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/seq/aseqnet/Makefile.in alsa-utils-1.2.6/seq/aseqnet/Makefile.in --- alsa-utils-1.2.2/seq/aseqnet/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/seq/aseqnet/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ subdir = seq/aseqnet ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -255,8 +256,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -336,6 +337,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/seq/aseqnet/README.aseqnet alsa-utils-1.2.6/seq/aseqnet/README.aseqnet --- alsa-utils-1.2.2/seq/aseqnet/README.aseqnet 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/seq/aseqnet/README.aseqnet 2021-12-06 10:17:28.000000000 +0000 @@ -50,4 +50,6 @@ -s addr : explicit read-subscription to the given address (client:addr). -d addr : explicit write-subscription to the given address. + -n name : specify the midi name of the process. + Default value is either 'Net Client' or 'Net Server'. -v : verbose mode. diff -Nru alsa-utils-1.2.2/seq/aseqnet/aseqnet.1 alsa-utils-1.2.6/seq/aseqnet/aseqnet.1 --- alsa-utils-1.2.2/seq/aseqnet/aseqnet.1 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/seq/aseqnet/aseqnet.1 2021-12-06 10:17:28.000000000 +0000 @@ -70,6 +70,9 @@ .B \-d addr Subscribe to the given address for write automatically. .TP +.B \-n name +Specify the midi name of the process. +.TP .B \-v Verbose mode. diff -Nru alsa-utils-1.2.2/seq/aseqnet/aseqnet.c alsa-utils-1.2.6/seq/aseqnet/aseqnet.c --- alsa-utils-1.2.2/seq/aseqnet/aseqnet.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/seq/aseqnet/aseqnet.c 2021-12-06 10:17:28.000000000 +0000 @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -37,11 +38,10 @@ static void init_buf(void); static void init_pollfds(void); static void close_files(void); -static void init_seq(char *source, char *dest); -static int get_port(char *service); +static void init_seq(char *source, char *dest, char *name); static void sigterm_exit(int sig); -static void init_server(int port); -static void init_client(char *server, int port); +static void init_server(const char *port); +static void init_client(const char *server, const char *port); static void do_loop(void); static int copy_local_to_remote(void); static int copy_remote_to_local(int fd); @@ -49,7 +49,7 @@ /* * default TCP port number */ -#define DEFAULT_PORT 40002 +#define DEFAULT_PORT "40002" /* * local input buffer @@ -75,6 +75,7 @@ static int seq_port; static int server_mode; +static int ipv6 = 0; static int verbose = 0; static int info = 0; @@ -84,9 +85,11 @@ */ static const struct option long_option[] = { + {"ipv6", 0, NULL, '6'}, {"port", 1, NULL, 'p'}, {"source", 1, NULL, 's'}, {"dest", 1, NULL, 'd'}, + {"name", 1, NULL, 'n'}, {"help", 0, NULL, 'h'}, {"verbose", 0, NULL, 'v'}, {"info", 0, NULL, 'i'}, @@ -96,21 +99,22 @@ int main(int argc, char **argv) { int c; - int port = DEFAULT_PORT; + char *port = DEFAULT_PORT; char *source = NULL, *dest = NULL; + char *name = NULL; #ifdef ENABLE_NLS setlocale(LC_ALL, ""); textdomain(PACKAGE); #endif - while ((c = getopt_long(argc, argv, "p:s:d:vi", long_option, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "p:s:d:n:6hvi", long_option, NULL)) != -1) { switch (c) { + case '6': + ipv6 = 1; + break; case 'p': - if (isdigit(*optarg)) - port = atoi(optarg); - else - port = get_port(optarg); + port = optarg; break; case 's': source = optarg; @@ -118,6 +122,9 @@ case 'd': dest = optarg; break; + case 'n': + name = optarg; + break; case 'v': verbose++; break; @@ -134,7 +141,7 @@ signal(SIGTERM, sigterm_exit); init_buf(); - init_seq(source, dest); + init_seq(source, dest, name); if (optind >= argc) { server_mode = 1; @@ -167,9 +174,11 @@ printf(_(" server mode: aseqnet [-options]\n")); printf(_(" client mode: aseqnet [-options] server_host\n")); printf(_("options:\n")); + printf(_(" -6,--ipv6 : use IPv6 TCP protocol\n")); printf(_(" -p,--port # : specify TCP port (digit or service name)\n")); printf(_(" -s,--source addr : read from given addr (client:port)\n")); printf(_(" -d,--dest addr : write to given addr (client:port)\n")); + printf(_(" -n,--name value : use a specific midi process name\n")); printf(_(" -v, --verbose : print verbose messages\n")); printf(_(" -i, --info : print certain received events\n")); } @@ -223,7 +232,7 @@ /* * initialize sequencer */ -static void init_seq(char *source, char *dest) +static void init_seq(char *source, char *dest, char* name) { snd_seq_addr_t addr; int err, counti, counto; @@ -252,10 +261,14 @@ snd_seq_nonblock(handle, 1); /* set client info */ - if (server_mode) - snd_seq_set_client_name(handle, "Net Server"); - else - snd_seq_set_client_name(handle, "Net Client"); + if (name) + snd_seq_set_client_name(handle, name); + else { + if (server_mode) + snd_seq_set_client_name(handle, "Net Server"); + else + snd_seq_set_client_name(handle, "Net Client"); + } /* create a port */ seq_port = snd_seq_create_simple_port(handle, "Network", @@ -297,19 +310,25 @@ } } - /* - * convert from string to TCP port number + * translate the binary network address to ASCII */ -static int get_port(char *service) +static void get_net_addr(struct addrinfo *rp, char *buf, size_t buflen) { - struct servent *sp; + void *ptr; - if ((sp = getservbyname(service, "tcp")) == NULL){ - fprintf(stderr, _("service '%s' is not found in /etc/services\n"), service); - return -1; + switch (rp->ai_family) { + case AF_INET: + ptr = &((struct sockaddr_in *) rp->ai_addr)->sin_addr; + break; + case AF_INET6: + ptr = &((struct sockaddr_in6 *) rp->ai_addr)->sin6_addr; + break; + default: + ptr = NULL; } - return sp->s_port; + buf[buflen-1] = '\0'; + inet_ntop(rp->ai_family, ptr, buf, buflen-1); } /* @@ -325,30 +344,48 @@ /* * initialize network server */ -static void init_server(int port) +static void init_server(const char *port) { + struct addrinfo hints; + struct addrinfo *result, *rp; + char buf[100]; int i; int curstate = 1; - struct sockaddr_in addr; + int save_errno = 0; - memset(&addr, 0, sizeof(addr)); + memset(&hints, 0, sizeof(hints)); + hints.ai_family = ipv6 ? AF_INET6 : AF_INET; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_PASSIVE; - addr.sin_family = AF_INET; - addr.sin_addr.s_addr = INADDR_ANY; - addr.sin_port = htons(port); - - sockfd = socket(AF_INET, SOCK_STREAM, 0); - if (sockfd < 0) { - perror("create socket"); + if (getaddrinfo(NULL, port, &hints, &result) < 0) { + fprintf(stderr, _("can't get address\n")); exit(1); } - setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)); - /* the return value is ignored.. */ - - if (bind(sockfd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { - perror("can't bind"); + for (rp = result; rp != NULL; rp = rp->ai_next) { + if ((sockfd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol)) < 0){ + perror("create socket"); + exit(1); + } + if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)) < 0) { + perror("setsockopt"); + exit(1); + } + if (verbose) { + get_net_addr(rp, buf, sizeof(buf)); + fprintf(stderr, _("connecting to: %s\n"), buf); + } + if (bind(sockfd, rp->ai_addr, rp->ai_addrlen) == 0) + break; + save_errno = errno; + close(sockfd); + } + if (rp == NULL) { + errno = save_errno; + perror("bind"); exit(1); } + freeaddrinfo(result); if (listen(sockfd, 5) < 0) { perror("can't listen"); @@ -392,32 +429,48 @@ /* * initialize network client */ -static void init_client(char *server, int port) +static void init_client(const char *server, const char *port) { - struct sockaddr_in addr; - struct hostent *host; + struct addrinfo hints; + struct addrinfo *result, *rp; + char buf[100]; int curstate = 1; int fd; + int save_errno = 0; - if ((fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0){ - perror("create socket"); - exit(1); - } - if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)) < 0) { - perror("setsockopt"); - exit(1); - } - if ((host = gethostbyname(server)) == NULL){ + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_PASSIVE; + + if (getaddrinfo(server, port, &hints, &result) < 0) { fprintf(stderr, _("can't get address %s\n"), server); exit(1); } - addr.sin_port = htons(port); - addr.sin_family = AF_INET; - memcpy(&addr.sin_addr, host->h_addr, host->h_length); - if (connect(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { + for (rp = result; rp != NULL; rp = rp->ai_next) { + if ((fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol)) < 0){ + perror("create socket"); + exit(1); + } + if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)) < 0) { + perror("setsockopt"); + exit(1); + } + if (verbose) { + get_net_addr(rp, buf, sizeof(buf)); + fprintf(stderr, _("connecting to: %s\n"), buf); + } + if (connect(fd, rp->ai_addr, rp->ai_addrlen) == 0) + break; + save_errno = errno; + close(fd); + } + if (rp == NULL) { + errno = save_errno; perror("connect"); exit(1); } + freeaddrinfo(result); if (verbose) fprintf(stderr, _("ok.. connected\n")); netfd[0] = fd; @@ -491,8 +544,11 @@ if (cur_wrlen) { int i; for (i = 0; i < max_connection; i++) { - if (netfd[i] >= 0) - write(netfd[i], writebuf, cur_wrlen); + if (netfd[i] >= 0) { + ssize_t wrlen = write(netfd[i], writebuf, cur_wrlen); + if (wrlen != (ssize_t)cur_wrlen) + fprintf(stderr, "write error: %s", wrlen < 0 ? strerror(errno) : "short"); + } } cur_wrlen = 0; } diff -Nru alsa-utils-1.2.2/speaker-test/Makefile.in alsa-utils-1.2.6/speaker-test/Makefile.in --- alsa-utils-1.2.2/speaker-test/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/speaker-test/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -92,7 +92,8 @@ subdir = speaker-test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -298,8 +299,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -379,6 +380,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/speaker-test/samples/Makefile.in alsa-utils-1.2.6/speaker-test/samples/Makefile.in --- alsa-utils-1.2.2/speaker-test/samples/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/speaker-test/samples/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -91,7 +91,8 @@ subdir = speaker-test/samples ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -212,8 +213,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -293,6 +294,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ diff -Nru alsa-utils-1.2.2/speaker-test/speaker-test.c alsa-utils-1.2.6/speaker-test/speaker-test.c --- alsa-utils-1.2.2/speaker-test/speaker-test.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/speaker-test/speaker-test.c 2021-12-06 10:17:28.000000000 +0000 @@ -285,6 +285,8 @@ SND_PCM_FORMAT_FLOAT_LE, SND_PCM_FORMAT_S24_3LE, SND_PCM_FORMAT_S24_3BE, + SND_PCM_FORMAT_S24_LE, + SND_PCM_FORMAT_S24_BE, SND_PCM_FORMAT_S32_LE, SND_PCM_FORMAT_S32_BE, -1 @@ -337,6 +339,20 @@ *samp8++ = BE_INT(res.i); *samp8++ = BE_INT(res.i) >> 8; *samp8++ = BE_INT(res.i) >> 16; + break; + case SND_PCM_FORMAT_S24_LE: + res.i >>= 8; + *samp8++ = LE_INT(res.i); + *samp8++ = LE_INT(res.i) >> 8; + *samp8++ = LE_INT(res.i) >> 16; + *samp8++ = 0; + break; + case SND_PCM_FORMAT_S24_BE: + res.i >>= 8; + *samp8++ = 0; + *samp8++ = BE_INT(res.i); + *samp8++ = BE_INT(res.i) >> 8; + *samp8++ = BE_INT(res.i) >> 16; break; case SND_PCM_FORMAT_S32_LE: *samp32++ = LE_INT(res.i); diff -Nru alsa-utils-1.2.2/test-driver alsa-utils-1.2.6/test-driver --- alsa-utils-1.2.2/test-driver 2020-02-19 12:07:15.000000000 +0000 +++ alsa-utils-1.2.6/test-driver 2021-12-06 11:44:45.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 2011-2018 Free Software Foundation, Inc. +# Copyright (C) 2011-2020 Free Software Foundation, Inc. # # 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 diff -Nru alsa-utils-1.2.2/topology/Makefile.am alsa-utils-1.2.6/topology/Makefile.am --- alsa-utils-1.2.2/topology/Makefile.am 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/topology/Makefile.am 2021-12-06 10:17:28.000000000 +0000 @@ -8,7 +8,10 @@ %.1: %.rst rst2man $< > $@ -alsatplg_SOURCES = topology.c +alsatplg_SOURCES = topology.c pre-processor.c pre-process-class.c pre-process-object.c \ + pre-process-dapm.c pre-process-dai.c + +noinst_HEADERS = topology.h pre-processor.h AM_CPPFLAGS = \ -Wall -I$(top_srcdir)/include diff -Nru alsa-utils-1.2.2/topology/Makefile.in alsa-utils-1.2.6/topology/Makefile.in --- alsa-utils-1.2.2/topology/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/topology/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,6 +14,7 @@ @SET_MAKE@ + VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -92,21 +93,25 @@ subdir = topology ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/aconfig.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) -am_alsatplg_OBJECTS = topology.$(OBJEXT) +am_alsatplg_OBJECTS = topology.$(OBJEXT) pre-processor.$(OBJEXT) \ + pre-process-class.$(OBJEXT) pre-process-object.$(OBJEXT) \ + pre-process-dapm.$(OBJEXT) pre-process-dai.$(OBJEXT) alsatplg_OBJECTS = $(am_alsatplg_OBJECTS) am__DEPENDENCIES_1 = alsatplg_DEPENDENCIES = $(am__DEPENDENCIES_1) @@ -125,7 +130,10 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles -am__depfiles_remade = ./$(DEPDIR)/topology.Po +am__depfiles_remade = ./$(DEPDIR)/pre-process-class.Po \ + ./$(DEPDIR)/pre-process-dai.Po ./$(DEPDIR)/pre-process-dapm.Po \ + ./$(DEPDIR)/pre-process-object.Po ./$(DEPDIR)/pre-processor.Po \ + ./$(DEPDIR)/topology.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -176,6 +184,7 @@ man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) +HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -255,8 +264,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -336,6 +345,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -348,7 +358,10 @@ udevrulesdir = @udevrulesdir@ xmlto_available = @xmlto_available@ @USE_RST2MAN_TRUE@man_MANS = alsatplg.1 -alsatplg_SOURCES = topology.c +alsatplg_SOURCES = topology.c pre-processor.c pre-process-class.c pre-process-object.c \ + pre-process-dapm.c pre-process-dai.c + +noinst_HEADERS = topology.h pre-processor.h AM_CPPFLAGS = \ -Wall -I$(top_srcdir)/include @@ -441,6 +454,11 @@ distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre-process-class.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre-process-dai.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre-process-dapm.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre-process-object.Po@am__quote@ # am--include-marker +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre-processor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topology.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @@ -593,7 +611,7 @@ done check-am: all-am check: check-am -all-am: Makefile $(PROGRAMS) $(MANS) +all-am: Makefile $(PROGRAMS) $(MANS) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ @@ -634,7 +652,12 @@ clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am - -rm -f ./$(DEPDIR)/topology.Po + -rm -f ./$(DEPDIR)/pre-process-class.Po + -rm -f ./$(DEPDIR)/pre-process-dai.Po + -rm -f ./$(DEPDIR)/pre-process-dapm.Po + -rm -f ./$(DEPDIR)/pre-process-object.Po + -rm -f ./$(DEPDIR)/pre-processor.Po + -rm -f ./$(DEPDIR)/topology.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -680,7 +703,12 @@ installcheck-am: maintainer-clean: maintainer-clean-am - -rm -f ./$(DEPDIR)/topology.Po + -rm -f ./$(DEPDIR)/pre-process-class.Po + -rm -f ./$(DEPDIR)/pre-process-dai.Po + -rm -f ./$(DEPDIR)/pre-process-dapm.Po + -rm -f ./$(DEPDIR)/pre-process-object.Po + -rm -f ./$(DEPDIR)/pre-processor.Po + -rm -f ./$(DEPDIR)/topology.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff -Nru alsa-utils-1.2.2/topology/pre-process-class.c alsa-utils-1.2.6/topology/pre-process-class.c --- alsa-utils-1.2.2/topology/pre-process-class.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/topology/pre-process-class.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,300 @@ +/* + Copyright(c) 2021 Intel Corporation + All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation. + + 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, write to the Free Software + Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + The full GNU General Public License is included in this distribution + in the file called LICENSE.GPL. +*/ +#include +#include +#include +#include +#include +#include "topology.h" +#include "pre-processor.h" + +bool tplg_class_is_attribute_check(const char *attr, snd_config_t *class_cfg, char *category) +{ + snd_config_iterator_t i, next; + snd_config_t *cfg, *n; + int ret; + + ret = snd_config_search(class_cfg, category, &cfg); + if (ret < 0) + return false; + + snd_config_for_each(i, next, cfg) { + const char *id, *s; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (snd_config_get_string(n, &s) < 0) + continue; + + if (!strcmp(attr, s)) + return true; + } + + return false; +} + +/* check if attribute is mandatory */ +bool tplg_class_is_attribute_mandatory(const char *attr, snd_config_t *class_cfg) +{ + return tplg_class_is_attribute_check(attr, class_cfg, "attributes.mandatory"); +} + +/* check if attribute is immutable */ +bool tplg_class_is_attribute_immutable(const char *attr, snd_config_t *class_cfg) +{ + return tplg_class_is_attribute_check(attr, class_cfg, "attributes.immutable"); +} + +/* check if attribute is unique */ +bool tplg_class_is_attribute_unique(const char *attr, snd_config_t *class_cfg) +{ + snd_config_t *unique; + const char *s; + int ret; + + ret = snd_config_search(class_cfg, "attributes.unique", &unique); + if (ret < 0) + return false; + + if (snd_config_get_string(unique, &s) < 0) + return false; + + if (!strcmp(attr, s)) + return true; + + return false; +} + +/* + * Helper function to look up class definition from the Object config. + * ex: For an object declaration, Object.Widget.pga.0{}, return the config correspdonding to + * Class.Widget.pga{}. Note that input config , "cfg" does not include the "Object" node. + */ +snd_config_t *tplg_class_lookup(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg) +{ + snd_config_iterator_t first, end; + snd_config_t *class, *class_cfg = NULL; + const char *class_type, *class_name; + char *class_config_id; + int ret; + + if (snd_config_get_id(cfg, &class_type) < 0) + return NULL; + + first = snd_config_iterator_first(cfg); + end = snd_config_iterator_end(cfg); + + if (first == end) { + SNDERR("No class name provided for object type: %s\n", class_type); + return NULL; + } + + class = snd_config_iterator_entry(first); + + if (snd_config_get_id(class, &class_name) < 0) + return NULL; + + class_config_id = tplg_snprintf("Class.%s.%s", class_type, class_name); + if (!class_config_id) + return NULL; + + ret = snd_config_search(tplg_pp->input_cfg, class_config_id, &class_cfg); + if (ret < 0) + SNDERR("No Class definition found for %s\n", class_config_id); + + free(class_config_id); + return class_cfg; +} + +/* find the attribute config by name in the class definition */ +snd_config_t *tplg_class_find_attribute_by_name(struct tplg_pre_processor *tplg_pp, + snd_config_t *class, const char *name) +{ + snd_config_t *attr = NULL; + const char *class_id; + char *attr_str; + int ret; + + if (snd_config_get_id(class, &class_id) < 0) + return NULL; + + attr_str = tplg_snprintf("DefineAttribute.%s", name); + if (!attr_str) + return NULL; + + ret = snd_config_search(class, attr_str, &attr); + if (ret < 0) + SNDERR("No definition for attribute '%s' in class '%s'\n", + name, class_id); + + free(attr_str); + return attr; +} + +/* get the name of the attribute that must have a unique value in the object instance */ +const char *tplg_class_get_unique_attribute_name(struct tplg_pre_processor *tplg_pp, + snd_config_t *class) +{ + snd_config_t *unique; + const char *unique_name, *class_id; + int ret; + + if (snd_config_get_id(class, &class_id) < 0) + return NULL; + + ret = snd_config_search(class, "attributes.unique", &unique); + if (ret < 0) { + SNDERR("No unique attribute in class '%s'\n", class_id); + return NULL; + } + + if (snd_config_get_string(unique, &unique_name) < 0) { + SNDERR("Invalid name for unique attribute in class '%s'\n", class_id); + return NULL; + } + + return unique_name; +} + +/* get attribute type from the definition */ +snd_config_type_t tplg_class_get_attribute_type(struct tplg_pre_processor *tplg_pp, + snd_config_t *attr) +{ + snd_config_t *type; + const char *s; + int ret; + + /* default to integer if no type is given */ + ret = snd_config_search(attr, "type", &type); + if (ret < 0) + return SND_CONFIG_TYPE_INTEGER; + + ret = snd_config_get_string(type, &s); + assert(ret >= 0); + + if (!strcmp(s, "string")) + return SND_CONFIG_TYPE_STRING; + + if (!strcmp(s, "compound")) + return SND_CONFIG_TYPE_COMPOUND; + + if (!strcmp(s, "real")) + return SND_CONFIG_TYPE_REAL; + + if (!strcmp(s, "integer64")) + return SND_CONFIG_TYPE_INTEGER64; + + return SND_CONFIG_TYPE_INTEGER; +} + +/* get token_ref for attribute with name attr_name in the class */ +const char *tplg_class_get_attribute_token_ref(struct tplg_pre_processor *tplg_pp, + snd_config_t *class, const char *attr_name) +{ + snd_config_t *attributes, *attr, *token_ref; + const char *token; + int ret; + + ret = snd_config_search(class, "DefineAttribute", &attributes); + if (ret < 0) + return NULL; + + ret = snd_config_search(attributes, attr_name, &attr); + if (ret < 0) + return NULL; + + ret = snd_config_search(attr, "token_ref", &token_ref); + if (ret < 0) + return NULL; + + ret = snd_config_get_string(token_ref, &token); + if (ret < 0) + return NULL; + + return token; +} + +/* convert a valid attribute string value to the corresponding tuple value */ +long tplg_class_attribute_valid_tuple_value(struct tplg_pre_processor *tplg_pp, + snd_config_t *class, snd_config_t *attr) +{ + + snd_config_t *attributes, *cfg, *valid, *tuples, *n; + snd_config_iterator_t i, next; + const char *attr_name, *attr_value; + int ret; + + ret = snd_config_get_id(attr, &attr_name); + if (ret < 0) + return -EINVAL; + + ret = snd_config_get_string(attr, &attr_value); + if (ret < 0) + return -EINVAL; + + /* find attribute definition in class */ + ret = snd_config_search(class, "DefineAttribute", &attributes); + if (ret < 0) + return -EINVAL; + + + ret = snd_config_search(attributes, attr_name, &cfg); + if (ret < 0) + return -EINVAL; + + /* check if it has valid values */ + ret = snd_config_search(cfg, "constraints.valid_values", &valid); + if (ret < 0) + return -EINVAL; + + ret = snd_config_search(cfg, "constraints.tuple_values", &tuples); + if (ret < 0) + return -EINVAL; + + /* find and return the tuple value matching the attribute value id */ + snd_config_for_each(i, next, valid) { + const char *s, *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_string(n, &s) < 0) + continue; + if (snd_config_get_id(n, &id) < 0) + continue; + + if (!strcmp(attr_value, s)) { + snd_config_t *tuple; + long tuple_value; + + ret = snd_config_search(tuples, id, &tuple); + if (ret < 0) + return -EINVAL; + + ret = snd_config_get_integer(tuple, &tuple_value); + if (ret < 0) + return ret; + + return tuple_value; + } + } + + return -EINVAL; +} diff -Nru alsa-utils-1.2.2/topology/pre-process-dai.c alsa-utils-1.2.6/topology/pre-process-dai.c --- alsa-utils-1.2.2/topology/pre-process-dai.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/topology/pre-process-dai.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,137 @@ +/* + Copyright(c) 2021 Intel Corporation + All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation. + + 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, write to the Free Software + Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + The full GNU General Public License is included in this distribution + in the file called LICENSE.GPL. +*/ +#include +#include +#include +#include "topology.h" +#include "pre-processor.h" + +int tplg_build_hw_cfg_object(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj_cfg, snd_config_t *parent) +{ + snd_config_t *hw_cfg, *obj; + const char *name; + int ret; + + obj = tplg_object_get_instance_config(tplg_pp, obj_cfg); + + name = tplg_object_get_name(tplg_pp, obj); + if (!name) + return -EINVAL; + + ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &hw_cfg, NULL, false); + if (ret < 0) + return ret; + + return tplg_parent_update(tplg_pp, parent, "hw_configs", name); +} + +int tplg_build_fe_dai_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + return tplg_build_base_object(tplg_pp, obj_cfg, parent, false); +} + +static int tplg_update_pcm_object(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj_cfg, snd_config_t *parent) +{ + snd_config_t *top, *parent_obj, *obj, *dest, *cfg, *pcm, *child; + const char *parent_name, *item_name, *direction; + int ret; + + /* get object name */ + obj = tplg_object_get_instance_config(tplg_pp, obj_cfg); + item_name = tplg_object_get_name(tplg_pp, obj); + if (!item_name) + return -EINVAL; + + /* get direction */ + ret = snd_config_search(obj, "direction", &cfg); + if (ret < 0) { + SNDERR("no direction attribute in %s\n", item_name); + return ret; + } + + ret = snd_config_get_string(cfg, &direction); + if (ret < 0) { + SNDERR("Invalid direction attribute in %s\n", item_name); + return ret; + } + + /* add to parent section */ + top = tplg_object_get_section(tplg_pp, parent); + if (!top) { + SNDERR("Cannot find parent for %s\n", item_name); + return -EINVAL; + } + + parent_obj = tplg_object_get_instance_config(tplg_pp, parent); + + /* get parent name. if parent has no name, skip adding config */ + parent_name = tplg_object_get_name(tplg_pp, parent_obj); + if (!parent_name) + return 0; + + /* find parent config with name */ + dest = tplg_find_config(top, parent_name); + if (!dest) { + SNDERR("Cannot find parent section %s\n", parent_name); + return -EINVAL; + } + + ret = snd_config_search(dest, "pcm", &pcm); + if (ret < 0) { + ret = tplg_config_make_add(&pcm, "pcm", SND_CONFIG_TYPE_COMPOUND, dest); + if (ret < 0) { + SNDERR("Error creating pcm config in %s\n", parent_name); + return ret; + } + } + + ret = snd_config_search(pcm, direction, &cfg); + if (ret >= 0) { + SNDERR("pcm.%s exists already in %s\n", direction, parent_name); + return -EEXIST; + } + + ret = tplg_config_make_add(&cfg, direction, SND_CONFIG_TYPE_COMPOUND, pcm); + + if (ret >= 0) + ret = tplg_config_make_add(&child, "capabilities", SND_CONFIG_TYPE_STRING, cfg); + + if (ret >= 0) + ret = snd_config_set_string(child, item_name); + + return ret; +} + +int tplg_build_pcm_caps_object(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj_cfg, snd_config_t *parent) +{ + snd_config_t *caps; + int ret; + + ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &caps, NULL, false); + if (ret < 0) + return ret; + + /* add pcm capabilities to parent */ + return tplg_update_pcm_object(tplg_pp, obj_cfg, parent); +} diff -Nru alsa-utils-1.2.2/topology/pre-process-dapm.c alsa-utils-1.2.6/topology/pre-process-dapm.c --- alsa-utils-1.2.2/topology/pre-process-dapm.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/topology/pre-process-dapm.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,534 @@ +/* + Copyright(c) 2021 Intel Corporation + All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation. + + 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, write to the Free Software + Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + The full GNU General Public License is included in this distribution + in the file called LICENSE.GPL. +*/ +#include +#include +#include +#include "topology.h" +#include "pre-processor.h" + +int tplg_build_base_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent, bool skip_name) +{ + snd_config_t *top, *parent_obj, *cfg, *dest; + const char *parent_name; + + /* find parent section config */ + top = tplg_object_get_section(tplg_pp, parent); + if (!top) + return -EINVAL; + + parent_obj = tplg_object_get_instance_config(tplg_pp, parent); + + /* get parent name */ + parent_name = tplg_object_get_name(tplg_pp, parent_obj); + if (!parent_name) + return 0; + + /* find parent config with name */ + dest = tplg_find_config(top, parent_name); + if (!dest) { + SNDERR("Cannot find parent config %s\n", parent_name); + return -EINVAL; + } + + /* build config from template and add to parent */ + return tplg_build_object_from_template(tplg_pp, obj_cfg, &cfg, dest, skip_name); +} + +int tplg_build_scale_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + return tplg_build_base_object(tplg_pp, obj_cfg, parent, true); +} + +int tplg_build_ops_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + return tplg_build_base_object(tplg_pp, obj_cfg, parent, false); +} + +int tplg_build_channel_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + return tplg_build_base_object(tplg_pp, obj_cfg, parent, false); +} + +int tplg_build_tlv_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + snd_config_t *cfg; + const char *name; + int ret; + + cfg = tplg_object_get_instance_config(tplg_pp, obj_cfg); + + name = tplg_object_get_name(tplg_pp, cfg); + if (!name) + return -EINVAL; + + ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &cfg, NULL, false); + if (ret < 0) + return ret; + + return tplg_parent_update(tplg_pp, parent, "tlv", name); +} + +static int tplg_build_control(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent, char *type) +{ + snd_config_t *cfg, *obj; + const char *name; + int ret; + + obj = tplg_object_get_instance_config(tplg_pp, obj_cfg); + + /* get control name */ + ret = snd_config_search(obj, "name", &cfg); + if (ret < 0) + return 0; + + ret = snd_config_get_string(cfg, &name); + if (ret < 0) + return ret; + + ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &cfg, NULL, false); + if (ret < 0) + return ret; + + ret = tplg_add_object_data(tplg_pp, obj_cfg, cfg, NULL); + if (ret < 0) + SNDERR("Failed to add data section for %s\n", name); + + return tplg_parent_update(tplg_pp, parent, type, name); +} + +int tplg_build_mixer_control(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + return tplg_build_control(tplg_pp, obj_cfg, parent, "mixer"); +} + +int tplg_build_bytes_control(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + return tplg_build_control(tplg_pp, obj_cfg, parent, "bytes"); +} + +/* + * Widget names for pipeline endpoints can be of the following type: + * "class. ex: pga.0.1, buffer.1.1 etc + * Optionally, the index argument for a widget can be omitted and will be substituted with + * the index from the route: ex: pga..0, host..playback etc + */ +static int tplg_pp_get_widget_name(struct tplg_pre_processor *tplg_pp, + const char *string, long index, char **widget) +{ + snd_config_iterator_t i, next; + snd_config_t *temp_cfg, *child, *class_cfg, *n; + char *class_name, *args, *widget_name; + int ret; + + /* get class name */ + args = strchr(string, '.'); + if (!args) { + SNDERR("Error getting class name for %s\n", string); + return -EINVAL; + } + + class_name = calloc(1, strlen(string) - strlen(args) + 1); + if (!class_name) + return -ENOMEM; + + snprintf(class_name, strlen(string) - strlen(args) + 1, "%s", string); + + /* create config with Widget class type */ + ret = snd_config_make(&temp_cfg, "Widget", SND_CONFIG_TYPE_COMPOUND); + if (ret < 0) { + free(class_name); + return ret; + } + + /* create config with class name and add it to the Widget config */ + ret = tplg_config_make_add(&child, class_name, SND_CONFIG_TYPE_COMPOUND, temp_cfg); + if (ret < 0) { + free(class_name); + return ret; + } + + /* get class definition for widget */ + class_cfg = tplg_class_lookup(tplg_pp, temp_cfg); + snd_config_delete(temp_cfg); + if (!class_cfg) { + free(class_name); + return -EINVAL; + } + + /* get constructor for class */ + ret = snd_config_search(class_cfg, "attributes.constructor", &temp_cfg); + if (ret < 0) { + SNDERR("No arguments in class for widget %s\n", string); + free(class_name); + return ret; + } + + widget_name = strdup(class_name); + free(class_name); + if (!widget_name) + return -ENOMEM; + + /* construct widget name using the constructor argument values */ + snd_config_for_each(i, next, temp_cfg) { + const char *id; + char *arg, *remaining, *temp; + + n = snd_config_iterator_entry(i); + if (snd_config_get_string(n, &id) < 0) + continue; + + if (!args) { + SNDERR("insufficient arugments for widget %s\n", string); + ret = -EINVAL; + goto err; + } + + remaining = strchr(args + 1, '.'); + if (remaining) { + arg = calloc(1, strlen(args + 1) - strlen(remaining) + 1); + if (!arg) { + ret = -ENOMEM; + goto err; + } + snprintf(arg, strlen(args + 1) - strlen(remaining) + 1, "%s", args + 1); + } else { + arg = calloc(1, strlen(args + 1) + 1); + if (!arg) { + ret = -ENOMEM; + goto err; + } + + snprintf(arg, strlen(args + 1) + 1, "%s", args + 1); + } + + /* if no index provided, substitue with route index */ + if (!strcmp(arg, "") && !strcmp(id, "index")) { + free(arg); + arg = tplg_snprintf("%ld", index); + if (!arg) { + ret = -ENOMEM; + free(arg); + goto err; + } + } + + temp = tplg_snprintf("%s.%s", widget_name, arg); + if (!temp) { + ret = -ENOMEM; + free(arg); + goto err; + } + + free(widget_name); + widget_name = temp; + free(arg); + if (remaining) + args = remaining; + else + args = NULL; + } + + *widget = widget_name; + return 0; + +err: + free(widget_name); + return ret; +} + +int tplg_build_dapm_route_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + snd_config_t *top, *obj, *cfg, *route, *child, *parent_obj; + const char *name, *wname; + const char *parent_name = "Endpoint"; + char *src_widget_name, *sink_widget_name, *line_str, *route_name; + const char *control = ""; + long index = 0; + int ret; + + obj = tplg_object_get_instance_config(tplg_pp, obj_cfg); + + ret = snd_config_get_id(obj, &name); + if (ret < 0) + return -EINVAL; + + /* endpoint connections at the top-level conf have no parent */ + if (parent) { + parent_obj = tplg_object_get_instance_config(tplg_pp, parent); + + ret = snd_config_get_id(parent_obj, &parent_name); + if (ret < 0) + return -EINVAL; + } + + tplg_pp_debug("Building DAPM route object: '%s' ...", name); + + ret = snd_config_search(tplg_pp->output_cfg, "SectionGraph", &top); + if (ret < 0) { + ret = tplg_config_make_add(&top, "SectionGraph", + SND_CONFIG_TYPE_COMPOUND, tplg_pp->output_cfg); + if (ret < 0) { + SNDERR("Error creating 'SectionGraph' config\n"); + return ret; + } + } + + /* get route index */ + ret = snd_config_search(obj, "index", &cfg); + if (ret >= 0) { + ret = snd_config_get_integer(cfg, &index); + if (ret < 0) { + SNDERR("Invalid index route %s\n", name); + return ret; + } + } + + /* get source widget name */ + ret = snd_config_search(obj, "source", &cfg); + if (ret < 0) { + SNDERR("No source for route %s\n", name); + return ret; + } + + ret = snd_config_get_string(cfg, &wname); + if (ret < 0) { + SNDERR("Invalid name for source in route %s\n", name); + return ret; + } + + ret = tplg_pp_get_widget_name(tplg_pp, wname, index, &src_widget_name); + if (ret < 0) { + SNDERR("error getting widget name for %s\n", wname); + return ret; + } + + /* get sink widget name */ + ret = snd_config_search(obj, "sink", &cfg); + if (ret < 0) { + SNDERR("No sink for route %s\n", name); + free(src_widget_name); + return ret; + } + + ret = snd_config_get_string(cfg, &wname); + if (ret < 0) { + SNDERR("Invalid name for sink in route %s\n", name); + free(src_widget_name); + return ret; + } + + ret = tplg_pp_get_widget_name(tplg_pp, wname, index, &sink_widget_name); + if (ret < 0) { + SNDERR("error getting widget name for %s\n", wname); + free(src_widget_name); + return ret; + } + + /* get control name */ + ret = snd_config_search(obj, "control", &cfg); + if (ret >= 0) { + ret = snd_config_get_string(cfg, &control); + if (ret < 0) { + SNDERR("Invalid control name for route %s\n", name); + goto err; + } + } + + /* add route */ + route_name = tplg_snprintf("%s.%s", parent_name, name); + if (!route_name) { + ret = -ENOMEM; + goto err; + } + + ret = snd_config_make(&route, route_name, SND_CONFIG_TYPE_COMPOUND); + free(route_name); + if (ret < 0) { + SNDERR("Error creating route config for %s %d\n", name, ret); + goto err; + } + + ret = snd_config_add(top, route); + if (ret < 0) { + SNDERR("Error adding route config for %s %d\n", name, ret); + goto err; + } + + /* add index */ + ret = tplg_config_make_add(&child, "index", SND_CONFIG_TYPE_INTEGER, route); + if (ret < 0) { + SNDERR("Error creating index config for %s\n", name); + goto err; + } + + ret = snd_config_set_integer(child, index); + if (ret < 0) { + SNDERR("Error setting index config for %s\n", name); + goto err; + } + + /* add lines */ + ret = tplg_config_make_add(&cfg, "lines", SND_CONFIG_TYPE_COMPOUND, route); + if (ret < 0) { + SNDERR("Error creating lines config for %s\n", name); + goto err; + } + + /* add route string */ + ret = tplg_config_make_add(&child, "0", SND_CONFIG_TYPE_STRING, cfg); + if (ret < 0) { + SNDERR("Error creating lines config for %s\n", name); + goto err; + } + + line_str = tplg_snprintf("%s, %s, %s", sink_widget_name, control, src_widget_name); + if (!line_str) { + ret = -ENOMEM; + goto err; + } + + /* set the line string */ + ret = snd_config_set_string(child, line_str); + free(line_str); + if (ret < 0) + SNDERR("Error creating lines config for %s\n", name); +err: + free(src_widget_name); + free(sink_widget_name); + return ret; +} + +static int tplg_get_sample_size_from_format(const char *format) +{ + if (!strcmp(format, "s32le") || !strcmp(format, "s24le") || !strcmp(format, "float")) + return 4; + + if (!strcmp(format, "s16le")) + return 2; + + SNDERR("Unsupported format: %s\n", format); + return -EINVAL; +} + +int tplg_update_buffer_auto_attr(struct tplg_pre_processor *tplg_pp, + snd_config_t *buffer_cfg, snd_config_t *parent) +{ + snd_config_iterator_t i, next; + snd_config_t *n, *pipeline_cfg, *child; + const char *buffer_id, *format; + long periods, channels, sample_size; + long sched_period, rate, frames; + long buffer_size; + int err; + + if (snd_config_get_id(buffer_cfg, &buffer_id) < 0) + return -EINVAL; + + if (!parent) { + SNDERR("No parent for buffer %s\n", buffer_id); + return -EINVAL; + } + + /* acquire attributes from buffer config */ + snd_config_for_each(i, next, buffer_cfg) { + const char *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (!strcmp(id, "periods")) { + if (snd_config_get_integer(n, &periods)) { + SNDERR("Invalid number of periods for buffer %s\n", buffer_id); + return -EINVAL; + } + } + + if (!strcmp(id, "channels")) { + if (snd_config_get_integer(n, &channels)) { + SNDERR("Invalid number of channels for buffer %s\n", buffer_id); + return -EINVAL; + } + } + + if (!strcmp(id, "format")) { + if (snd_config_get_string(n, &format)) { + SNDERR("Invalid format for buffer %s\n", buffer_id); + return -EINVAL; + } + } + } + + pipeline_cfg = tplg_object_get_instance_config(tplg_pp, parent); + + /* acquire some other attributes from parent pipeline config */ + snd_config_for_each(i, next, pipeline_cfg) { + const char *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (!strcmp(id, "period")) { + if (snd_config_get_integer(n, &sched_period)) { + SNDERR("Invalid period for buffer %s\n", buffer_id); + return -EINVAL; + } + } + + if (!strcmp(id, "rate")) { + if (snd_config_get_integer(n, &rate)) { + SNDERR("Invalid rate for buffer %s\n", buffer_id); + return -EINVAL; + } + } + } + + /* calculate buffer size */ + sample_size = tplg_get_sample_size_from_format(format); + if (sample_size < 0) { + SNDERR("Invalid sample size value for %s\n", buffer_id); + return sample_size; + } + frames = (rate * sched_period) / 1000000; + buffer_size = periods * sample_size * channels * frames; + + /* add size child config to buffer config */ + err = tplg_config_make_add(&child, "size", SND_CONFIG_TYPE_INTEGER, buffer_cfg); + if (err < 0) { + SNDERR("Error creating size config for %s\n", buffer_id); + return err; + } + + err = snd_config_set_integer(child, buffer_size); + if (err < 0) + SNDERR("Error setting size config for %s\n", buffer_id); + + return err; +} diff -Nru alsa-utils-1.2.2/topology/pre-process-object.c alsa-utils-1.2.6/topology/pre-process-object.c --- alsa-utils-1.2.2/topology/pre-process-object.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/topology/pre-process-object.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,1714 @@ +/* + Copyright(c) 2021 Intel Corporation + All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation. + + 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, write to the Free Software + Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + The full GNU General Public License is included in this distribution + in the file called LICENSE.GPL. +*/ +#include +#include +#include +#include +#include +#include +#include "gettext.h" +#include "topology.h" +#include "pre-processor.h" + +/* Parse VendorToken object, create the "SectionVendorToken" and save it */ +int tplg_build_vendor_token_object(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj_cfg, snd_config_t *parent) +{ + snd_config_iterator_t i, next; + snd_config_t *vtop, *n, *obj; + const char *name; + int ret; + + ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &vtop, NULL, false); + if (ret < 0) + return ret; + + ret = snd_config_get_id(vtop, &name); + if (ret < 0) + return ret; + + /* add the tuples */ + obj = tplg_object_get_instance_config(tplg_pp, obj_cfg); + snd_config_for_each(i, next, obj) { + snd_config_t *dst; + const char *id; + + n = snd_config_iterator_entry(i); + + if (snd_config_get_id(n, &id) < 0) + continue; + + if (!strcmp(id, "name")) + continue; + + ret = snd_config_copy(&dst, n); + if (ret < 0) { + SNDERR("Error copying config node %s for '%s'\n", id, name); + return ret; + } + + ret = snd_config_add(vtop, dst); + if (ret < 0) { + snd_config_delete(dst); + SNDERR("Error adding vendortoken %s for %s\n", id, name); + return ret; + } + } + + return ret; +} + +int tplg_parent_update(struct tplg_pre_processor *tplg_pp, snd_config_t *parent, + const char *section_name, const char *item_name) +{ + snd_config_iterator_t i, next; + snd_config_t *child, *cfg, *top, *item_config, *n; + const char *parent_name; + char *item_id; + int ret, id = 0; + + /* Nothing to do if parent is NULL */ + if (!parent) + return 0; + + child = tplg_object_get_instance_config(tplg_pp, parent); + ret = snd_config_search(child, "name", &cfg); + if (ret < 0) { + ret = snd_config_get_id(child, &parent_name); + if (ret < 0) { + SNDERR("No name config for parent\n"); + return ret; + } + } else { + ret = snd_config_get_string(cfg, &parent_name); + if (ret < 0) { + SNDERR("Invalid name for parent\n"); + return ret; + } + } + + top = tplg_object_get_section(tplg_pp, parent); + if (!top) + return -EINVAL; + + /* get config with name */ + cfg = tplg_find_config(top, parent_name); + if (!cfg) + return ret; + + /* get section config */ + if (!strcmp(section_name, "tlv")) { + /* set tlv name if config exists already */ + ret = snd_config_search(cfg, section_name, &item_config); + if (ret < 0) { + ret = tplg_config_make_add(&item_config, section_name, + SND_CONFIG_TYPE_STRING, cfg); + if (ret < 0) { + SNDERR("Error creating section config widget %s for %s\n", + section_name, parent_name); + return ret; + } + } + + return snd_config_set_string(item_config, item_name); + } + + ret = snd_config_search(cfg, section_name, &item_config); + if (ret < 0) { + ret = tplg_config_make_add(&item_config, section_name, + SND_CONFIG_TYPE_COMPOUND, cfg); + if (ret < 0) { + SNDERR("Error creating section config widget %s for %s\n", + section_name, parent_name); + return ret; + } + } + + snd_config_for_each(i, next, item_config) { + const char *name; + + n = snd_config_iterator_entry(i); + if (snd_config_get_string(n, &name) < 0) + continue; + + /* item already exists */ + if (!strcmp(name, item_name)) + return 0; + id++; + } + + /* add new item */ + item_id = tplg_snprintf("%d", id); + if (!item_id) + return -ENOMEM; + + ret = snd_config_make(&cfg, item_id, SND_CONFIG_TYPE_STRING); + free(item_id); + if (ret < 0) + return ret; + + ret = snd_config_set_string(cfg, item_name); + if (ret < 0) + return ret; + + ret = snd_config_add(item_config, cfg); + if (ret < 0) + snd_config_delete(cfg); + + return ret; +} + +/* Parse data object, create the "SectionData" and save it. Only "bytes" data supported for now */ +int tplg_build_data_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + snd_config_t *dtop; + const char *name; + int ret; + + ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &dtop, NULL, false); + if (ret < 0) + return ret; + + ret = snd_config_get_id(dtop, &name); + if (ret < 0) + return ret; + + return tplg_parent_update(tplg_pp, parent, "data", name); +} + +static int tplg_create_config_template(struct tplg_pre_processor *tplg_pp, + snd_config_t **template, + const struct config_template_items *items) +{ + snd_config_t *top, *child; + int ret, i; + + ret = snd_config_make(&top, "template", SND_CONFIG_TYPE_COMPOUND); + if (ret < 0) + return ret; + + /* add integer configs */ + for (i = 0; i < MAX_CONFIGS_IN_TEMPLATE; i++) + if (items->int_config_ids[i]) { + ret = tplg_config_make_add(&child, items->int_config_ids[i], + SND_CONFIG_TYPE_INTEGER, top); + if (ret < 0) + goto err; + } + + /* add string configs */ + for (i = 0; i < MAX_CONFIGS_IN_TEMPLATE; i++) + if (items->string_config_ids[i]) { + ret = tplg_config_make_add(&child, items->string_config_ids[i], + SND_CONFIG_TYPE_STRING, top); + if (ret < 0) + goto err; + } + + /* add compound configs */ + for (i = 0; i < MAX_CONFIGS_IN_TEMPLATE; i++) { + if (items->compound_config_ids[i]) { + ret = tplg_config_make_add(&child, items->compound_config_ids[i], + SND_CONFIG_TYPE_COMPOUND, top); + if (ret < 0) + goto err; + } + } + +err: + if (ret < 0) { + snd_config_delete(top); + return ret; + } + + *template = top; + return ret; +} + +static void tplg_attribute_print_valid_values(snd_config_t *valid_values, const char *name) +{ + snd_config_iterator_t i, next; + snd_config_t *n; + + SNDERR("valid values for attribute %s are:\n", name); + + snd_config_for_each(i, next, valid_values) { + const char *s, *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (snd_config_get_string(n, &s) < 0) + continue; + + SNDERR("%s", s); + } +} + +/* check is attribute value belongs in the set of valid values */ +static bool tplg_is_attribute_valid_value(snd_config_t *valid_values, const char *value) +{ + snd_config_iterator_t i, next; + snd_config_t *n; + + snd_config_for_each(i, next, valid_values) { + const char *s, *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (snd_config_get_string(n, &s) < 0) + continue; + + if (!strcmp(value, s)) + return true; + } + + return false; +} + +/* check if attribute value passes the min/max value constraints */ +static bool tplg_object_is_attribute_min_max_valid(snd_config_t *attr, snd_config_t *obj_attr, + bool min_check) +{ + snd_config_type_t type = snd_config_get_type(obj_attr); + snd_config_t *valid; + const char *attr_name; + int ret; + + if (snd_config_get_id(attr, &attr_name) < 0) + return false; + + if (min_check) { + ret = snd_config_search(attr, "constraints.min", &valid); + if (ret < 0) + return true; + } else { + ret = snd_config_search(attr, "constraints.max", &valid); + if (ret < 0) + return true; + } + + switch(type) { + case SND_CONFIG_TYPE_INTEGER: + { + long v, m; + + if (snd_config_get_integer(valid, &m) < 0) + return true; + + if (snd_config_get_integer(obj_attr, &v) < 0) + return false; + + if (min_check) { + if (v < m) { + SNDERR("attribute '%s' value: %ld is less than min value: %d\n", + attr_name, v, m); + return false; + } + } else { + if (v > m) { + SNDERR("attribute '%s' value: %ld is greater than max value: %d\n", + attr_name, v, m); + return false; + } + } + + return true; + } + case SND_CONFIG_TYPE_INTEGER64: + { + long long v; + long m; + + if (snd_config_get_integer(valid, &m) < 0) + return true; + + if (snd_config_get_integer64(obj_attr, &v) < 0) + return false; + + if (min_check) { + if (v < m) { + SNDERR("attribute '%s' value: %ld is less than min value: %d\n", + attr_name, v, m); + return false; + } + } else { + if (v > m) { + SNDERR("attribute '%s' value: %ld is greater than max value: %d\n", + attr_name, v, m); + return false; + } + } + + return true; + } + default: + break; + } + + return false; +} + +/* check for min/max and valid value constraints */ +static bool tplg_object_is_attribute_valid(struct tplg_pre_processor *tplg_pp, + snd_config_t *attr, snd_config_t *object) +{ + snd_config_iterator_t i, next; + snd_config_t *valid, *obj_attr, *n; + snd_config_type_t type; + const char *attr_name, *obj_value; + int ret; + + if (snd_config_get_id(attr, &attr_name) < 0) + return false; + + ret = snd_config_search(object, attr_name, &obj_attr); + if (ret < 0) { + SNDERR("attr %s not found \n", attr_name); + return false; + } + type = snd_config_get_type(obj_attr); + + /* check if attribute has valid values */ + ret = snd_config_search(attr, "constraints.valid_values", &valid); + if (ret < 0) + goto min_max_check; + + switch(type) { + case SND_CONFIG_TYPE_STRING: + if (snd_config_get_string(obj_attr, &obj_value) < 0) + return false; + if (!tplg_is_attribute_valid_value(valid, obj_value)) { + tplg_attribute_print_valid_values(valid, attr_name); + return false; + } + return true; + case SND_CONFIG_TYPE_COMPOUND: + snd_config_for_each(i, next, obj_attr) { + const char *s, *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (snd_config_get_string(n, &s) < 0) + continue; + + if (!tplg_is_attribute_valid_value(valid, s)) { + tplg_attribute_print_valid_values(valid, attr_name); + return false; + } + } + return true; + default: + break; + } + + return false; + +min_max_check: + if (!tplg_object_is_attribute_min_max_valid(attr, obj_attr, true)) + return false; + + return tplg_object_is_attribute_min_max_valid(attr, obj_attr, false); +} + +/* get object's name attribute value */ +const char *tplg_object_get_name(struct tplg_pre_processor *tplg_pp, + snd_config_t *object) +{ + snd_config_t *cfg; + const char *name; + int ret; + + ret = snd_config_search(object, "name", &cfg); + if (ret < 0) + return NULL; + + ret = snd_config_get_string(cfg, &name); + if (ret < 0) + return NULL; + + return name; +} + +/* look up the instance of object in a config */ +static snd_config_t *tplg_object_lookup_in_config(struct tplg_pre_processor *tplg_pp, + snd_config_t *class, const char *type, + const char *class_name, const char *id) +{ + snd_config_t *obj_cfg = NULL; + char *config_id; + + config_id = tplg_snprintf("Object.%s.%s.%s", type, class_name, id); + if (!config_id) + return NULL; + + if (snd_config_search(class, config_id, &obj_cfg) < 0) + return NULL; + free(config_id); + return obj_cfg; +} + +static int tplg_pp_add_object_tuple_section(struct tplg_pre_processor *tplg_pp, + snd_config_t *class_cfg, + snd_config_t *attr, char *data_name, + const char *token_ref, const char *array_name) +{ + snd_config_t *top, *tuple_cfg, *child, *cfg, *new; + const char *id; + char *token, *type, *str; + long tuple_value; + int ret; + + tplg_pp_debug("Building vendor tuples section: '%s' ...", data_name); + + ret = snd_config_search(tplg_pp->output_cfg, "SectionVendorTuples", &top); + if (ret < 0) { + ret = tplg_config_make_add(&top, "SectionVendorTuples", + SND_CONFIG_TYPE_COMPOUND, tplg_pp->output_cfg); + if (ret < 0) { + SNDERR("Error creating SectionVendorTuples config\n"); + return ret; + } + } + + type = strchr(token_ref, '.'); + if(!type) { + SNDERR("Error getting type for %s\n", token_ref); + return -EINVAL; + } + + token = calloc(1, strlen(token_ref) - strlen(type) + 1); + if (!token) + return -ENOMEM; + snprintf(token, strlen(token_ref) - strlen(type) + 1, "%s", token_ref); + + if (!array_name) + str = strdup(type + 1); + else + str = tplg_snprintf("%s.%s", type + 1, array_name); + if (!str) { + ret = -ENOMEM; + goto free; + } + + tuple_cfg = tplg_find_config(top, data_name); + if (!tuple_cfg) { + /* add new SectionVendorTuples */ + ret = tplg_config_make_add(&tuple_cfg, data_name, SND_CONFIG_TYPE_COMPOUND, top); + if (ret < 0) { + SNDERR("Error creating new vendor tuples config %s\n", data_name); + goto err; + } + + ret = tplg_config_make_add(&child, "tokens", SND_CONFIG_TYPE_STRING, + tuple_cfg); + if (ret < 0) { + SNDERR("Error creating tokens config for '%s'\n", data_name); + goto err; + } + + ret = snd_config_set_string(child, token); + if (ret < 0) { + SNDERR("Error setting tokens config for '%s'\n", data_name); + goto err; + } + + ret = tplg_config_make_add(&child, "tuples", SND_CONFIG_TYPE_COMPOUND, + tuple_cfg); + if (ret < 0) { + SNDERR("Error creating tuples config for '%s'\n", data_name); + goto err; + } + + ret = tplg_config_make_add(&cfg, str, SND_CONFIG_TYPE_COMPOUND, + child); + if (ret < 0) { + SNDERR("Error creating tuples type config for '%s'\n", data_name); + goto err; + } + } else { + snd_config_t *tuples_cfg; + + ret = snd_config_search(tuple_cfg, "tuples" , &tuples_cfg); + if (ret < 0) { + SNDERR("can't find tuples config in %s\n", data_name); + goto err; + } + + cfg = tplg_find_config(tuples_cfg, str); + if (!cfg) { + ret = tplg_config_make_add(&cfg, str, SND_CONFIG_TYPE_COMPOUND, + tuples_cfg); + if (ret < 0) { + SNDERR("Error creating tuples config for '%s' and type name %s\n", data_name, str); + goto err; + } + } + } + + ret = snd_config_get_id(attr, &id); + if (ret < 0) + goto err; + + /* tuple exists already? */ + ret = snd_config_search(cfg, id, &child); + if (ret >=0) + goto err; + + /* add attribute to tuples */ + tuple_value = tplg_class_attribute_valid_tuple_value(tplg_pp, class_cfg, attr); + if (tuple_value < 0) { + /* just copy attribute cfg as is */ + ret = snd_config_copy(&new, attr); + if (ret < 0) { + SNDERR("can't copy attribute for %s\n", data_name); + goto err; + } + } else { + ret = snd_config_make(&new, id, SND_CONFIG_TYPE_INTEGER); + if (ret < 0) + goto err; + + ret = snd_config_set_integer(new, tuple_value); + if (ret < 0) + goto err; + } + + ret = snd_config_add(cfg, new); +err: + free(str); +free: + free(token); + return ret; +} + +static int tplg_pp_add_object_data_section(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj_data, char *data_name) +{ + snd_config_iterator_t i, next; + snd_config_t *top, *data_cfg, *child; + char *data_id; + int ret, id = 0; + + ret = snd_config_search(tplg_pp->output_cfg, "SectionData", &top); + if (ret < 0) { + ret = tplg_config_make_add(&top, "SectionData", SND_CONFIG_TYPE_COMPOUND, + tplg_pp->output_cfg); + if (ret < 0) { + SNDERR("Failed to add SectionData\n"); + return ret; + } + } + + /* nothing to do if data section already exists */ + data_cfg = tplg_find_config(top, data_name); + if (data_cfg) + return 0; + + tplg_pp_debug("Building data section %s ...", data_name); + + /* add new SectionData */ + ret = tplg_config_make_add(&data_cfg, data_name, SND_CONFIG_TYPE_COMPOUND, top); + if (ret < 0) + return ret; + + ret = tplg_config_make_add(&child, "tuples", SND_CONFIG_TYPE_STRING, data_cfg); + if (ret < 0) { + SNDERR("error adding data ref for %s\n", data_name); + return ret; + } + + ret = snd_config_set_string(child, data_name); + if (ret < 0) { + SNDERR("error setting tuples ref for %s\n", data_name); + return ret; + } + + /* add data item to object */ + snd_config_for_each(i, next, obj_data) + id++; + + data_id = tplg_snprintf("%d", id); + if (!data_id) + return -ENOMEM; + + ret = tplg_config_make_add(&child, data_id, SND_CONFIG_TYPE_STRING, obj_data); + free(data_id); + if (ret < 0) { + SNDERR("error adding data ref %s\n", data_name); + return ret; + } + + return snd_config_set_string(child, data_name); +} + +int tplg_add_object_data(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *top, const char *array_name) +{ + snd_config_iterator_t i, next; + snd_config_t *data_cfg, *class_cfg, *n, *obj; + const char *object_id; + int ret; + + if (snd_config_get_id(top, &object_id) < 0) + return 0; + + obj = tplg_object_get_instance_config(tplg_pp, obj_cfg); + + class_cfg = tplg_class_lookup(tplg_pp, obj_cfg); + if (!class_cfg) + return -EINVAL; + + /* add data config to top */ + ret = snd_config_search(top, "data", &data_cfg); + if (ret < 0) { + ret = tplg_config_make_add(&data_cfg, "data", SND_CONFIG_TYPE_COMPOUND, top); + if (ret < 0) { + SNDERR("error creating data config for %s\n", object_id); + return ret; + } + } + + /* add data items to object's data section */ + snd_config_for_each(i, next, obj) { + const char *id, *token; + char *data_cfg_name; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + token = tplg_class_get_attribute_token_ref(tplg_pp, class_cfg, id); + if (!token) + continue; + + data_cfg_name = tplg_snprintf("%s.%s", object_id, token); + if (!data_cfg_name) + return -ENOMEM; + + ret = tplg_pp_add_object_data_section(tplg_pp, data_cfg, data_cfg_name); + if (ret < 0) { + SNDERR("Failed to add data section %s\n", data_cfg_name); + free(data_cfg_name); + return ret; + } + + ret = tplg_pp_add_object_tuple_section(tplg_pp, class_cfg, n, data_cfg_name, + token, array_name); + if (ret < 0) { + SNDERR("Failed to add data section %s\n", data_cfg_name); + free(data_cfg_name); + return ret; + } + free(data_cfg_name); + } + + return 0; +} + +/* search for all template configs in the source config and copy them to the destination */ +static int tplg_object_add_attributes(snd_config_t *dst, snd_config_t *template, + snd_config_t *src) +{ + snd_config_iterator_t i, next; + snd_config_t *n; + int ret; + + snd_config_for_each(i, next, template) { + snd_config_t *attr, *new; + const char *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + ret = snd_config_search(src, id, &attr); + if (ret < 0) + continue; + + /* skip if attribute is already set */ + ret = snd_config_search(dst, id, &new); + if (ret >= 0) + continue; + + ret = snd_config_copy(&new, attr); + if (ret < 0) { + SNDERR("failed to copy attribute %s\n", id); + return ret; + } + + ret = snd_config_add(dst, new); + if (ret < 0) { + snd_config_delete(new); + SNDERR("failed to add attribute %s\n", id); + return ret; + } + } + + return 0; +} + +static const struct build_function_map *tplg_object_get_map(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj); + +/* Add object attributes to the private data of the parent object config */ +static int tplg_build_parent_data(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + snd_config_t *obj, *parent_obj, *section_cfg, *top; + const struct build_function_map *map; + const char *id, *parent_id; + int ret; + + /* nothing to do if parent is NULL */ + if (!parent) + return 0; + + obj = tplg_object_get_instance_config(tplg_pp, obj_cfg); + parent_obj = tplg_object_get_instance_config(tplg_pp, parent); + + /* get object ID */ + if (snd_config_get_id(obj, &id) < 0) { + SNDERR("Invalid ID for object\n"); + return -EINVAL; + } + + /* get parent object name or ID */ + parent_id = tplg_object_get_name(tplg_pp, parent_obj); + if (!parent_id) { + ret = snd_config_get_id(parent_obj, &parent_id); + if (ret < 0) { + SNDERR("Invalid ID for parent of object %s\n", id); + return ret; + } + } + + map = tplg_object_get_map(tplg_pp, parent); + if (!map) { + SNDERR("Parent object %s not supported\n", parent_id); + return -EINVAL; + } + + /* find parent config with ID */ + ret = snd_config_search(tplg_pp->output_cfg, map->section_name, §ion_cfg); + if (ret < 0) { + SNDERR("No SectionBE found\n"); + return ret; + } + + top = tplg_find_config(section_cfg, parent_id); + if (!top) { + SNDERR("SectionBE %s not found\n", parent_id); + return -EINVAL; + } + + return tplg_add_object_data(tplg_pp, obj_cfg, top, id); +} + +/* + * Function to create a new "section" config based on the template. The new config will be + * added to the output_cfg or the top_config input parameter. + */ +int tplg_build_object_from_template(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t **wtop, snd_config_t *top_config, + bool skip_name) +{ + snd_config_t *top, *template, *obj; + const struct build_function_map *map; + const char *object_name; + int ret; + + /* look up object map */ + map = tplg_object_get_map(tplg_pp, obj_cfg); + if (!map) { + SNDERR("unknown object type or class name\n"); + return -EINVAL; + } + + obj = tplg_object_get_instance_config(tplg_pp, obj_cfg); + + /* look up or create the corresponding section config for object */ + if (!top_config) + top_config = tplg_pp->output_cfg; + + ret = snd_config_search(top_config, map->section_name, &top); + if (ret < 0) { + ret = tplg_config_make_add(&top, map->section_name, SND_CONFIG_TYPE_COMPOUND, + top_config); + if (ret < 0) { + SNDERR("Error creating %s config\n", map->section_name); + return ret; + } + } + + /* get object name */ + object_name = tplg_object_get_name(tplg_pp, obj); + if (!object_name) { + ret = snd_config_get_id(obj, &object_name); + if (ret < 0) { + SNDERR("Invalid ID for %s\n", map->section_name); + return ret; + } + } + + tplg_pp_debug("Building object: '%s' ...", object_name); + + /* create and add new object config with name, if needed */ + if (skip_name) { + *wtop = top; + } else { + *wtop = tplg_find_config(top, object_name); + if (*wtop) + goto template; + + ret = tplg_config_make_add(wtop, object_name, SND_CONFIG_TYPE_COMPOUND, + top); + if (ret < 0) { + SNDERR("Error creating config for %s\n", object_name); + return ret; + } + } + +template: + /* create template config */ + if (!map->template_items) + return 0; + + ret = tplg_create_config_template(tplg_pp, &template, map->template_items); + if (ret < 0) { + SNDERR("Error creating template config for %s\n", object_name); + return ret; + } + + /* update section config based on template and the attribute values in the object */ + ret = tplg_object_add_attributes(*wtop, template, obj); + snd_config_delete(template); + if (ret < 0) + SNDERR("Error adding attributes for object '%s'\n", object_name); + + return ret; +} + +static int tplg_build_generic_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent) +{ + snd_config_t *wtop; + const char *name; + int ret; + + ret = tplg_build_object_from_template(tplg_pp, obj_cfg, &wtop, NULL, false); + if (ret < 0) + return ret; + + ret = snd_config_get_id(wtop, &name); + if (ret < 0) + return ret; + + ret = tplg_add_object_data(tplg_pp, obj_cfg, wtop, NULL); + if (ret < 0) + SNDERR("Failed to add data section for %s\n", name); + + return ret; +} + +const struct config_template_items pcm_caps_config = { + .int_config_ids = {"rate_min", "rate_max", "channels_min", "channels_max", "periods_min", + "periods_max", "period_size_min", "period_size_max", "buffer_size_min", + "buffer_size_max", "sig_bits"}, + .string_config_ids = {"formats", "rates"}, +}; + +const struct config_template_items fe_dai_config = { + .int_config_ids = {"id"}, +}; + +const struct config_template_items hwcfg_config = { + .int_config_ids = {"id", "bclk_freq", "bclk_invert", "fsync_invert", "fsync_freq", + "mclk_freq", "pm_gate_clocks", "tdm_slots", "tdm_slot_width", + "tx_slots", "rx_slots", "tx_channels", "rx_channels"}, + .string_config_ids = {"format", "bclk", "fsync", "mclk"}, +}; + +const struct config_template_items be_dai_config = { + .int_config_ids = {"id", "default_hw_conf_id", "symmertic_rates", "symmetric_channels", + "symmetric_sample_bits"}, + .string_config_ids = {"stream_name"}, +}; + +const struct config_template_items pcm_config = { + .int_config_ids = {"id", "compress", "symmertic_rates", "symmetric_channels", + "symmetric_sample_bits"}, +}; + +const struct config_template_items mixer_control_config = { + .int_config_ids = {"index", "max", "invert"}, + .compound_config_ids = {"access"} +}; + +const struct config_template_items bytes_control_config = { + .int_config_ids = {"index", "base", "num_regs", "max", "mask"}, + .compound_config_ids = {"access"} +}; + +const struct config_template_items scale_config = { + .int_config_ids = {"min", "step", "mute"}, +}; + +const struct config_template_items ops_config = { + .int_config_ids = {"get", "put"}, + .string_config_ids = {"info"}, +}; + +const struct config_template_items channel_config = { + .int_config_ids = {"reg", "shift"}, +}; + +const struct config_template_items widget_config = { + .int_config_ids = {"index", "no_pm", "shift", "invert", "subseq", "event_type", + "event_flags"}, + .string_config_ids = {"type", "stream_name"}, +}; + +const struct config_template_items data_config = { + .string_config_ids = {"bytes"} +}; + +/* + * Items without class name should be placed lower than those with one, + * because they are much more generic. + */ +const struct build_function_map object_build_map[] = { + {"Base", "manifest", "SectionManifest", &tplg_build_generic_object, NULL, NULL}, + {"Base", "data", "SectionData", &tplg_build_data_object, NULL, &data_config}, + {"Base", "tlv", "SectionTLV", &tplg_build_tlv_object, NULL, NULL}, + {"Base", "scale", "scale", &tplg_build_scale_object, NULL, &scale_config}, + {"Base", "ops", "ops" ,&tplg_build_ops_object, NULL, &ops_config}, + {"Base", "extops", "extops" ,&tplg_build_ops_object, NULL, &ops_config}, + {"Base", "channel", "channel", &tplg_build_channel_object, NULL, &channel_config}, + {"Base", "VendorToken", "SectionVendorTokens", &tplg_build_vendor_token_object, + NULL, NULL}, + {"Base", "hw_config", "SectionHWConfig", &tplg_build_hw_cfg_object, NULL, + &hwcfg_config}, + {"Base", "fe_dai", "dai", &tplg_build_fe_dai_object, NULL, &fe_dai_config}, + {"Base", "route", "SectionGraph", &tplg_build_dapm_route_object, NULL, NULL}, + {"Widget", "buffer", "SectionWidget", &tplg_build_generic_object, + tplg_update_buffer_auto_attr, &widget_config}, + {"Widget", "", "SectionWidget", &tplg_build_generic_object, NULL, &widget_config}, + {"Control", "mixer", "SectionControlMixer", &tplg_build_mixer_control, NULL, + &mixer_control_config}, + {"Control", "bytes", "SectionControlBytes", &tplg_build_bytes_control, NULL, + &bytes_control_config}, + {"Dai", "", "SectionBE", &tplg_build_generic_object, NULL, &be_dai_config}, + {"PCM", "pcm", "SectionPCM", &tplg_build_generic_object, NULL, &pcm_config}, + {"PCM", "pcm_caps", "SectionPCMCapabilities", &tplg_build_pcm_caps_object, + NULL, &pcm_caps_config}, +}; + +static const struct build_function_map *tplg_object_get_map(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj) +{ + snd_config_iterator_t first; + snd_config_t *class; + const char *class_type, *class_name; + unsigned int i; + + first = snd_config_iterator_first(obj); + class = snd_config_iterator_entry(first); + + if (snd_config_get_id(class, &class_name) < 0) + return NULL; + + if (snd_config_get_id(obj, &class_type) < 0) + return NULL; + + for (i = 0; i < ARRAY_SIZE(object_build_map); i++) { + if (!strcmp(class_type, "Widget") && + !strcmp(object_build_map[i].class_type, "Widget") && + !strcmp(object_build_map[i].class_name, "")) + return &object_build_map[i]; + + if (!strcmp(class_type, "Dai") && + !strcmp(object_build_map[i].class_type, "Dai")) + return &object_build_map[i]; + + /* for other type objects, also match the object class_name */ + if (!strcmp(class_type, object_build_map[i].class_type) && + !strcmp(object_build_map[i].class_name, class_name)) + return &object_build_map[i]; + } + + return NULL; +} + +/* search for section name based on class type and name and return the config in output_cfg */ +snd_config_t *tplg_object_get_section(struct tplg_pre_processor *tplg_pp, snd_config_t *class) +{ + const struct build_function_map *map; + snd_config_t *cfg = NULL; + int ret; + + map = tplg_object_get_map(tplg_pp, class); + if (!map) + return NULL; + + ret = snd_config_search(tplg_pp->output_cfg, map->section_name, &cfg); + if (ret < 0) + SNDERR("Section config for %s not found\n", map->section_name); + + return cfg; +} + +/* return 1 if attribute not found in search_config, 0 on success and negative value on error */ +static int tplg_object_copy_and_add_param(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj, + snd_config_t *attr_cfg, + snd_config_t *search_config) +{ + snd_config_t *attr, *new; + const char *id, *search_id; + int ret; + + if (snd_config_get_id(attr_cfg, &id) < 0) + return 0; + + if (snd_config_get_id(search_config, &search_id) < 0) + return 0; + + /* copy object value */ + ret = snd_config_search(search_config, id, &attr); + if (ret < 0) + return 1; + + ret = snd_config_copy(&new, attr); + if (ret < 0) { + SNDERR("error copying attribute '%s' value from %s\n", id, search_id); + return ret; + } + + ret = snd_config_add(obj, new); + if (ret < 0) { + snd_config_delete(new); + SNDERR("error adding attribute '%s' value to %s\n", id, search_id); + } + + return ret; +} + +/* + * Attribute values for an object can be set in one of the following in order of + * precedence: + * 1. Value set in object instance + * 2. Default value set in the object's class definition + * 3. Inherited value from the parent object + * 4. Value set in the object instance embedded in the parent object + * 5. Value set in the object instance embedded in the parent class definition + */ +static int tplg_object_update(struct tplg_pre_processor *tplg_pp, snd_config_t *obj, + snd_config_t *parent) +{ + snd_config_iterator_t i, next; + snd_config_t *n, *cfg, *args; + snd_config_t *obj_cfg, *class_cfg, *parent_obj; + const char *obj_id, *class_name, *class_type; + int ret; + + class_cfg = tplg_class_lookup(tplg_pp, obj); + if (!class_cfg) + return -EINVAL; + + /* find config for class attributes */ + ret = snd_config_search(class_cfg, "DefineAttribute", &args); + if (ret < 0) + return 0; + + if (snd_config_get_id(obj, &class_type) < 0) + return 0; + + if (snd_config_get_id(class_cfg, &class_name) < 0) + return 0; + + /* get obj cfg */ + obj_cfg = tplg_object_get_instance_config(tplg_pp, obj); + if (snd_config_get_id(obj_cfg, &obj_id) < 0) + return 0; + + /* copy and add attributes */ + snd_config_for_each(i, next, args) { + snd_config_t *attr; + const char *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (tplg_class_is_attribute_unique(id, class_cfg)) + continue; + + if (tplg_class_is_attribute_immutable(id, class_cfg)) + goto class; + + /* check if attribute value is set in the object */ + ret = snd_config_search(obj_cfg, id, &attr); + if (ret < 0) + goto class; + goto validate; +class: + /* search for attributes value in class */ + ret = tplg_object_copy_and_add_param(tplg_pp, obj_cfg, n, class_cfg); + if (ret == 1) { + if (tplg_class_is_attribute_immutable(id, class_cfg)) { + SNDERR("Immutable attribute %s not set in class %s\n", + id, class_name); + return -EINVAL; + } + goto parent; + } + else if (ret < 0) + return ret; + goto validate; +parent: + /* search for attribute value in parent */ + if (!parent) + goto parent_object; + + /* get parent obj cfg */ + parent_obj = tplg_object_get_instance_config(tplg_pp, parent); + if (!parent_obj) + goto parent_object; + + ret = tplg_object_copy_and_add_param(tplg_pp, obj_cfg, n, parent_obj); + if (ret == 1) + goto parent_object; + else if (ret < 0) + return ret; + goto validate; +parent_object: + if (!parent) + goto parent_class; + + cfg = tplg_object_lookup_in_config(tplg_pp, parent_obj, class_type, + class_name, obj_id); + if (!cfg) + goto parent_class; + + ret = tplg_object_copy_and_add_param(tplg_pp, obj_cfg, n, cfg); + if (ret == 1) + goto parent_class; + else if (ret < 0) + return ret; + goto validate; +parent_class: + if (!parent) + goto check; + + cfg = tplg_class_lookup(tplg_pp, parent); + if (!cfg) + return -EINVAL; + + cfg = tplg_object_lookup_in_config(tplg_pp, cfg, class_type, + class_name, obj_id); + if (!cfg) + goto check; + + ret = tplg_object_copy_and_add_param(tplg_pp, obj_cfg, n, cfg); + if (ret == 1) + goto check; + else if (ret < 0) + return ret; + goto validate; +check: + if (tplg_class_is_attribute_mandatory(id, class_cfg)) { + SNDERR("Mandatory attribute %s not set for class %s\n", id, class_name); + return -EINVAL; + } + continue; +validate: + if (!tplg_object_is_attribute_valid(tplg_pp, n, obj_cfg)) + return -EINVAL; + } + + return 0; +} + +static int tplg_object_pre_process_children(struct tplg_pre_processor *tplg_pp, + snd_config_t *parent, snd_config_t *cfg) +{ + snd_config_iterator_t i, next; + snd_config_t *children, *n; + int ret; + + ret = snd_config_search(cfg, "Object", &children); + if (ret < 0) + return 0; + + /* create all embedded objects */ + snd_config_for_each(i, next, children) { + const char *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + ret = tplg_pre_process_objects(tplg_pp, n, parent); + if (ret < 0) + return ret; + } + + return 0; +} + +static int tplg_construct_object_name(struct tplg_pre_processor *tplg_pp, snd_config_t *obj, + snd_config_t *class_cfg) +{ + snd_config_iterator_t i, next; + snd_config_t *args, *n; + const char *id, *class_id, *obj_id, *s; + char *new_name; + int ret; + + /* find config for class constructor attributes. Nothing to do if not defined */ + ret = snd_config_search(class_cfg, "attributes.constructor", &args); + if (ret < 0) + return 0; + + /* set class name as the name prefix for the object */ + if (snd_config_get_id(obj, &obj_id) < 0) + return -EINVAL; + if (snd_config_get_id(class_cfg, &class_id) < 0) + return -EINVAL; + new_name = strdup(class_id); + if (!new_name) + return -ENOMEM; + + /* iterate through all class arguments and set object name */ + snd_config_for_each(i, next, args) { + snd_config_t *arg; + char *arg_value, *temp; + + n = snd_config_iterator_entry(i); + + if (snd_config_get_id(n, &id) < 0) { + SNDERR("Invalid ID for constructor argument\n"); + ret = -EINVAL; + goto err; + } + + if (snd_config_get_string(n, &s) < 0) { + SNDERR("Invalid value for constructor argument\n"); + ret = -EINVAL; + goto err; + } + + /* find and replace with value set in object */ + ret = snd_config_search(obj, s, &arg); + if (ret < 0) { + SNDERR("Argument %s not set for object '%s.%s'\n", s, class_id, obj_id); + ret = -ENOENT; + goto err; + } + + /* concat arg value to object name. arg types must be either integer or string */ + switch (snd_config_get_type(arg)) { + case SND_CONFIG_TYPE_INTEGER: + { + long v; + ret = snd_config_get_integer(arg, &v); + assert(ret >= 0); + + arg_value = tplg_snprintf("%ld", v); + if (!arg_value) { + ret = -ENOMEM; + goto err; + } + break; + } + case SND_CONFIG_TYPE_STRING: + { + const char *s; + + ret = snd_config_get_string(arg, &s); + assert(ret >= 0); + + arg_value = strdup(s); + if (!arg_value) { + ret = -ENOMEM; + goto err; + } + break; + } + default: + SNDERR("Argument '%s' in object '%s.%s' is not an integer or a string\n", + s, class_id, obj_id); + ret = -EINVAL; + goto err; + } + + /* alloc and concat arg value to the name */ + temp = tplg_snprintf("%s.%s", new_name, arg_value); + free(arg_value); + if (!temp) { + ret = -ENOMEM; + goto err; + } + free(new_name); + new_name = temp; + } + + ret = snd_config_set_id(obj, new_name); +err: + free(new_name); + return ret; +} + +/* set the attribute value by type */ +static int tplg_set_attribute_value(snd_config_t *attr, const char *value) +{ + int err; + snd_config_type_t type = snd_config_get_type(attr); + + switch (type) { + case SND_CONFIG_TYPE_INTEGER: + { + long v; + + v = strtol(value, NULL, 10); + err = snd_config_set_integer(attr, v); + assert(err >= 0); + break; + } + case SND_CONFIG_TYPE_INTEGER64: + { + long long v; + + v = strtoll(value, NULL, 10); + err = snd_config_set_integer64(attr, v); + assert(err >= 0); + break; + } + case SND_CONFIG_TYPE_STRING: + { + err = snd_config_set_string(attr, value); + assert(err >= 0); + break; + } + default: + return -EINVAL; + } + + return 0; +} + + +/* + * Find the unique attribute in the class definition and set its value and type. + * Only string or integer types are allowed for unique values. + */ +static int tplg_object_set_unique_attribute(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj, snd_config_t *class_cfg, + const char *id) +{ + snd_config_t *unique_attr, *new; + const char *unique_name, *class_id; + int ret; + + if (snd_config_get_id(class_cfg, &class_id) < 0) + return 0; + + /* find config for class unique attribute */ + unique_name = tplg_class_get_unique_attribute_name(tplg_pp, class_cfg); + if (!unique_name) + return -ENOENT; + + /* find the unique attribute definition in the class */ + unique_attr = tplg_class_find_attribute_by_name(tplg_pp, class_cfg, unique_name); + if (!unique_attr) + return -ENOENT; + + /* override value if unique attribute is set in the object instance */ + ret = snd_config_search(obj, unique_name, &new); + if (ret < 0) { + ret = snd_config_make(&new, unique_name, + tplg_class_get_attribute_type(tplg_pp, unique_attr)); + if (ret < 0) { + SNDERR("error creating new attribute cfg for object %s\n", id); + return ret; + } + ret = snd_config_add(obj, new); + if (ret < 0) { + SNDERR("error adding new attribute cfg for object %s\n", id); + return ret; + } + } + + ret = tplg_set_attribute_value(new, id); + if (ret < 0) { + SNDERR("error setting unique attribute cfg for object %s\n", id); + return ret; + } + + return ret; +} + +/* + * Helper function to get object instance config which is 2 nodes down from class_type config. + * ex: Get the pointer to the config node with ID "0" from the input config Widget.pga.0 {} + */ +snd_config_t *tplg_object_get_instance_config(struct tplg_pre_processor *tplg_pp, + snd_config_t *class_type) +{ + snd_config_iterator_t first; + snd_config_t *cfg; + + first = snd_config_iterator_first(class_type); + cfg = snd_config_iterator_entry(first); + first = snd_config_iterator_first(cfg); + return snd_config_iterator_entry(first); +} + +/* build object config and its child objects recursively */ +static int tplg_build_object(struct tplg_pre_processor *tplg_pp, snd_config_t *new_obj, + snd_config_t *parent) +{ + snd_config_t *obj_local, *class_cfg; + const struct build_function_map *map; + build_func builder; + update_auto_attr_func auto_attr_updater; + const char *id, *class_id; + int ret; + + obj_local = tplg_object_get_instance_config(tplg_pp, new_obj); + if (!obj_local) + return -EINVAL; + + class_cfg = tplg_class_lookup(tplg_pp, new_obj); + if (!class_cfg) + return -EINVAL; + + if (snd_config_get_id(obj_local, &id) < 0) + return 0; + + if (snd_config_get_id(class_cfg, &class_id) < 0) + return 0; + + /* set unique attribute value */ + ret = tplg_object_set_unique_attribute(tplg_pp, obj_local, class_cfg, id); + if (ret < 0) { + SNDERR("error setting unique attribute value for '%s.%s'\n", class_id, id); + return ret; + } + + /* update object attributes and validate them */ + ret = tplg_object_update(tplg_pp, new_obj, parent); + if (ret < 0) { + SNDERR("Failed to update attributes for object '%s.%s'\n", class_id, id); + return ret; + } + + /* construct object name using class constructor */ + ret = tplg_construct_object_name(tplg_pp, obj_local, class_cfg); + if (ret < 0) { + SNDERR("Failed to construct object name for %s\n", id); + return ret; + } + + /* + * Build objects if object type is supported. + * If not, process object attributes and add to parent's data section + */ + map = tplg_object_get_map(tplg_pp, new_obj); + if (map) { + builder = map->builder; + + /* update automatic attribute for current object */ + auto_attr_updater = map->auto_attr_updater; + if(auto_attr_updater) { + ret = auto_attr_updater(tplg_pp, obj_local, parent); + if (ret < 0) { + SNDERR("Failed to update automatic attributes for %s\n", id); + return ret; + } + } + } else { + builder = &tplg_build_parent_data; + } + + ret = builder(tplg_pp, new_obj, parent); + if (ret < 0) + return ret; + + /* create child objects in the object instance */ + ret = tplg_object_pre_process_children(tplg_pp, new_obj, obj_local); + if (ret < 0) { + SNDERR("error processing child objects in object %s\n", id); + return ret; + } + + /* create child objects in the object's class definition */ + ret = tplg_object_pre_process_children(tplg_pp, new_obj, class_cfg); + if (ret < 0) + SNDERR("error processing child objects in class %s\n", class_id); + + return ret; +} + +/* create top-level topology objects */ +int tplg_pre_process_objects(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg, + snd_config_t *parent) +{ + snd_config_iterator_t i, next, i2, next2; + snd_config_t *n, *n2, *_obj_type, *_obj_class, *_obj; + const char *id, *class_type, *class_name; + int ret; + + if (snd_config_get_id(cfg, &class_type) < 0) + return 0; + + /* create all objects of the same type and class */ + snd_config_for_each(i, next, cfg) { + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &class_name) < 0) + continue; + snd_config_for_each(i2, next2, n) { + snd_config_t *temp_n2; + + n2 = snd_config_iterator_entry(i2); + if (snd_config_get_id(n2, &id) < 0) { + SNDERR("Invalid id for object\n"); + return -EINVAL; + } + + ret = snd_config_copy(&temp_n2, n2); + if (ret < 0) + return ret; + + /* + * An object declared within a class definition as follows: + * Class.Pipeline.volume-playback { + * Object.Widget.pga.0 { + * ramp_step_ms 250 + * } + * } + * + * While instantiating the volume-pipeline class, the pga object + * could be modified as follows: + * Object.Pipeline.volume-playback.0 { + * Object.Widget.pga.0 { + * format "s24le" + * } + * } + * When building the pga.0 object in the class definition, merge + * the attributes declared in the volume-playback.0 object to create + * a new config as follows to make sure that all attributes are + * set for the pga object. + * Object.Widget.pga.0 { + * ramp_step_ms 250 + * format "s24le" + * } + */ + + if (parent) { + snd_config_t *parent_instance, *parent_obj, *temp; + char *obj_cfg_name; + + obj_cfg_name = tplg_snprintf("%s%s.%s.%s", "Object.", + class_type, class_name, id); + + /* search for object instance in the parent */ + parent_instance = tplg_object_get_instance_config(tplg_pp, parent); + if (!parent_instance) + goto temp_cfg; + + ret = snd_config_search(parent_instance, obj_cfg_name, &parent_obj); + free(obj_cfg_name); + if (ret < 0) + goto temp_cfg; + + /* don't merge if the object configs are the same */ + if (parent_obj == n2) + goto temp_cfg; + + /* create a temp config copying the parent object config */ + ret = snd_config_copy(&temp, parent_obj); + if (ret < 0) { + snd_config_delete(temp_n2); + return ret; + } + + /* + * Merge parent object with the current object instance. + * temp will be deleted by merge + */ + ret = snd_config_merge(temp_n2, temp, false); + if (ret < 0) { + SNDERR("error merging parent object config for %s.%s.%s\n", + class_type, class_name, id); + snd_config_delete(temp_n2); + return ret; + } + } +temp_cfg: + /* create a temp config for object with class type as the root node */ + ret = snd_config_make(&_obj_type, class_type, SND_CONFIG_TYPE_COMPOUND); + if (ret < 0) { + snd_config_delete(temp_n2); + return ret; + } + + ret = snd_config_make(&_obj_class, class_name, SND_CONFIG_TYPE_COMPOUND); + if (ret < 0) + goto err; + + ret = snd_config_add(_obj_type, _obj_class); + if (ret < 0) { + snd_config_delete(_obj_class); + goto err; + } + + ret = snd_config_copy(&_obj, temp_n2); + if (ret < 0) + goto err; + + ret = snd_config_add(_obj_class, _obj); + if (ret < 0) { + snd_config_delete(_obj); + goto err; + } + + /* Build the object now */ + ret = tplg_build_object(tplg_pp, _obj_type, parent); + if (ret < 0) + SNDERR("Error building object %s.%s.%s\n", + class_type, class_name, id); +err: + snd_config_delete(temp_n2); + snd_config_delete(_obj_type); + if (ret < 0) + return ret; + } + } + + return 0; +} diff -Nru alsa-utils-1.2.2/topology/pre-processor.c alsa-utils-1.2.6/topology/pre-processor.c --- alsa-utils-1.2.2/topology/pre-processor.c 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/topology/pre-processor.c 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,588 @@ +/* + Copyright(c) 2021 Intel Corporation + All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of version 2 of the GNU General Public License as + published by the Free Software Foundation. + + 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, write to the Free Software + Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + The full GNU General Public License is included in this distribution + in the file called LICENSE.GPL. +*/ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include "gettext.h" +#include "topology.h" +#include "pre-processor.h" + +/* + * Helper function to find config by id. + * Topology2.0 object names are constructed with attribute values separated by '.'. + * So snd_config_search() cannot be used as it interprets the '.' as the node separator. + */ +snd_config_t *tplg_find_config(snd_config_t *config, const char *name) +{ + snd_config_iterator_t i, next; + snd_config_t *n; + const char *id; + + snd_config_for_each(i, next, config) { + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (!strcmp(id, name)) + return n; + } + + return NULL; +} + +/* make a new config and add it to parent */ +int tplg_config_make_add(snd_config_t **config, const char *id, snd_config_type_t type, + snd_config_t *parent) +{ + int ret; + + ret = snd_config_make(config, id, type); + if (ret < 0) + return ret; + + ret = snd_config_add(parent, *config); + if (ret < 0) + snd_config_delete(*config); + + return ret; +} + +/* + * The pre-processor will need to concat multiple strings separate by '.' to construct the object + * name and search for configs with ID's separated by '.'. + * This function helps concat input strings in the specified input format + */ +char *tplg_snprintf(char *fmt, ...) +{ + char *string; + int len = 1; + + va_list va; + + va_start(va, fmt); + len += vsnprintf(NULL, 0, fmt, va); + va_end(va); + + string = calloc(1, len); + if (!string) + return NULL; + + va_start(va, fmt); + vsnprintf(string, len, fmt, va); + va_end(va); + + return string; +} + +#ifdef TPLG_DEBUG +void tplg_pp_debug(char *fmt, ...) +{ + char msg[DEBUG_MAX_LENGTH]; + va_list va; + + va_start(va, fmt); + vsnprintf(msg, DEBUG_MAX_LENGTH, fmt, va); + va_end(va); + + fprintf(stdout, "%s\n", msg); +} + +void tplg_pp_config_debug(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg) +{ + snd_config_save(cfg, tplg_pp->dbg_output); +} +#else +void tplg_pp_debug(char *fmt, ...) {} +void tplg_pp_config_debug(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg){} +#endif + +static int pre_process_config(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg) +{ + snd_config_iterator_t i, next, i2, next2; + snd_config_t *n, *n2; + const char *id; + int err; + + if (snd_config_get_type(cfg) != SND_CONFIG_TYPE_COMPOUND) { + fprintf(stderr, "compound type expected at top level"); + return -EINVAL; + } + + /* parse topology objects */ + snd_config_for_each(i, next, cfg) { + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (strcmp(id, "Object")) + continue; + + if (snd_config_get_type(n) != SND_CONFIG_TYPE_COMPOUND) { + fprintf(stderr, "compound type expected for %s", id); + return -EINVAL; + } + + snd_config_for_each(i2, next2, n) { + n2 = snd_config_iterator_entry(i2); + + if (snd_config_get_id(n2, &id) < 0) + continue; + + if (snd_config_get_type(n2) != SND_CONFIG_TYPE_COMPOUND) { + fprintf(stderr, "compound type expected for %s", id); + return -EINVAL; + } + + /* pre-process Object instance. Top-level object have no parent */ + err = tplg_pre_process_objects(tplg_pp, n2, NULL); + if (err < 0) + return err; + } + } + + return 0; +} + +void free_pre_preprocessor(struct tplg_pre_processor *tplg_pp) +{ + snd_output_close(tplg_pp->output); + snd_output_close(tplg_pp->dbg_output); + snd_config_delete(tplg_pp->output_cfg); + free(tplg_pp); +} + +int init_pre_processor(struct tplg_pre_processor **tplg_pp, snd_output_type_t type, + const char *output_file) +{ + struct tplg_pre_processor *_tplg_pp; + int ret; + + _tplg_pp = calloc(1, sizeof(struct tplg_pre_processor)); + if (!_tplg_pp) + return -ENOMEM; + + *tplg_pp = _tplg_pp; + + /* create output top-level config node */ + ret = snd_config_top(&_tplg_pp->output_cfg); + if (ret < 0) + goto err; + + /* open output based on type */ + if (type == SND_OUTPUT_STDIO) { + ret = snd_output_stdio_open(&_tplg_pp->output, output_file, "w"); + if (ret < 0) { + fprintf(stderr, "failed to open file output\n"); + goto open_err; + } + } else { + ret = snd_output_buffer_open(&_tplg_pp->output); + if (ret < 0) { + fprintf(stderr, "failed to open buffer output\n"); + goto open_err; + } + } + + /* debug output */ + ret = snd_output_stdio_attach(&_tplg_pp->dbg_output, stdout, 0); + if (ret < 0) { + fprintf(stderr, "failed to open stdout output\n"); + goto out_close; + } + + return 0; +out_close: + snd_output_close(_tplg_pp->output); +open_err: + snd_config_delete(_tplg_pp->output_cfg); +err: + free(_tplg_pp); + return ret; +} + +#if SND_LIB_VER(1, 2, 5) < SND_LIB_VERSION +static int pre_process_defines(struct tplg_pre_processor *tplg_pp, const char *pre_processor_defs, + snd_config_t *top) +{ + snd_config_t *conf_defines, *defines; + int ret; + + ret = snd_config_search(tplg_pp->input_cfg, "Define", &conf_defines); + if (ret < 0) + return 0; + + if (snd_config_get_type(conf_defines) != SND_CONFIG_TYPE_COMPOUND) + return 0; + + /* + * load and merge the command line defines with the variables in the conf file to override + * default values + */ + if (pre_processor_defs != NULL) { + ret = snd_config_load_string(&defines, pre_processor_defs, strlen(pre_processor_defs)); + if (ret < 0) { + fprintf(stderr, "Failed to load pre-processor command line definitions\n"); + return ret; + } + + ret = snd_config_merge(conf_defines, defines, true); + if (ret < 0) { + fprintf(stderr, "Failed to override variable definitions\n"); + return ret; + } + } + + return 0; +} + +static int pre_process_variables_expand_fcn(snd_config_t **dst, const char *str, + void *private_data) +{ + struct tplg_pre_processor *tplg_pp = private_data; + snd_config_iterator_t i, next; + snd_config_t *conf_defines; + int ret; + + ret = snd_config_search(tplg_pp->input_cfg, "Define", &conf_defines); + if (ret < 0) + return 0; + + /* find variable definition */ + snd_config_for_each(i, next, conf_defines) { + snd_config_t *n; + const char *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + if (strcmp(id, str)) + continue; + + /* found definition. Match type and return appropriate config */ + if (snd_config_get_type(n) == SND_CONFIG_TYPE_STRING) { + const char *s; + + if (snd_config_get_string(n, &s) < 0) + continue; + + return snd_config_imake_string(dst, NULL, s); + } + + if (snd_config_get_type(n) == SND_CONFIG_TYPE_INTEGER) { + long v; + + if (snd_config_get_integer(n, &v) < 0) + continue; + + ret = snd_config_imake_integer(dst, NULL, v); + return ret; + } + + } + + fprintf(stderr, "No definition for variable %s\n", str); + + return -EINVAL; +} + +static int pre_process_includes(struct tplg_pre_processor *tplg_pp, snd_config_t *top, + const char *pre_processor_defs, const char *inc_path); + +static int pre_process_include_conf(struct tplg_pre_processor *tplg_pp, snd_config_t *config, + const char *pre_processor_defs, snd_config_t **new, + snd_config_t *variable, const char *inc_path) +{ + snd_config_iterator_t i, next; + const char *variable_name; + char *value; + int ret; + + if (snd_config_get_id(variable, &variable_name) < 0) + return 0; + + switch(snd_config_get_type(variable)) { + case SND_CONFIG_TYPE_STRING: + { + const char *s; + + if (snd_config_get_string(variable, &s) < 0) { + SNDERR("Invalid value for variable %s\n", variable_name); + return -EINVAL; + } + value = strdup(s); + if (!value) + return -ENOMEM; + break; + } + case SND_CONFIG_TYPE_INTEGER: + { + long v; + + ret = snd_config_get_integer(variable, &v); + if (ret < 0) { + SNDERR("Invalid value for variable %s\n", variable_name); + return ret; + } + + value = tplg_snprintf("%ld", v); + if (!value) + return -ENOMEM; + break; + } + default: + SNDERR("Invalid type for variable definition %s\n", variable_name); + return -EINVAL; + } + + /* create top-level config node */ + ret = snd_config_top(new); + if (ret < 0) { + SNDERR("failed to create top-level node for include conf %s\n", variable_name); + goto err; + } + + snd_config_for_each(i, next, config) { + snd_input_t *in; + snd_config_t *n; + regex_t regex; + const char *filename; + const char *id; + char *full_path; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + ret = regcomp(®ex, id, 0); + if (ret) { + fprintf(stderr, "Could not compile regex\n"); + goto err; + } + + /* Execute regular expression */ + ret = regexec(®ex, value, 0, NULL, REG_ICASE); + if (ret) + continue; + + /* regex matched. now include the conf file */ + ret = snd_config_get_string(n, &filename); + if (ret < 0) + goto err; + + if (filename && filename[0] != '/') + full_path = tplg_snprintf("%s/%s", inc_path, filename); + else + full_path = tplg_snprintf("%s", filename); + + ret = snd_input_stdio_open(&in, full_path, "r"); + if (ret < 0) { + fprintf(stderr, "Unable to open included conf file %s\n", full_path); + free(full_path); + goto err; + } + free(full_path); + + /* load config */ + ret = snd_config_load(*new, in); + snd_input_close(in); + if (ret < 0) { + fprintf(stderr, "Unable to load included configuration\n"); + goto err; + } + + /* process any args in the included file */ + ret = pre_process_defines(tplg_pp, pre_processor_defs, *new); + if (ret < 0) { + fprintf(stderr, "Failed to parse arguments in input config\n"); + goto err; + } + + /* recursively process any nested includes */ + return pre_process_includes(tplg_pp, *new, pre_processor_defs, inc_path); + } + +err: + free(value); + return ret; +} + +static int pre_process_includes(struct tplg_pre_processor *tplg_pp, snd_config_t *top, + const char *pre_processor_defs, const char *inc_path) +{ + snd_config_iterator_t i, next; + snd_config_t *includes, *conf_defines; + const char *top_id; + int ret; + + ret = snd_config_search(top, "IncludeByKey", &includes); + if (ret < 0) + return 0; + + snd_config_get_id(top, &top_id); + + ret = snd_config_search(tplg_pp->input_cfg, "Define", &conf_defines); + if (ret < 0) + return 0; + + snd_config_for_each(i, next, includes) { + snd_config_t *n, *new, *define; + const char *id; + + n = snd_config_iterator_entry(i); + if (snd_config_get_id(n, &id) < 0) + continue; + + /* find id from variable definitions */ + ret = snd_config_search(conf_defines, id, &define); + if (ret < 0) { + fprintf(stderr, "No variable defined for %s\n", id); + return ret; + } + + /* create conf node from included file */ + ret = pre_process_include_conf(tplg_pp, n, pre_processor_defs, &new, define, inc_path); + if (ret < 0) { + fprintf(stderr, "Unable to process include file \n"); + return ret; + } + + /* merge the included conf file with the top-level conf */ + ret = snd_config_merge(top, new, 0); + if (ret < 0) { + fprintf(stderr, "Failed to add included conf\n"); + return ret; + } + } + + /* remove all includes from current top */ + snd_config_remove(includes); + + return 0; +} + +static int pre_process_includes_all(struct tplg_pre_processor *tplg_pp, snd_config_t *top, + const char *pre_processor_defs, const char *inc_path) +{ + snd_config_iterator_t i, next; + int ret; + + if (snd_config_get_type(top) != SND_CONFIG_TYPE_COMPOUND) + return 0; + + /* process includes at this node */ + ret = pre_process_includes(tplg_pp, top, pre_processor_defs, inc_path); + if (ret < 0) { + fprintf(stderr, "Failed to process includes\n"); + return ret; + } + + /* process includes at all child nodes */ + snd_config_for_each(i, next, top) { + snd_config_t *n; + + n = snd_config_iterator_entry(i); + + ret = pre_process_includes_all(tplg_pp, n, pre_processor_defs, inc_path); + if (ret < 0) + return ret; + } + + return 0; +} +#endif /* version < 1.2.6 */ + +int pre_process(struct tplg_pre_processor *tplg_pp, char *config, size_t config_size, + const char *pre_processor_defs, const char *inc_path) +{ + snd_input_t *in; + snd_config_t *top; + int err; + + /* create input buffer */ + err = snd_input_buffer_open(&in, config, config_size); + if (err < 0) { + fprintf(stderr, "Unable to open input buffer\n"); + return err; + } + + /* create top-level config node */ + err = snd_config_top(&top); + if (err < 0) + goto input_close; + + /* load config */ + err = snd_config_load(top, in); + if (err < 0) { + fprintf(stderr, "Unable not load configuration\n"); + goto err; + } + + tplg_pp->input_cfg = top; + +#if SND_LIB_VER(1, 2, 5) < SND_LIB_VERSION + /* parse command line definitions */ + err = pre_process_defines(tplg_pp, pre_processor_defs, tplg_pp->input_cfg); + if (err < 0) { + fprintf(stderr, "Failed to parse arguments in input config\n"); + goto err; + } + + /* include conditional conf files */ + err = pre_process_includes_all(tplg_pp, tplg_pp->input_cfg, pre_processor_defs, inc_path); + if (err < 0) { + fprintf(stderr, "Failed to process conditional includes in input config\n"); + goto err; + } + + /* expand pre-processor variables */ + err = snd_config_expand_custom(tplg_pp->input_cfg, tplg_pp->input_cfg, pre_process_variables_expand_fcn, + tplg_pp, &tplg_pp->input_cfg); + if (err < 0) { + fprintf(stderr, "Failed to expand pre-processor definitions in input config\n"); + goto err; + } +#endif + + err = pre_process_config(tplg_pp, tplg_pp->input_cfg); + if (err < 0) { + fprintf(stderr, "Unable to pre-process configuration\n"); + goto err; + } + + /* save config to output */ + err = snd_config_save(tplg_pp->output_cfg, tplg_pp->output); + if (err < 0) + fprintf(stderr, "failed to save pre-processed output file\n"); + +err: + snd_config_delete(top); +input_close: + snd_input_close(in); + + return err; +} diff -Nru alsa-utils-1.2.2/topology/pre-processor.h alsa-utils-1.2.6/topology/pre-processor.h --- alsa-utils-1.2.2/topology/pre-processor.h 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/topology/pre-processor.h 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,120 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __PRE_PROCESSOR_H +#define __PRE_PROCESSOR_H + +#include +#include +#include +#include "topology.h" + +#define DEBUG_MAX_LENGTH 256 +#define ARRAY_SIZE(a) (sizeof (a) / sizeof (a)[0]) + +#define MAX_CONFIGS_IN_TEMPLATE 32 +struct config_template_items { + char *int_config_ids[MAX_CONFIGS_IN_TEMPLATE]; + char *string_config_ids[MAX_CONFIGS_IN_TEMPLATE]; + char *compound_config_ids[MAX_CONFIGS_IN_TEMPLATE]; +}; + +typedef int (*build_func)(struct tplg_pre_processor *tplg_pp, snd_config_t *obj, + snd_config_t *parent); + +typedef int (*update_auto_attr_func)(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj, snd_config_t *parent); + +struct build_function_map { + char *class_type; + char *class_name; + char *section_name; + build_func builder; + update_auto_attr_func auto_attr_updater; + const struct config_template_items *template_items; +}; + +extern const struct build_function_map object_build_map[]; + +/* debug helpers */ +void tplg_pp_debug(char *fmt, ...); +void tplg_pp_config_debug(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg); + +/* object build helpers */ +int tplg_build_object_from_template(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t **wtop, snd_config_t *top_config, + bool skip_name); +int tplg_build_tlv_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent); +int tplg_build_scale_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent); +int tplg_build_ops_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent); +int tplg_build_channel_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent); +int tplg_build_mixer_control(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent); +int tplg_build_bytes_control(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent); +int tplg_build_dapm_route_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent); +int tplg_build_hw_cfg_object(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj_cfg, snd_config_t *parent); +int tplg_build_fe_dai_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent); +int tplg_build_base_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *parent, bool skip_name); +int tplg_build_pcm_caps_object(struct tplg_pre_processor *tplg_pp, + snd_config_t *obj_cfg, snd_config_t *parent); +int tplg_parent_update(struct tplg_pre_processor *tplg_pp, snd_config_t *parent, + const char *section_name, const char *item_name); +int tplg_update_buffer_auto_attr(struct tplg_pre_processor *tplg_pp, + snd_config_t *buffer_cfg, snd_config_t *parent); +int tplg_add_object_data(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg, + snd_config_t *top, const char *array_name); + +/* object helpers */ +int tplg_pre_process_objects(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg, + snd_config_t *parent); +snd_config_t *tplg_object_get_instance_config(struct tplg_pre_processor *tplg_pp, + snd_config_t *class_type); +const char *tplg_object_get_name(struct tplg_pre_processor *tplg_pp, + snd_config_t *object); +snd_config_t *tplg_object_get_section(struct tplg_pre_processor *tplg_pp, snd_config_t *class); + +/* class helpers */ +snd_config_t *tplg_class_lookup(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg); +snd_config_t *tplg_class_find_attribute_by_name(struct tplg_pre_processor *tplg_pp, + snd_config_t *class, const char *name); +bool tplg_class_is_attribute_mandatory(const char *attr, snd_config_t *class_cfg); +bool tplg_class_is_attribute_immutable(const char *attr, snd_config_t *class_cfg); +bool tplg_class_is_attribute_unique(const char *attr, snd_config_t *class_cfg); +const char *tplg_class_get_unique_attribute_name(struct tplg_pre_processor *tplg_pp, + snd_config_t *class); +snd_config_type_t tplg_class_get_attribute_type(struct tplg_pre_processor *tplg_pp, + snd_config_t *attr); +const char *tplg_class_get_attribute_token_ref(struct tplg_pre_processor *tplg_pp, + snd_config_t *class, const char *attr_name); +long tplg_class_attribute_valid_tuple_value(struct tplg_pre_processor *tplg_pp, + snd_config_t *class, snd_config_t *attr); + +/* config helpers */ +snd_config_t *tplg_find_config(snd_config_t *config, const char *name); +int tplg_config_make_add(snd_config_t **config, const char *id, snd_config_type_t type, + snd_config_t *parent); + +char *tplg_snprintf(char *fmt, ...); +#endif diff -Nru alsa-utils-1.2.2/topology/topology.c alsa-utils-1.2.6/topology/topology.c --- alsa-utils-1.2.2/topology/topology.c 2020-02-19 12:02:10.000000000 +0000 +++ alsa-utils-1.2.6/topology/topology.c 2021-12-06 10:17:28.000000000 +0000 @@ -20,6 +20,7 @@ in the file called LICENSE.GPL. */ +#include #include #include #include @@ -35,6 +36,9 @@ #include #include "gettext.h" #include "version.h" +#include "topology.h" + +bool pre_process_config = false; static snd_output_t *log; @@ -45,11 +49,16 @@ "\n" "-h, --help help\n" "-c, --compile=FILE compile configuration file\n" +"-p, --pre-process pre-process Topology2.0 configuration file before compilation\n" +"-P, --pre-process=FILE pre-process Topology2.0 configuration file\n" "-d, --decode=FILE decode binary topology file\n" "-n, --normalize=FILE normalize configuration file\n" "-u, --dump=FILE dump (reparse) configuration file\n" "-v, --verbose=LEVEL set verbosity level (0...1)\n" "-o, --output=FILE set output file\n" +#if SND_LIB_VER(1, 2, 5) < SND_LIB_VERSION +"-D, --define=ARGS define variables (VAR1=VAL1[,VAR2=VAL2] ...)\n" +#endif "-s, --sort sort the identifiers in the normalized output\n" "-g, --group save configuration by group indexes\n" "-x, --nocheck save configuration without additional integrity checks\n" @@ -100,20 +109,18 @@ pos += r; size += 8*1024; buf2 = realloc(buf, size); - if (buf2 == NULL) { - free(buf); + if (buf2 == NULL) goto _nomem; - } buf = buf2; } - if (fd != fileno(stdin)) - close(fd); if (r < 0) { fprintf(stderr, _("Read error: %s\n"), strerror(-errno)); - free(buf); goto _err; } + if (fd != fileno(stdin)) + close(fd); + *dst = buf; *dst_size = pos; return 0; @@ -183,7 +190,9 @@ if (r < 0) { fprintf(stderr, _("Write error: %s\n"), strerror(-errno)); if (fd != fileno(stdout)) { - remove(fname); + if (fname && remove(fname)) + fprintf(stderr, _("Unable to remove file %s: %s\n"), + fname, strerror(-errno)); close(fd); } return 1; @@ -227,10 +236,53 @@ return err; } -static int compile(const char *source_file, const char *output_file, int cflags) +static char *get_inc_path(const char *filename) +{ + const char *s = strrchr(filename, '/'); + char *r = strdup(filename); + if (r && s) + r[s - filename] = '\0'; + return r; +} + +/* Convert Topology2.0 conf to the existing conf syntax */ +static int pre_process_conf(const char *source_file, const char *output_file, + const char *pre_processor_defs) { + struct tplg_pre_processor *tplg_pp; + size_t config_size; + char *config, *inc_path; + int err; + + err = load(source_file, (void **)&config, &config_size); + if (err) + return err; + + /* init pre-processor */ + err = init_pre_processor(&tplg_pp, SND_OUTPUT_STDIO, output_file); + if (err < 0) { + fprintf(stderr, _("failed to init pre-processor for Topology2.0\n")); + free(config); + return err; + } + + /* pre-process conf file */ + inc_path = get_inc_path(source_file); + err = pre_process(tplg_pp, config, config_size, pre_processor_defs, inc_path); + free(inc_path); + + /* free pre-processor */ + free_pre_preprocessor(tplg_pp); + free(config); + return err; +} + +static int compile(const char *source_file, const char *output_file, int cflags, + const char *pre_processor_defs) +{ + struct tplg_pre_processor *tplg_pp = NULL; snd_tplg_t *tplg; - char *config; + char *config, *inc_path; void *bin; size_t config_size, size; int err; @@ -238,7 +290,34 @@ err = load(source_file, (void **)&config, &config_size); if (err) return err; - err = load_topology(&tplg, config, config_size, cflags); + + /* pre-process before compiling */ + if (pre_process_config) { + char *pconfig; + size_t size; + + /* init pre-processor */ + init_pre_processor(&tplg_pp, SND_OUTPUT_BUFFER, NULL); + + /* pre-process conf file */ + inc_path = get_inc_path(source_file); + err = pre_process(tplg_pp, config, config_size, pre_processor_defs, inc_path); + free(inc_path); + if (err) { + free_pre_preprocessor(tplg_pp); + free(config); + return err; + } + + /* load topology */ + size = snd_output_buffer_string(tplg_pp->output, &pconfig); + err = load_topology(&tplg, pconfig, size, cflags); + + /* free pre-processor */ + free_pre_preprocessor(tplg_pp); + } else { + err = load_topology(&tplg, config, config_size, cflags); + } free(config); if (err) return err; @@ -292,15 +371,23 @@ int main(int argc, char *argv[]) { - static const char short_options[] = "hc:d:n:u:v:o:sgxzV"; + static const char short_options[] = "hc:d:n:u:v:o:pP:sgxzV" +#if SND_LIB_VER(1, 2, 5) < SND_LIB_VERSION + "D:" +#endif + ; static const struct option long_options[] = { {"help", 0, NULL, 'h'}, {"verbose", 1, NULL, 'v'}, {"compile", 1, NULL, 'c'}, + {"pre-process", 1, NULL, 'p'}, {"decode", 1, NULL, 'd'}, {"normalize", 1, NULL, 'n'}, {"dump", 1, NULL, 'u'}, {"output", 1, NULL, 'o'}, +#if SND_LIB_VER(1, 2, 5) < SND_LIB_VERSION + {"define", 1, NULL, 'D'}, +#endif {"sort", 0, NULL, 's'}, {"group", 0, NULL, 'g'}, {"nocheck", 0, NULL, 'x'}, @@ -310,6 +397,7 @@ }; char *source_file = NULL; char *output_file = NULL; + const char *pre_processor_defs = NULL; int c, err, op = 'c', cflags = 0, dflags = 0, sflags = 0, option_index; #ifdef ENABLE_NLS @@ -336,7 +424,7 @@ case 'n': case 'u': if (source_file) { - fprintf(stderr, _("Cannot combine operations (compile, normalize, dump)\n")); + fprintf(stderr, _("Cannot combine operations (compile, normalize, pre-process, dump)\n")); return 1; } source_file = optarg; @@ -348,12 +436,24 @@ case 's': sflags |= SND_TPLG_SAVE_SORT; break; + case 'P': + op = 'P'; + source_file = optarg; + break; + case 'p': + pre_process_config = true; + break; case 'g': sflags |= SND_TPLG_SAVE_GROUPS; break; case 'x': sflags |= SND_TPLG_SAVE_NOCHECK; break; +#if SND_LIB_VER(1, 2, 5) < SND_LIB_VERSION + case 'D': + pre_processor_defs = optarg; + break; +#endif case 'V': version(argv[0]); return 0; @@ -379,11 +479,14 @@ switch (op) { case 'c': - err = compile(source_file, output_file, cflags); + err = compile(source_file, output_file, cflags, pre_processor_defs); break; case 'd': err = decode(source_file, output_file, cflags, dflags, sflags); break; + case 'P': + err = pre_process_conf(source_file, output_file, pre_processor_defs); + break; default: err = dump(source_file, output_file, cflags, sflags); break; diff -Nru alsa-utils-1.2.2/topology/topology.h alsa-utils-1.2.6/topology/topology.h --- alsa-utils-1.2.2/topology/topology.h 1970-01-01 00:00:00.000000000 +0000 +++ alsa-utils-1.2.6/topology/topology.h 2021-12-06 10:17:28.000000000 +0000 @@ -0,0 +1,35 @@ +/* + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __TOPOLOGY_H +#define __TOPOLOGY_H + +#include + +/* pre_processor */ +struct tplg_pre_processor { + snd_config_t *input_cfg; + snd_config_t *output_cfg; + snd_output_t *output; + snd_output_t *dbg_output; +}; + +int pre_process(struct tplg_pre_processor *tplg_pp, char *config, size_t config_size, + const char *pre_processor_defs, const char *inc_path); +int init_pre_processor(struct tplg_pre_processor **tplg_pp, snd_output_type_t type, + const char *output_file); +void free_pre_preprocessor(struct tplg_pre_processor *tplg_pp); +#endif diff -Nru alsa-utils-1.2.2/utils/Makefile.in alsa-utils-1.2.6/utils/Makefile.in --- alsa-utils-1.2.2/utils/Makefile.in 2020-02-19 12:07:16.000000000 +0000 +++ alsa-utils-1.2.6/utils/Makefile.in 2021-12-06 11:44:45.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.1 from Makefile.am. +# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2018 Free Software Foundation, Inc. +# Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -90,7 +90,8 @@ subdir = utils ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ + $(top_srcdir)/m4/host-cpu-c-abi.m4 $(top_srcdir)/m4/iconv.m4 \ + $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/acinclude.m4 \ @@ -182,8 +183,8 @@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ -MSGFMT_015 = @MSGFMT_015@ MSGMERGE = @MSGMERGE@ +MSGMERGE_FOR_MSGFMT_OPTION = @MSGMERGE_FOR_MSGFMT_OPTION@ NCURSESW_CFLAGS = @NCURSESW_CFLAGS@ NCURSESW_LIBS = @NCURSESW_LIBS@ NCURSES_CFLAGS = @NCURSES_CFLAGS@ @@ -263,6 +264,7 @@ program_transform_name = @program_transform_name@ psdir = @psdir@ rst2man_available = @rst2man_available@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@