diff options
Diffstat (limited to 'external/poky/meta/recipes-multimedia')
130 files changed, 10097 insertions, 3419 deletions
diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-Fix-alsa-sound-.h-for-external-programs.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-Fix-alsa-sound-.h-for-external-programs.patch new file mode 100644 index 00000000..890650a7 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-Fix-alsa-sound-.h-for-external-programs.patch @@ -0,0 +1,7104 @@ +From ae564665ec261cf104de499b1cdda3564070fc65 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai <tiwai@suse.de> +Date: Fri, 20 Dec 2019 15:46:48 +0100 +Subject: [PATCH] Fix alsa/sound/*.h for external programs + +The recent update of sound/*.h to sync with the latest Linus uapi +files broke the build of alsa-tools programs. These files used to be +a modified version of Linux sound/* header files, so that they could +be built without Linux headers. The special prefix like __user and +other things were worked around there. + +We may do that again, but a better approach is to fix those things in +Linux kernel uapi side, while we keep the minimal workaround in +alsa-lib such as the __u16 and co type definitions. + +This patch is such an attempt, namely: +- Keep the original $LINUX/uapi/sound/*.h in include/sound/uapi + directory +- The "fixes" are applied to some uapi headers, so that they don't + contain Linux-specific prefix and use of opaque struct like + snd_ctl_elem_id +- The uapi headers are included indirectly from include/sound/*.h +- Some headers have inclusion of type_compat.h for the Linux variable + types and prefixes +- type_compat.h tries to use <linux/types.h> when __linux__ is + defined, instead of the own conflicting definitions + +The last type might need a bit more adjustment depending on the +compiler, but it can be fixed locally without disturbing else. + +Signed-off-by: Takashi Iwai <tiwai@suse.de> + +Upstream-Status: Backport + +Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> + +--- + configure.ac | 3 +- + include/sound/Makefile.am | 6 +- + include/sound/asequencer.h | 613 +---------------- + include/sound/asoc.h | 634 +----------------- + include/sound/asound.h | 1039 +---------------------------- + include/sound/asound_fm.h | 136 +--- + include/sound/emu10k1.h | 383 +---------- + include/sound/hdsp.h | 113 +--- + include/sound/hdspm.h | 234 +------ + include/sound/sb16_csp.h | 124 +--- + include/sound/sscape_ioctl.h | 22 +- + include/sound/tlv.h | 118 +--- + include/sound/type_compat.h | 13 + + include/sound/uapi/Makefile.am | 6 + + include/sound/uapi/asequencer.h | 612 +++++++++++++++++ + include/sound/uapi/asoc.h | 633 ++++++++++++++++++ + include/sound/uapi/asound.h | 1038 ++++++++++++++++++++++++++++ + include/sound/uapi/asound_fm.h | 135 ++++ + include/sound/uapi/emu10k1.h | 395 +++++++++++ + include/sound/uapi/hdsp.h | 109 +++ + include/sound/uapi/hdspm.h | 230 +++++++ + include/sound/uapi/sb16_csp.h | 123 ++++ + include/sound/uapi/sscape_ioctl.h | 21 + + include/sound/uapi/tlv.h | 117 ++++ + src/topology/tplg_local.h | 3 +- + 25 files changed, 3452 insertions(+), 3408 deletions(-) + create mode 100644 include/sound/uapi/Makefile.am + create mode 100644 include/sound/uapi/asequencer.h + create mode 100644 include/sound/uapi/asoc.h + create mode 100644 include/sound/uapi/asound.h + create mode 100644 include/sound/uapi/asound_fm.h + create mode 100644 include/sound/uapi/emu10k1.h + create mode 100644 include/sound/uapi/hdsp.h + create mode 100644 include/sound/uapi/hdspm.h + create mode 100644 include/sound/uapi/sb16_csp.h + create mode 100644 include/sound/uapi/sscape_ioctl.h + create mode 100644 include/sound/uapi/tlv.h + +diff --git a/configure.ac b/configure.ac +index 119ef600..886f87bc 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -707,7 +707,8 @@ if test ! -L "$srcdir"/include/alsa ; then + fi + + AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \ +- include/Makefile include/sound/Makefile src/Versions src/Makefile \ ++ include/Makefile include/sound/Makefile include/sound/uapi/Makefile \ ++ src/Versions src/Makefile \ + src/control/Makefile src/mixer/Makefile \ + src/pcm/Makefile src/pcm/scopes/Makefile \ + src/rawmidi/Makefile src/timer/Makefile \ +diff --git a/include/sound/Makefile.am b/include/sound/Makefile.am +index 99c42211..ccc7d273 100644 +--- a/include/sound/Makefile.am ++++ b/include/sound/Makefile.am +@@ -1,7 +1,9 @@ ++SUBDIRS = uapi ++ + alsasoundincludedir = ${includedir}/alsa/sound + + alsasoundinclude_HEADERS = asound_fm.h hdsp.h hdspm.h sb16_csp.h \ +- sscape_ioctl.h emu10k1.h type_compat.h \ +- asoc.h tlv.h ++ sscape_ioctl.h emu10k1.h asoc.h tlv.h \ ++ type_compat.h + + noinst_HEADERS = asound.h asequencer.h +diff --git a/include/sound/asequencer.h b/include/sound/asequencer.h +index a75e14ed..e539a77e 100644 +--- a/include/sound/asequencer.h ++++ b/include/sound/asequencer.h +@@ -1,612 +1 @@ +-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +-/* +- * Main header file for the ALSA sequencer +- * Copyright (c) 1998-1999 by Frank van de Pol <fvdpol@coil.demon.nl> +- * (c) 1998-1999 by Jaroslav Kysela <perex@perex.cz> +- * +- * +- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * +- */ +-#ifndef _UAPI__SOUND_ASEQUENCER_H +-#define _UAPI__SOUND_ASEQUENCER_H +- +-#include <sound/asound.h> +- +-/** version of the sequencer */ +-#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2) +- +-/** +- * definition of sequencer event types +- */ +- +-/** system messages +- * event data type = #snd_seq_result +- */ +-#define SNDRV_SEQ_EVENT_SYSTEM 0 +-#define SNDRV_SEQ_EVENT_RESULT 1 +- +-/** note messages (channel specific) +- * event data type = #snd_seq_ev_note +- */ +-#define SNDRV_SEQ_EVENT_NOTE 5 +-#define SNDRV_SEQ_EVENT_NOTEON 6 +-#define SNDRV_SEQ_EVENT_NOTEOFF 7 +-#define SNDRV_SEQ_EVENT_KEYPRESS 8 +- +-/** control messages (channel specific) +- * event data type = #snd_seq_ev_ctrl +- */ +-#define SNDRV_SEQ_EVENT_CONTROLLER 10 +-#define SNDRV_SEQ_EVENT_PGMCHANGE 11 +-#define SNDRV_SEQ_EVENT_CHANPRESS 12 +-#define SNDRV_SEQ_EVENT_PITCHBEND 13 /**< from -8192 to 8191 */ +-#define SNDRV_SEQ_EVENT_CONTROL14 14 /**< 14 bit controller value */ +-#define SNDRV_SEQ_EVENT_NONREGPARAM 15 /**< 14 bit NRPN address + 14 bit unsigned value */ +-#define SNDRV_SEQ_EVENT_REGPARAM 16 /**< 14 bit RPN address + 14 bit unsigned value */ +- +-/** synchronisation messages +- * event data type = #snd_seq_ev_ctrl +- */ +-#define SNDRV_SEQ_EVENT_SONGPOS 20 /* Song Position Pointer with LSB and MSB values */ +-#define SNDRV_SEQ_EVENT_SONGSEL 21 /* Song Select with song ID number */ +-#define SNDRV_SEQ_EVENT_QFRAME 22 /* midi time code quarter frame */ +-#define SNDRV_SEQ_EVENT_TIMESIGN 23 /* SMF Time Signature event */ +-#define SNDRV_SEQ_EVENT_KEYSIGN 24 /* SMF Key Signature event */ +- +-/** timer messages +- * event data type = snd_seq_ev_queue_control +- */ +-#define SNDRV_SEQ_EVENT_START 30 /* midi Real Time Start message */ +-#define SNDRV_SEQ_EVENT_CONTINUE 31 /* midi Real Time Continue message */ +-#define SNDRV_SEQ_EVENT_STOP 32 /* midi Real Time Stop message */ +-#define SNDRV_SEQ_EVENT_SETPOS_TICK 33 /* set tick queue position */ +-#define SNDRV_SEQ_EVENT_SETPOS_TIME 34 /* set realtime queue position */ +-#define SNDRV_SEQ_EVENT_TEMPO 35 /* (SMF) Tempo event */ +-#define SNDRV_SEQ_EVENT_CLOCK 36 /* midi Real Time Clock message */ +-#define SNDRV_SEQ_EVENT_TICK 37 /* midi Real Time Tick message */ +-#define SNDRV_SEQ_EVENT_QUEUE_SKEW 38 /* skew queue tempo */ +- +-/** others +- * event data type = none +- */ +-#define SNDRV_SEQ_EVENT_TUNE_REQUEST 40 /* tune request */ +-#define SNDRV_SEQ_EVENT_RESET 41 /* reset to power-on state */ +-#define SNDRV_SEQ_EVENT_SENSING 42 /* "active sensing" event */ +- +-/** echo back, kernel private messages +- * event data type = any type +- */ +-#define SNDRV_SEQ_EVENT_ECHO 50 /* echo event */ +-#define SNDRV_SEQ_EVENT_OSS 51 /* OSS raw event */ +- +-/** system status messages (broadcast for subscribers) +- * event data type = snd_seq_addr +- */ +-#define SNDRV_SEQ_EVENT_CLIENT_START 60 /* new client has connected */ +-#define SNDRV_SEQ_EVENT_CLIENT_EXIT 61 /* client has left the system */ +-#define SNDRV_SEQ_EVENT_CLIENT_CHANGE 62 /* client status/info has changed */ +-#define SNDRV_SEQ_EVENT_PORT_START 63 /* new port was created */ +-#define SNDRV_SEQ_EVENT_PORT_EXIT 64 /* port was deleted from system */ +-#define SNDRV_SEQ_EVENT_PORT_CHANGE 65 /* port status/info has changed */ +- +-/** port connection changes +- * event data type = snd_seq_connect +- */ +-#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66 /* ports connected */ +-#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67 /* ports disconnected */ +- +-/* 70-89: synthesizer events - obsoleted */ +- +-/** user-defined events with fixed length +- * event data type = any +- */ +-#define SNDRV_SEQ_EVENT_USR0 90 +-#define SNDRV_SEQ_EVENT_USR1 91 +-#define SNDRV_SEQ_EVENT_USR2 92 +-#define SNDRV_SEQ_EVENT_USR3 93 +-#define SNDRV_SEQ_EVENT_USR4 94 +-#define SNDRV_SEQ_EVENT_USR5 95 +-#define SNDRV_SEQ_EVENT_USR6 96 +-#define SNDRV_SEQ_EVENT_USR7 97 +-#define SNDRV_SEQ_EVENT_USR8 98 +-#define SNDRV_SEQ_EVENT_USR9 99 +- +-/* 100-118: instrument layer - obsoleted */ +-/* 119-129: reserved */ +- +-/* 130-139: variable length events +- * event data type = snd_seq_ev_ext +- * (SNDRV_SEQ_EVENT_LENGTH_VARIABLE must be set) +- */ +-#define SNDRV_SEQ_EVENT_SYSEX 130 /* system exclusive data (variable length) */ +-#define SNDRV_SEQ_EVENT_BOUNCE 131 /* error event */ +-/* 132-134: reserved */ +-#define SNDRV_SEQ_EVENT_USR_VAR0 135 +-#define SNDRV_SEQ_EVENT_USR_VAR1 136 +-#define SNDRV_SEQ_EVENT_USR_VAR2 137 +-#define SNDRV_SEQ_EVENT_USR_VAR3 138 +-#define SNDRV_SEQ_EVENT_USR_VAR4 139 +- +-/* 150-151: kernel events with quote - DO NOT use in user clients */ +-#define SNDRV_SEQ_EVENT_KERNEL_ERROR 150 +-#define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151 /* obsolete */ +- +-/* 152-191: reserved */ +- +-/* 192-254: hardware specific events */ +- +-/* 255: special event */ +-#define SNDRV_SEQ_EVENT_NONE 255 +- +- +-typedef unsigned char snd_seq_event_type_t; +- +-/** event address */ +-struct snd_seq_addr { +- unsigned char client; /**< Client number: 0..255, 255 = broadcast to all clients */ +- unsigned char port; /**< Port within client: 0..255, 255 = broadcast to all ports */ +-}; +- +-/** port connection */ +-struct snd_seq_connect { +- struct snd_seq_addr sender; +- struct snd_seq_addr dest; +-}; +- +- +-#define SNDRV_SEQ_ADDRESS_UNKNOWN 253 /* unknown source */ +-#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS 254 /* send event to all subscribed ports */ +-#define SNDRV_SEQ_ADDRESS_BROADCAST 255 /* send event to all queues/clients/ports/channels */ +-#define SNDRV_SEQ_QUEUE_DIRECT 253 /* direct dispatch */ +- +- /* event mode flag - NOTE: only 8 bits available! */ +-#define SNDRV_SEQ_TIME_STAMP_TICK (0<<0) /* timestamp in clock ticks */ +-#define SNDRV_SEQ_TIME_STAMP_REAL (1<<0) /* timestamp in real time */ +-#define SNDRV_SEQ_TIME_STAMP_MASK (1<<0) +- +-#define SNDRV_SEQ_TIME_MODE_ABS (0<<1) /* absolute timestamp */ +-#define SNDRV_SEQ_TIME_MODE_REL (1<<1) /* relative to current time */ +-#define SNDRV_SEQ_TIME_MODE_MASK (1<<1) +- +-#define SNDRV_SEQ_EVENT_LENGTH_FIXED (0<<2) /* fixed event size */ +-#define SNDRV_SEQ_EVENT_LENGTH_VARIABLE (1<<2) /* variable event size */ +-#define SNDRV_SEQ_EVENT_LENGTH_VARUSR (2<<2) /* variable event size - user memory space */ +-#define SNDRV_SEQ_EVENT_LENGTH_MASK (3<<2) +- +-#define SNDRV_SEQ_PRIORITY_NORMAL (0<<4) /* normal priority */ +-#define SNDRV_SEQ_PRIORITY_HIGH (1<<4) /* event should be processed before others */ +-#define SNDRV_SEQ_PRIORITY_MASK (1<<4) +- +- +- /* note event */ +-struct snd_seq_ev_note { +- unsigned char channel; +- unsigned char note; +- unsigned char velocity; +- unsigned char off_velocity; /* only for SNDRV_SEQ_EVENT_NOTE */ +- unsigned int duration; /* only for SNDRV_SEQ_EVENT_NOTE */ +-}; +- +- /* controller event */ +-struct snd_seq_ev_ctrl { +- unsigned char channel; +- unsigned char unused1, unused2, unused3; /* pad */ +- unsigned int param; +- signed int value; +-}; +- +- /* generic set of bytes (12x8 bit) */ +-struct snd_seq_ev_raw8 { +- unsigned char d[12]; /* 8 bit value */ +-}; +- +- /* generic set of integers (3x32 bit) */ +-struct snd_seq_ev_raw32 { +- unsigned int d[3]; /* 32 bit value */ +-}; +- +- /* external stored data */ +-struct snd_seq_ev_ext { +- unsigned int len; /* length of data */ +- void *ptr; /* pointer to data (note: maybe 64-bit) */ +-} __attribute__((packed)); +- +-struct snd_seq_result { +- int event; /* processed event type */ +- int result; +-}; +- +- +-struct snd_seq_real_time { +- unsigned int tv_sec; /* seconds */ +- unsigned int tv_nsec; /* nanoseconds */ +-}; +- +-typedef unsigned int snd_seq_tick_time_t; /* midi ticks */ +- +-union snd_seq_timestamp { +- snd_seq_tick_time_t tick; +- struct snd_seq_real_time time; +-}; +- +-struct snd_seq_queue_skew { +- unsigned int value; +- unsigned int base; +-}; +- +- /* queue timer control */ +-struct snd_seq_ev_queue_control { +- unsigned char queue; /* affected queue */ +- unsigned char pad[3]; /* reserved */ +- union { +- signed int value; /* affected value (e.g. tempo) */ +- union snd_seq_timestamp time; /* time */ +- unsigned int position; /* sync position */ +- struct snd_seq_queue_skew skew; +- unsigned int d32[2]; +- unsigned char d8[8]; +- } param; +-}; +- +- /* quoted event - inside the kernel only */ +-struct snd_seq_ev_quote { +- struct snd_seq_addr origin; /* original sender */ +- unsigned short value; /* optional data */ +- struct snd_seq_event *event; /* quoted event */ +-} __attribute__((packed)); +- +- +- /* sequencer event */ +-struct snd_seq_event { +- snd_seq_event_type_t type; /* event type */ +- unsigned char flags; /* event flags */ +- char tag; +- +- unsigned char queue; /* schedule queue */ +- union snd_seq_timestamp time; /* schedule time */ +- +- +- struct snd_seq_addr source; /* source address */ +- struct snd_seq_addr dest; /* destination address */ +- +- union { /* event data... */ +- struct snd_seq_ev_note note; +- struct snd_seq_ev_ctrl control; +- struct snd_seq_ev_raw8 raw8; +- struct snd_seq_ev_raw32 raw32; +- struct snd_seq_ev_ext ext; +- struct snd_seq_ev_queue_control queue; +- union snd_seq_timestamp time; +- struct snd_seq_addr addr; +- struct snd_seq_connect connect; +- struct snd_seq_result result; +- struct snd_seq_ev_quote quote; +- } data; +-}; +- +- +-/* +- * bounce event - stored as variable size data +- */ +-struct snd_seq_event_bounce { +- int err; +- struct snd_seq_event event; +- /* external data follows here. */ +-}; +- +- +- /* system information */ +-struct snd_seq_system_info { +- int queues; /* maximum queues count */ +- int clients; /* maximum clients count */ +- int ports; /* maximum ports per client */ +- int channels; /* maximum channels per port */ +- int cur_clients; /* current clients */ +- int cur_queues; /* current queues */ +- char reserved[24]; +-}; +- +- +- /* system running information */ +-struct snd_seq_running_info { +- unsigned char client; /* client id */ +- unsigned char big_endian; /* 1 = big-endian */ +- unsigned char cpu_mode; /* 4 = 32bit, 8 = 64bit */ +- unsigned char pad; /* reserved */ +- unsigned char reserved[12]; +-}; +- +- +- /* known client numbers */ +-#define SNDRV_SEQ_CLIENT_SYSTEM 0 +- /* internal client numbers */ +-#define SNDRV_SEQ_CLIENT_DUMMY 14 /* midi through */ +-#define SNDRV_SEQ_CLIENT_OSS 15 /* oss sequencer emulator */ +- +- +- /* client types */ +-typedef int __bitwise snd_seq_client_type_t; +-#define NO_CLIENT ((__force snd_seq_client_type_t) 0) +-#define USER_CLIENT ((__force snd_seq_client_type_t) 1) +-#define KERNEL_CLIENT ((__force snd_seq_client_type_t) 2) +- +- /* event filter flags */ +-#define SNDRV_SEQ_FILTER_BROADCAST (1<<0) /* accept broadcast messages */ +-#define SNDRV_SEQ_FILTER_MULTICAST (1<<1) /* accept multicast messages */ +-#define SNDRV_SEQ_FILTER_BOUNCE (1<<2) /* accept bounce event in error */ +-#define SNDRV_SEQ_FILTER_USE_EVENT (1<<31) /* use event filter */ +- +-struct snd_seq_client_info { +- int client; /* client number to inquire */ +- snd_seq_client_type_t type; /* client type */ +- char name[64]; /* client name */ +- unsigned int filter; /* filter flags */ +- unsigned char multicast_filter[8]; /* multicast filter bitmap */ +- unsigned char event_filter[32]; /* event filter bitmap */ +- int num_ports; /* RO: number of ports */ +- int event_lost; /* number of lost events */ +- int card; /* RO: card number[kernel] */ +- int pid; /* RO: pid[user] */ +- char reserved[56]; /* for future use */ +-}; +- +- +-/* client pool size */ +-struct snd_seq_client_pool { +- int client; /* client number to inquire */ +- int output_pool; /* outgoing (write) pool size */ +- int input_pool; /* incoming (read) pool size */ +- int output_room; /* minimum free pool size for select/blocking mode */ +- int output_free; /* unused size */ +- int input_free; /* unused size */ +- char reserved[64]; +-}; +- +- +-/* Remove events by specified criteria */ +- +-#define SNDRV_SEQ_REMOVE_INPUT (1<<0) /* Flush input queues */ +-#define SNDRV_SEQ_REMOVE_OUTPUT (1<<1) /* Flush output queues */ +-#define SNDRV_SEQ_REMOVE_DEST (1<<2) /* Restrict by destination q:client:port */ +-#define SNDRV_SEQ_REMOVE_DEST_CHANNEL (1<<3) /* Restrict by channel */ +-#define SNDRV_SEQ_REMOVE_TIME_BEFORE (1<<4) /* Restrict to before time */ +-#define SNDRV_SEQ_REMOVE_TIME_AFTER (1<<5) /* Restrict to time or after */ +-#define SNDRV_SEQ_REMOVE_TIME_TICK (1<<6) /* Time is in ticks */ +-#define SNDRV_SEQ_REMOVE_EVENT_TYPE (1<<7) /* Restrict to event type */ +-#define SNDRV_SEQ_REMOVE_IGNORE_OFF (1<<8) /* Do not flush off events */ +-#define SNDRV_SEQ_REMOVE_TAG_MATCH (1<<9) /* Restrict to events with given tag */ +- +-struct snd_seq_remove_events { +- unsigned int remove_mode; /* Flags that determine what gets removed */ +- +- union snd_seq_timestamp time; +- +- unsigned char queue; /* Queue for REMOVE_DEST */ +- struct snd_seq_addr dest; /* Address for REMOVE_DEST */ +- unsigned char channel; /* Channel for REMOVE_DEST */ +- +- int type; /* For REMOVE_EVENT_TYPE */ +- char tag; /* Tag for REMOVE_TAG */ +- +- int reserved[10]; /* To allow for future binary compatibility */ +- +-}; +- +- +- /* known port numbers */ +-#define SNDRV_SEQ_PORT_SYSTEM_TIMER 0 +-#define SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE 1 +- +- /* port capabilities (32 bits) */ +-#define SNDRV_SEQ_PORT_CAP_READ (1<<0) /* readable from this port */ +-#define SNDRV_SEQ_PORT_CAP_WRITE (1<<1) /* writable to this port */ +- +-#define SNDRV_SEQ_PORT_CAP_SYNC_READ (1<<2) +-#define SNDRV_SEQ_PORT_CAP_SYNC_WRITE (1<<3) +- +-#define SNDRV_SEQ_PORT_CAP_DUPLEX (1<<4) +- +-#define SNDRV_SEQ_PORT_CAP_SUBS_READ (1<<5) /* allow read subscription */ +-#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1<<6) /* allow write subscription */ +-#define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1<<7) /* routing not allowed */ +- +- /* port type */ +-#define SNDRV_SEQ_PORT_TYPE_SPECIFIC (1<<0) /* hardware specific */ +-#define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1<<1) /* generic MIDI device */ +-#define SNDRV_SEQ_PORT_TYPE_MIDI_GM (1<<2) /* General MIDI compatible device */ +-#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1<<3) /* GS compatible device */ +-#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1<<4) /* XG compatible device */ +-#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1<<5) /* MT-32 compatible device */ +-#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 (1<<6) /* General MIDI 2 compatible device */ +- +-/* other standards...*/ +-#define SNDRV_SEQ_PORT_TYPE_SYNTH (1<<10) /* Synth device (no MIDI compatible - direct wavetable) */ +-#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /* Sampling device (support sample download) */ +-#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12) /* Sampling device (sample can be downloaded at any time) */ +-/*...*/ +-#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1<<16) /* driver for a hardware device */ +-#define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1<<17) /* implemented in software */ +-#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1<<18) /* generates sound */ +-#define SNDRV_SEQ_PORT_TYPE_PORT (1<<19) /* connects to other device(s) */ +-#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */ +- +-/* misc. conditioning flags */ +-#define SNDRV_SEQ_PORT_FLG_GIVEN_PORT (1<<0) +-#define SNDRV_SEQ_PORT_FLG_TIMESTAMP (1<<1) +-#define SNDRV_SEQ_PORT_FLG_TIME_REAL (1<<2) +- +-struct snd_seq_port_info { +- struct snd_seq_addr addr; /* client/port numbers */ +- char name[64]; /* port name */ +- +- unsigned int capability; /* port capability bits */ +- unsigned int type; /* port type bits */ +- int midi_channels; /* channels per MIDI port */ +- int midi_voices; /* voices per MIDI port */ +- int synth_voices; /* voices per SYNTH port */ +- +- int read_use; /* R/O: subscribers for output (from this port) */ +- int write_use; /* R/O: subscribers for input (to this port) */ +- +- void *kernel; /* reserved for kernel use (must be NULL) */ +- unsigned int flags; /* misc. conditioning */ +- unsigned char time_queue; /* queue # for timestamping */ +- char reserved[59]; /* for future use */ +-}; +- +- +-/* queue flags */ +-#define SNDRV_SEQ_QUEUE_FLG_SYNC (1<<0) /* sync enabled */ +- +-/* queue information */ +-struct snd_seq_queue_info { +- int queue; /* queue id */ +- +- /* +- * security settings, only owner of this queue can start/stop timer +- * etc. if the queue is locked for other clients +- */ +- int owner; /* client id for owner of the queue */ +- unsigned locked:1; /* timing queue locked for other queues */ +- char name[64]; /* name of this queue */ +- unsigned int flags; /* flags */ +- char reserved[60]; /* for future use */ +- +-}; +- +-/* queue info/status */ +-struct snd_seq_queue_status { +- int queue; /* queue id */ +- int events; /* read-only - queue size */ +- snd_seq_tick_time_t tick; /* current tick */ +- struct snd_seq_real_time time; /* current time */ +- int running; /* running state of queue */ +- int flags; /* various flags */ +- char reserved[64]; /* for the future */ +-}; +- +- +-/* queue tempo */ +-struct snd_seq_queue_tempo { +- int queue; /* sequencer queue */ +- unsigned int tempo; /* current tempo, us/tick */ +- int ppq; /* time resolution, ticks/quarter */ +- unsigned int skew_value; /* queue skew */ +- unsigned int skew_base; /* queue skew base */ +- char reserved[24]; /* for the future */ +-}; +- +- +-/* sequencer timer sources */ +-#define SNDRV_SEQ_TIMER_ALSA 0 /* ALSA timer */ +-#define SNDRV_SEQ_TIMER_MIDI_CLOCK 1 /* Midi Clock (CLOCK event) */ +-#define SNDRV_SEQ_TIMER_MIDI_TICK 2 /* Midi Timer Tick (TICK event) */ +- +-/* queue timer info */ +-struct snd_seq_queue_timer { +- int queue; /* sequencer queue */ +- int type; /* source timer type */ +- union { +- struct { +- struct snd_timer_id id; /* ALSA's timer ID */ +- unsigned int resolution; /* resolution in Hz */ +- } alsa; +- } u; +- char reserved[64]; /* for the future use */ +-}; +- +- +-struct snd_seq_queue_client { +- int queue; /* sequencer queue */ +- int client; /* sequencer client */ +- int used; /* queue is used with this client +- (must be set for accepting events) */ +- /* per client watermarks */ +- char reserved[64]; /* for future use */ +-}; +- +- +-#define SNDRV_SEQ_PORT_SUBS_EXCLUSIVE (1<<0) /* exclusive connection */ +-#define SNDRV_SEQ_PORT_SUBS_TIMESTAMP (1<<1) +-#define SNDRV_SEQ_PORT_SUBS_TIME_REAL (1<<2) +- +-struct snd_seq_port_subscribe { +- struct snd_seq_addr sender; /* sender address */ +- struct snd_seq_addr dest; /* destination address */ +- unsigned int voices; /* number of voices to be allocated (0 = don't care) */ +- unsigned int flags; /* modes */ +- unsigned char queue; /* input time-stamp queue (optional) */ +- unsigned char pad[3]; /* reserved */ +- char reserved[64]; +-}; +- +-/* type of query subscription */ +-#define SNDRV_SEQ_QUERY_SUBS_READ 0 +-#define SNDRV_SEQ_QUERY_SUBS_WRITE 1 +- +-struct snd_seq_query_subs { +- struct snd_seq_addr root; /* client/port id to be searched */ +- int type; /* READ or WRITE */ +- int index; /* 0..N-1 */ +- int num_subs; /* R/O: number of subscriptions on this port */ +- struct snd_seq_addr addr; /* R/O: result */ +- unsigned char queue; /* R/O: result */ +- unsigned int flags; /* R/O: result */ +- char reserved[64]; /* for future use */ +-}; +- +- +-/* +- * IOCTL commands +- */ +- +-#define SNDRV_SEQ_IOCTL_PVERSION _IOR ('S', 0x00, int) +-#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR ('S', 0x01, int) +-#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info) +-#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct snd_seq_running_info) +- +-#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct snd_seq_client_info) +-#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW ('S', 0x11, struct snd_seq_client_info) +- +-#define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct snd_seq_port_info) +-#define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW ('S', 0x21, struct snd_seq_port_info) +-#define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct snd_seq_port_info) +-#define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW ('S', 0x23, struct snd_seq_port_info) +- +-#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW ('S', 0x30, struct snd_seq_port_subscribe) +-#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe) +- +-#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info) +-#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW ('S', 0x33, struct snd_seq_queue_info) +-#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct snd_seq_queue_info) +-#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct snd_seq_queue_info) +-#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct snd_seq_queue_info) +-#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status) +-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo) +-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct snd_seq_queue_tempo) +-#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer) +-#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct snd_seq_queue_timer) +-#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client) +-#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client) +-#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool) +-#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW ('S', 0x4c, struct snd_seq_client_pool) +-#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW ('S', 0x4e, struct snd_seq_remove_events) +-#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs) +-#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct snd_seq_port_subscribe) +-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct snd_seq_client_info) +-#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct snd_seq_port_info) +- +-#endif /* _UAPI__SOUND_ASEQUENCER_H */ ++#include <alsa/sound/uapi/asequencer.h> +diff --git a/include/sound/asoc.h b/include/sound/asoc.h +index a74ca232..185bba81 100644 +--- a/include/sound/asoc.h ++++ b/include/sound/asoc.h +@@ -1,633 +1 @@ +-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +-/* +- * uapi/sound/asoc.h -- ALSA SoC Firmware Controls and DAPM +- * +- * Copyright (C) 2012 Texas Instruments Inc. +- * Copyright (C) 2015 Intel Corporation. +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- * +- * Simple file API to load FW that includes mixers, coefficients, DAPM graphs, +- * algorithms, equalisers, DAIs, widgets etc. +-*/ +- +-#ifndef __LINUX_UAPI_SND_ASOC_H +-#define __LINUX_UAPI_SND_ASOC_H +- +-#include <linux/types.h> +-#include <sound/asound.h> +- +-/* +- * Maximum number of channels topology kcontrol can represent. +- */ +-#define SND_SOC_TPLG_MAX_CHAN 8 +- +-/* +- * Maximum number of PCM formats capability +- */ +-#define SND_SOC_TPLG_MAX_FORMATS 16 +- +-/* +- * Maximum number of PCM stream configs +- */ +-#define SND_SOC_TPLG_STREAM_CONFIG_MAX 8 +- +-/* +- * Maximum number of physical link's hardware configs +- */ +-#define SND_SOC_TPLG_HW_CONFIG_MAX 8 +- +-/* individual kcontrol info types - can be mixed with other types */ +-#define SND_SOC_TPLG_CTL_VOLSW 1 +-#define SND_SOC_TPLG_CTL_VOLSW_SX 2 +-#define SND_SOC_TPLG_CTL_VOLSW_XR_SX 3 +-#define SND_SOC_TPLG_CTL_ENUM 4 +-#define SND_SOC_TPLG_CTL_BYTES 5 +-#define SND_SOC_TPLG_CTL_ENUM_VALUE 6 +-#define SND_SOC_TPLG_CTL_RANGE 7 +-#define SND_SOC_TPLG_CTL_STROBE 8 +- +- +-/* individual widget kcontrol info types - can be mixed with other types */ +-#define SND_SOC_TPLG_DAPM_CTL_VOLSW 64 +-#define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE 65 +-#define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT 66 +-#define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE 67 +-#define SND_SOC_TPLG_DAPM_CTL_PIN 68 +- +-/* DAPM widget types - add new items to the end */ +-#define SND_SOC_TPLG_DAPM_INPUT 0 +-#define SND_SOC_TPLG_DAPM_OUTPUT 1 +-#define SND_SOC_TPLG_DAPM_MUX 2 +-#define SND_SOC_TPLG_DAPM_MIXER 3 +-#define SND_SOC_TPLG_DAPM_PGA 4 +-#define SND_SOC_TPLG_DAPM_OUT_DRV 5 +-#define SND_SOC_TPLG_DAPM_ADC 6 +-#define SND_SOC_TPLG_DAPM_DAC 7 +-#define SND_SOC_TPLG_DAPM_SWITCH 8 +-#define SND_SOC_TPLG_DAPM_PRE 9 +-#define SND_SOC_TPLG_DAPM_POST 10 +-#define SND_SOC_TPLG_DAPM_AIF_IN 11 +-#define SND_SOC_TPLG_DAPM_AIF_OUT 12 +-#define SND_SOC_TPLG_DAPM_DAI_IN 13 +-#define SND_SOC_TPLG_DAPM_DAI_OUT 14 +-#define SND_SOC_TPLG_DAPM_DAI_LINK 15 +-#define SND_SOC_TPLG_DAPM_BUFFER 16 +-#define SND_SOC_TPLG_DAPM_SCHEDULER 17 +-#define SND_SOC_TPLG_DAPM_EFFECT 18 +-#define SND_SOC_TPLG_DAPM_SIGGEN 19 +-#define SND_SOC_TPLG_DAPM_SRC 20 +-#define SND_SOC_TPLG_DAPM_ASRC 21 +-#define SND_SOC_TPLG_DAPM_ENCODER 22 +-#define SND_SOC_TPLG_DAPM_DECODER 23 +-#define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DECODER +- +-/* Header magic number and string sizes */ +-#define SND_SOC_TPLG_MAGIC 0x41536F43 /* ASoC */ +- +-/* string sizes */ +-#define SND_SOC_TPLG_NUM_TEXTS 16 +- +-/* ABI version */ +-#define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */ +-#define SND_SOC_TPLG_ABI_VERSION_MIN 0x4 /* oldest version supported */ +- +-/* Max size of TLV data */ +-#define SND_SOC_TPLG_TLV_SIZE 32 +- +-/* +- * File and Block header data types. +- * Add new generic and vendor types to end of list. +- * Generic types are handled by the core whilst vendors types are passed +- * to the component drivers for handling. +- */ +-#define SND_SOC_TPLG_TYPE_MIXER 1 +-#define SND_SOC_TPLG_TYPE_BYTES 2 +-#define SND_SOC_TPLG_TYPE_ENUM 3 +-#define SND_SOC_TPLG_TYPE_DAPM_GRAPH 4 +-#define SND_SOC_TPLG_TYPE_DAPM_WIDGET 5 +-#define SND_SOC_TPLG_TYPE_DAI_LINK 6 +-#define SND_SOC_TPLG_TYPE_PCM 7 +-#define SND_SOC_TPLG_TYPE_MANIFEST 8 +-#define SND_SOC_TPLG_TYPE_CODEC_LINK 9 +-#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10 +-#define SND_SOC_TPLG_TYPE_PDATA 11 +-#define SND_SOC_TPLG_TYPE_DAI 12 +-#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_DAI +- +-/* vendor block IDs - please add new vendor types to end */ +-#define SND_SOC_TPLG_TYPE_VENDOR_FW 1000 +-#define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001 +-#define SND_SOC_TPLG_TYPE_VENDOR_COEFF 1002 +-#define SND_SOC_TPLG_TYPEVENDOR_CODEC 1003 +- +-#define SND_SOC_TPLG_STREAM_PLAYBACK 0 +-#define SND_SOC_TPLG_STREAM_CAPTURE 1 +- +-/* vendor tuple types */ +-#define SND_SOC_TPLG_TUPLE_TYPE_UUID 0 +-#define SND_SOC_TPLG_TUPLE_TYPE_STRING 1 +-#define SND_SOC_TPLG_TUPLE_TYPE_BOOL 2 +-#define SND_SOC_TPLG_TUPLE_TYPE_BYTE 3 +-#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4 +-#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5 +- +-/* DAI flags */ +-#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0) +-#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) +-#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) +- +-/* DAI clock gating */ +-#define SND_SOC_TPLG_DAI_CLK_GATE_UNDEFINED 0 +-#define SND_SOC_TPLG_DAI_CLK_GATE_GATED 1 +-#define SND_SOC_TPLG_DAI_CLK_GATE_CONT 2 +- +-/* DAI mclk_direction */ +-#define SND_SOC_TPLG_MCLK_CO 0 /* for codec, mclk is output */ +-#define SND_SOC_TPLG_MCLK_CI 1 /* for codec, mclk is input */ +- +-/* DAI physical PCM data formats. +- * Add new formats to the end of the list. +- */ +-#define SND_SOC_DAI_FORMAT_I2S 1 /* I2S mode */ +-#define SND_SOC_DAI_FORMAT_RIGHT_J 2 /* Right Justified mode */ +-#define SND_SOC_DAI_FORMAT_LEFT_J 3 /* Left Justified mode */ +-#define SND_SOC_DAI_FORMAT_DSP_A 4 /* L data MSB after FRM LRC */ +-#define SND_SOC_DAI_FORMAT_DSP_B 5 /* L data MSB during FRM LRC */ +-#define SND_SOC_DAI_FORMAT_AC97 6 /* AC97 */ +-#define SND_SOC_DAI_FORMAT_PDM 7 /* Pulse density modulation */ +- +-/* left and right justified also known as MSB and LSB respectively */ +-#define SND_SOC_DAI_FORMAT_MSB SND_SOC_DAI_FORMAT_LEFT_J +-#define SND_SOC_DAI_FORMAT_LSB SND_SOC_DAI_FORMAT_RIGHT_J +- +-/* DAI link flags */ +-#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0) +-#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) +-#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) +-#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3) +- +-/* DAI topology BCLK parameter +- * For the backwards capability, by default codec is bclk master +- */ +-#define SND_SOC_TPLG_BCLK_CM 0 /* codec is bclk master */ +-#define SND_SOC_TPLG_BCLK_CS 1 /* codec is bclk slave */ +- +-/* DAI topology FSYNC parameter +- * For the backwards capability, by default codec is fsync master +- */ +-#define SND_SOC_TPLG_FSYNC_CM 0 /* codec is fsync master */ +-#define SND_SOC_TPLG_FSYNC_CS 1 /* codec is fsync slave */ +- +-/* +- * Block Header. +- * This header precedes all object and object arrays below. +- */ +-struct snd_soc_tplg_hdr { +- __le32 magic; /* magic number */ +- __le32 abi; /* ABI version */ +- __le32 version; /* optional vendor specific version details */ +- __le32 type; /* SND_SOC_TPLG_TYPE_ */ +- __le32 size; /* size of this structure */ +- __le32 vendor_type; /* optional vendor specific type info */ +- __le32 payload_size; /* data bytes, excluding this header */ +- __le32 index; /* identifier for block */ +- __le32 count; /* number of elements in block */ +-} __attribute__((packed)); +- +-/* vendor tuple for uuid */ +-struct snd_soc_tplg_vendor_uuid_elem { +- __le32 token; +- char uuid[16]; +-} __attribute__((packed)); +- +-/* vendor tuple for a bool/byte/short/word value */ +-struct snd_soc_tplg_vendor_value_elem { +- __le32 token; +- __le32 value; +-} __attribute__((packed)); +- +-/* vendor tuple for string */ +-struct snd_soc_tplg_vendor_string_elem { +- __le32 token; +- char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +-} __attribute__((packed)); +- +-struct snd_soc_tplg_vendor_array { +- __le32 size; /* size in bytes of the array, including all elements */ +- __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */ +- __le32 num_elems; /* number of elements in array */ +- union { +- struct snd_soc_tplg_vendor_uuid_elem uuid[0]; +- struct snd_soc_tplg_vendor_value_elem value[0]; +- struct snd_soc_tplg_vendor_string_elem string[0]; +- }; +-} __attribute__((packed)); +- +-/* +- * Private data. +- * All topology objects may have private data that can be used by the driver or +- * firmware. Core will ignore this data. +- */ +-struct snd_soc_tplg_private { +- __le32 size; /* in bytes of private data */ +- union { +- char data[0]; +- struct snd_soc_tplg_vendor_array array[0]; +- }; +-} __attribute__((packed)); +- +-/* +- * Kcontrol TLV data. +- */ +-struct snd_soc_tplg_tlv_dbscale { +- __le32 min; +- __le32 step; +- __le32 mute; +-} __attribute__((packed)); +- +-struct snd_soc_tplg_ctl_tlv { +- __le32 size; /* in bytes of this structure */ +- __le32 type; /* SNDRV_CTL_TLVT_*, type of TLV */ +- union { +- __le32 data[SND_SOC_TPLG_TLV_SIZE]; +- struct snd_soc_tplg_tlv_dbscale scale; +- }; +-} __attribute__((packed)); +- +-/* +- * Kcontrol channel data +- */ +-struct snd_soc_tplg_channel { +- __le32 size; /* in bytes of this structure */ +- __le32 reg; +- __le32 shift; +- __le32 id; /* ID maps to Left, Right, LFE etc */ +-} __attribute__((packed)); +- +-/* +- * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops +- * Kcontrol ops need get/put/info. +- * Bytes ext ops need get/put. +- */ +-struct snd_soc_tplg_io_ops { +- __le32 get; +- __le32 put; +- __le32 info; +-} __attribute__((packed)); +- +-/* +- * kcontrol header +- */ +-struct snd_soc_tplg_ctl_hdr { +- __le32 size; /* in bytes of this structure */ +- __le32 type; +- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- __le32 access; +- struct snd_soc_tplg_io_ops ops; +- struct snd_soc_tplg_ctl_tlv tlv; +-} __attribute__((packed)); +- +-/* +- * Stream Capabilities +- */ +-struct snd_soc_tplg_stream_caps { +- __le32 size; /* in bytes of this structure */ +- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ +- __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ +- __le32 rate_min; /* min rate */ +- __le32 rate_max; /* max rate */ +- __le32 channels_min; /* min channels */ +- __le32 channels_max; /* max channels */ +- __le32 periods_min; /* min number of periods */ +- __le32 periods_max; /* max number of periods */ +- __le32 period_size_min; /* min period size bytes */ +- __le32 period_size_max; /* max period size bytes */ +- __le32 buffer_size_min; /* min buffer size bytes */ +- __le32 buffer_size_max; /* max buffer size bytes */ +- __le32 sig_bits; /* number of bits of content */ +-} __attribute__((packed)); +- +-/* +- * FE or BE Stream configuration supported by SW/FW +- */ +-struct snd_soc_tplg_stream { +- __le32 size; /* in bytes of this structure */ +- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */ +- __le64 format; /* SNDRV_PCM_FMTBIT_* */ +- __le32 rate; /* SNDRV_PCM_RATE_* */ +- __le32 period_bytes; /* size of period in bytes */ +- __le32 buffer_bytes; /* size of buffer in bytes */ +- __le32 channels; /* channels */ +-} __attribute__((packed)); +- +- +-/* +- * Describes a physical link's runtime supported hardware config, +- * i.e. hardware audio formats. +- */ +-struct snd_soc_tplg_hw_config { +- __le32 size; /* in bytes of this structure */ +- __le32 id; /* unique ID - - used to match */ +- __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */ +- __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */ +- __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */ +- __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */ +- __u8 bclk_master; /* SND_SOC_TPLG_BCLK_ value */ +- __u8 fsync_master; /* SND_SOC_TPLG_FSYNC_ value */ +- __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */ +- __le16 reserved; /* for 32bit alignment */ +- __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */ +- __le32 bclk_rate; /* BCLK freqency in Hz */ +- __le32 fsync_rate; /* frame clock in Hz */ +- __le32 tdm_slots; /* number of TDM slots in use */ +- __le32 tdm_slot_width; /* width in bits for each slot */ +- __le32 tx_slots; /* bit mask for active Tx slots */ +- __le32 rx_slots; /* bit mask for active Rx slots */ +- __le32 tx_channels; /* number of Tx channels */ +- __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ +- __le32 rx_channels; /* number of Rx channels */ +- __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ +-} __attribute__((packed)); +- +-/* +- * Manifest. List totals for each payload type. Not used in parsing, but will +- * be passed to the component driver before any other objects in order for any +- * global component resource allocations. +- * +- * File block representation for manifest :- +- * +-----------------------------------+----+ +- * | struct snd_soc_tplg_hdr | 1 | +- * +-----------------------------------+----+ +- * | struct snd_soc_tplg_manifest | 1 | +- * +-----------------------------------+----+ +- */ +-struct snd_soc_tplg_manifest { +- __le32 size; /* in bytes of this structure */ +- __le32 control_elems; /* number of control elements */ +- __le32 widget_elems; /* number of widget elements */ +- __le32 graph_elems; /* number of graph elements */ +- __le32 pcm_elems; /* number of PCM elements */ +- __le32 dai_link_elems; /* number of DAI link elements */ +- __le32 dai_elems; /* number of physical DAI elements */ +- __le32 reserved[20]; /* reserved for new ABI element types */ +- struct snd_soc_tplg_private priv; +-} __attribute__((packed)); +- +-/* +- * Mixer kcontrol. +- * +- * File block representation for mixer kcontrol :- +- * +-----------------------------------+----+ +- * | struct snd_soc_tplg_hdr | 1 | +- * +-----------------------------------+----+ +- * | struct snd_soc_tplg_mixer_control | N | +- * +-----------------------------------+----+ +- */ +-struct snd_soc_tplg_mixer_control { +- struct snd_soc_tplg_ctl_hdr hdr; +- __le32 size; /* in bytes of this structure */ +- __le32 min; +- __le32 max; +- __le32 platform_max; +- __le32 invert; +- __le32 num_channels; +- struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; +- struct snd_soc_tplg_private priv; +-} __attribute__((packed)); +- +-/* +- * Enumerated kcontrol +- * +- * File block representation for enum kcontrol :- +- * +-----------------------------------+----+ +- * | struct snd_soc_tplg_hdr | 1 | +- * +-----------------------------------+----+ +- * | struct snd_soc_tplg_enum_control | N | +- * +-----------------------------------+----+ +- */ +-struct snd_soc_tplg_enum_control { +- struct snd_soc_tplg_ctl_hdr hdr; +- __le32 size; /* in bytes of this structure */ +- __le32 num_channels; +- struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; +- __le32 items; +- __le32 mask; +- __le32 count; +- char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4]; +- struct snd_soc_tplg_private priv; +-} __attribute__((packed)); +- +-/* +- * Bytes kcontrol +- * +- * File block representation for bytes kcontrol :- +- * +-----------------------------------+----+ +- * | struct snd_soc_tplg_hdr | 1 | +- * +-----------------------------------+----+ +- * | struct snd_soc_tplg_bytes_control | N | +- * +-----------------------------------+----+ +- */ +-struct snd_soc_tplg_bytes_control { +- struct snd_soc_tplg_ctl_hdr hdr; +- __le32 size; /* in bytes of this structure */ +- __le32 max; +- __le32 mask; +- __le32 base; +- __le32 num_regs; +- struct snd_soc_tplg_io_ops ext_ops; +- struct snd_soc_tplg_private priv; +-} __attribute__((packed)); +- +-/* +- * DAPM Graph Element +- * +- * File block representation for DAPM graph elements :- +- * +-------------------------------------+----+ +- * | struct snd_soc_tplg_hdr | 1 | +- * +-------------------------------------+----+ +- * | struct snd_soc_tplg_dapm_graph_elem | N | +- * +-------------------------------------+----+ +- */ +-struct snd_soc_tplg_dapm_graph_elem { +- char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +-} __attribute__((packed)); +- +-/* +- * DAPM Widget. +- * +- * File block representation for DAPM widget :- +- * +-------------------------------------+-----+ +- * | struct snd_soc_tplg_hdr | 1 | +- * +-------------------------------------+-----+ +- * | struct snd_soc_tplg_dapm_widget | N | +- * +-------------------------------------+-----+ +- * | struct snd_soc_tplg_enum_control | 0|1 | +- * | struct snd_soc_tplg_mixer_control | 0|N | +- * +-------------------------------------+-----+ +- * +- * Optional enum or mixer control can be appended to the end of each widget +- * in the block. +- */ +-struct snd_soc_tplg_dapm_widget { +- __le32 size; /* in bytes of this structure */ +- __le32 id; /* SND_SOC_DAPM_CTL */ +- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- char sname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- +- __le32 reg; /* negative reg = no direct dapm */ +- __le32 shift; /* bits to shift */ +- __le32 mask; /* non-shifted mask */ +- __le32 subseq; /* sort within widget type */ +- __le32 invert; /* invert the power bit */ +- __le32 ignore_suspend; /* kept enabled over suspend */ +- __le16 event_flags; +- __le16 event_type; +- __le32 num_kcontrols; +- struct snd_soc_tplg_private priv; +- /* +- * kcontrols that relate to this widget +- * follow here after widget private data +- */ +-} __attribute__((packed)); +- +- +-/* +- * Describes SW/FW specific features of PCM (FE DAI & DAI link). +- * +- * File block representation for PCM :- +- * +-----------------------------------+-----+ +- * | struct snd_soc_tplg_hdr | 1 | +- * +-----------------------------------+-----+ +- * | struct snd_soc_tplg_pcm | N | +- * +-----------------------------------+-----+ +- */ +-struct snd_soc_tplg_pcm { +- __le32 size; /* in bytes of this structure */ +- char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- __le32 pcm_id; /* unique ID - used to match with DAI link */ +- __le32 dai_id; /* unique ID - used to match */ +- __le32 playback; /* supports playback mode */ +- __le32 capture; /* supports capture mode */ +- __le32 compress; /* 1 = compressed; 0 = PCM */ +- struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ +- __le32 num_streams; /* number of streams */ +- struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ +- __le32 flag_mask; /* bitmask of flags to configure */ +- __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ +- struct snd_soc_tplg_private priv; +-} __attribute__((packed)); +- +- +-/* +- * Describes the physical link runtime supported configs or params +- * +- * File block representation for physical link config :- +- * +-----------------------------------+-----+ +- * | struct snd_soc_tplg_hdr | 1 | +- * +-----------------------------------+-----+ +- * | struct snd_soc_tplg_link_config | N | +- * +-----------------------------------+-----+ +- */ +-struct snd_soc_tplg_link_config { +- __le32 size; /* in bytes of this structure */ +- __le32 id; /* unique ID - used to match */ +- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ +- char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used to match */ +- struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ +- __le32 num_streams; /* number of streams */ +- struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */ +- __le32 num_hw_configs; /* number of hw configs */ +- __le32 default_hw_config_id; /* default hw config ID for init */ +- __le32 flag_mask; /* bitmask of flags to configure */ +- __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ +- struct snd_soc_tplg_private priv; +-} __attribute__((packed)); +- +-/* +- * Describes SW/FW specific features of physical DAI. +- * It can be used to configure backend DAIs for DPCM. +- * +- * File block representation for physical DAI :- +- * +-----------------------------------+-----+ +- * | struct snd_soc_tplg_hdr | 1 | +- * +-----------------------------------+-----+ +- * | struct snd_soc_tplg_dai | N | +- * +-----------------------------------+-----+ +- */ +-struct snd_soc_tplg_dai { +- __le32 size; /* in bytes of this structure */ +- char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ +- __le32 dai_id; /* unique ID - used to match */ +- __le32 playback; /* supports playback mode */ +- __le32 capture; /* supports capture mode */ +- struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ +- __le32 flag_mask; /* bitmask of flags to configure */ +- __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */ +- struct snd_soc_tplg_private priv; +-} __attribute__((packed)); +- +-/* +- * Old version of ABI structs, supported for backward compatibility. +- */ +- +-/* Manifest v4 */ +-struct snd_soc_tplg_manifest_v4 { +- __le32 size; /* in bytes of this structure */ +- __le32 control_elems; /* number of control elements */ +- __le32 widget_elems; /* number of widget elements */ +- __le32 graph_elems; /* number of graph elements */ +- __le32 pcm_elems; /* number of PCM elements */ +- __le32 dai_link_elems; /* number of DAI link elements */ +- struct snd_soc_tplg_private priv; +-} __packed; +- +-/* Stream Capabilities v4 */ +-struct snd_soc_tplg_stream_caps_v4 { +- __le32 size; /* in bytes of this structure */ +- char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ +- __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ +- __le32 rate_min; /* min rate */ +- __le32 rate_max; /* max rate */ +- __le32 channels_min; /* min channels */ +- __le32 channels_max; /* max channels */ +- __le32 periods_min; /* min number of periods */ +- __le32 periods_max; /* max number of periods */ +- __le32 period_size_min; /* min period size bytes */ +- __le32 period_size_max; /* max period size bytes */ +- __le32 buffer_size_min; /* min buffer size bytes */ +- __le32 buffer_size_max; /* max buffer size bytes */ +-} __packed; +- +-/* PCM v4 */ +-struct snd_soc_tplg_pcm_v4 { +- __le32 size; /* in bytes of this structure */ +- char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; +- __le32 pcm_id; /* unique ID - used to match with DAI link */ +- __le32 dai_id; /* unique ID - used to match */ +- __le32 playback; /* supports playback mode */ +- __le32 capture; /* supports capture mode */ +- __le32 compress; /* 1 = compressed; 0 = PCM */ +- struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ +- __le32 num_streams; /* number of streams */ +- struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */ +-} __packed; +- +-/* Physical link config v4 */ +-struct snd_soc_tplg_link_config_v4 { +- __le32 size; /* in bytes of this structure */ +- __le32 id; /* unique ID - used to match */ +- struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ +- __le32 num_streams; /* number of streams */ +-} __packed; +- +-#endif ++#include <alsa/sound/uapi/asoc.h> +diff --git a/include/sound/asound.h b/include/sound/asound.h +index df1153ce..3be4d850 100644 +--- a/include/sound/asound.h ++++ b/include/sound/asound.h +@@ -1,1038 +1 @@ +-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +-/* +- * Advanced Linux Sound Architecture - ALSA - Driver +- * Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>, +- * Abramo Bagnara <abramo@alsa-project.org> +- * +- * +- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * +- */ +- +-#ifndef _UAPI__SOUND_ASOUND_H +-#define _UAPI__SOUND_ASOUND_H +- +-#if defined(__KERNEL__) || defined(__linux__) +-#include <linux/types.h> +-#else +-#include <sys/ioctl.h> +-#endif +- +-#ifndef __KERNEL__ +-#include <stdlib.h> +-#include <time.h> +-#endif +- +-/* +- * protocol version +- */ +- +-#define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major)<<16)|((minor)<<8)|(subminor)) +-#define SNDRV_PROTOCOL_MAJOR(version) (((version)>>16)&0xffff) +-#define SNDRV_PROTOCOL_MINOR(version) (((version)>>8)&0xff) +-#define SNDRV_PROTOCOL_MICRO(version) ((version)&0xff) +-#define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \ +- (SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \ +- (SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \ +- SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion))) +- +-/**************************************************************************** +- * * +- * Digital audio interface * +- * * +- ****************************************************************************/ +- +-struct snd_aes_iec958 { +- unsigned char status[24]; /* AES/IEC958 channel status bits */ +- unsigned char subcode[147]; /* AES/IEC958 subcode bits */ +- unsigned char pad; /* nothing */ +- unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */ +-}; +- +-/**************************************************************************** +- * * +- * CEA-861 Audio InfoFrame. Used in HDMI and DisplayPort * +- * * +- ****************************************************************************/ +- +-struct snd_cea_861_aud_if { +- unsigned char db1_ct_cc; /* coding type and channel count */ +- unsigned char db2_sf_ss; /* sample frequency and size */ +- unsigned char db3; /* not used, all zeros */ +- unsigned char db4_ca; /* channel allocation code */ +- unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */ +-}; +- +-/**************************************************************************** +- * * +- * Section for driver hardware dependent interface - /dev/snd/hw? * +- * * +- ****************************************************************************/ +- +-#define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) +- +-enum { +- SNDRV_HWDEP_IFACE_OPL2 = 0, +- SNDRV_HWDEP_IFACE_OPL3, +- SNDRV_HWDEP_IFACE_OPL4, +- SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */ +- SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */ +- SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */ +- SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */ +- SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */ +- SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */ +- SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */ +- SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */ +- SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */ +- SNDRV_HWDEP_IFACE_BLUETOOTH, /* Bluetooth audio */ +- SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm */ +- SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */ +- SNDRV_HWDEP_IFACE_SB_RC, /* SB Extigy/Audigy2NX remote control */ +- SNDRV_HWDEP_IFACE_HDA, /* HD-audio */ +- SNDRV_HWDEP_IFACE_USB_STREAM, /* direct access to usb stream */ +- SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */ +- SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */ +- SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */ +- SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */ +- SNDRV_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */ +- SNDRV_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */ +- SNDRV_HWDEP_IFACE_LINE6, /* Line6 USB processors */ +- SNDRV_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */ +- SNDRV_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */ +- +- /* Don't forget to change the following: */ +- SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE +-}; +- +-struct snd_hwdep_info { +- unsigned int device; /* WR: device number */ +- int card; /* R: card number */ +- unsigned char id[64]; /* ID (user selectable) */ +- unsigned char name[80]; /* hwdep name */ +- int iface; /* hwdep interface */ +- unsigned char reserved[64]; /* reserved for future */ +-}; +- +-/* generic DSP loader */ +-struct snd_hwdep_dsp_status { +- unsigned int version; /* R: driver-specific version */ +- unsigned char id[32]; /* R: driver-specific ID string */ +- unsigned int num_dsps; /* R: number of DSP images to transfer */ +- unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */ +- unsigned int chip_ready; /* R: 1 = initialization finished */ +- unsigned char reserved[16]; /* reserved for future use */ +-}; +- +-struct snd_hwdep_dsp_image { +- unsigned int index; /* W: DSP index */ +- unsigned char name[64]; /* W: ID (e.g. file name) */ +- unsigned char __user *image; /* W: binary image */ +- size_t length; /* W: size of image in bytes */ +- unsigned long driver_data; /* W: driver-specific data */ +-}; +- +-#define SNDRV_HWDEP_IOCTL_PVERSION _IOR ('H', 0x00, int) +-#define SNDRV_HWDEP_IOCTL_INFO _IOR ('H', 0x01, struct snd_hwdep_info) +-#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status) +-#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image) +- +-/***************************************************************************** +- * * +- * Digital Audio (PCM) interface - /dev/snd/pcm?? * +- * * +- *****************************************************************************/ +- +-#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 14) +- +-typedef unsigned long snd_pcm_uframes_t; +-typedef signed long snd_pcm_sframes_t; +- +-enum { +- SNDRV_PCM_CLASS_GENERIC = 0, /* standard mono or stereo device */ +- SNDRV_PCM_CLASS_MULTI, /* multichannel device */ +- SNDRV_PCM_CLASS_MODEM, /* software modem class */ +- SNDRV_PCM_CLASS_DIGITIZER, /* digitizer class */ +- /* Don't forget to change the following: */ +- SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER, +-}; +- +-enum { +- SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0, /* mono or stereo subdevices are mixed together */ +- SNDRV_PCM_SUBCLASS_MULTI_MIX, /* multichannel subdevices are mixed together */ +- /* Don't forget to change the following: */ +- SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX, +-}; +- +-enum { +- SNDRV_PCM_STREAM_PLAYBACK = 0, +- SNDRV_PCM_STREAM_CAPTURE, +- SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE, +-}; +- +-typedef int __bitwise snd_pcm_access_t; +-#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((__force snd_pcm_access_t) 0) /* interleaved mmap */ +-#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((__force snd_pcm_access_t) 1) /* noninterleaved mmap */ +-#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((__force snd_pcm_access_t) 2) /* complex mmap */ +-#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((__force snd_pcm_access_t) 3) /* readi/writei */ +-#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((__force snd_pcm_access_t) 4) /* readn/writen */ +-#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED +- +-typedef int __bitwise snd_pcm_format_t; +-#define SNDRV_PCM_FORMAT_S8 ((__force snd_pcm_format_t) 0) +-#define SNDRV_PCM_FORMAT_U8 ((__force snd_pcm_format_t) 1) +-#define SNDRV_PCM_FORMAT_S16_LE ((__force snd_pcm_format_t) 2) +-#define SNDRV_PCM_FORMAT_S16_BE ((__force snd_pcm_format_t) 3) +-#define SNDRV_PCM_FORMAT_U16_LE ((__force snd_pcm_format_t) 4) +-#define SNDRV_PCM_FORMAT_U16_BE ((__force snd_pcm_format_t) 5) +-#define SNDRV_PCM_FORMAT_S24_LE ((__force snd_pcm_format_t) 6) /* low three bytes */ +-#define SNDRV_PCM_FORMAT_S24_BE ((__force snd_pcm_format_t) 7) /* low three bytes */ +-#define SNDRV_PCM_FORMAT_U24_LE ((__force snd_pcm_format_t) 8) /* low three bytes */ +-#define SNDRV_PCM_FORMAT_U24_BE ((__force snd_pcm_format_t) 9) /* low three bytes */ +-#define SNDRV_PCM_FORMAT_S32_LE ((__force snd_pcm_format_t) 10) +-#define SNDRV_PCM_FORMAT_S32_BE ((__force snd_pcm_format_t) 11) +-#define SNDRV_PCM_FORMAT_U32_LE ((__force snd_pcm_format_t) 12) +-#define SNDRV_PCM_FORMAT_U32_BE ((__force snd_pcm_format_t) 13) +-#define SNDRV_PCM_FORMAT_FLOAT_LE ((__force snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ +-#define SNDRV_PCM_FORMAT_FLOAT_BE ((__force snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ +-#define SNDRV_PCM_FORMAT_FLOAT64_LE ((__force snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ +-#define SNDRV_PCM_FORMAT_FLOAT64_BE ((__force snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ +-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */ +-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */ +-#define SNDRV_PCM_FORMAT_MU_LAW ((__force snd_pcm_format_t) 20) +-#define SNDRV_PCM_FORMAT_A_LAW ((__force snd_pcm_format_t) 21) +-#define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22) +-#define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23) +-#define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24) +-#define SNDRV_PCM_FORMAT_S20_LE ((__force snd_pcm_format_t) 25) /* in four bytes, LSB justified */ +-#define SNDRV_PCM_FORMAT_S20_BE ((__force snd_pcm_format_t) 26) /* in four bytes, LSB justified */ +-#define SNDRV_PCM_FORMAT_U20_LE ((__force snd_pcm_format_t) 27) /* in four bytes, LSB justified */ +-#define SNDRV_PCM_FORMAT_U20_BE ((__force snd_pcm_format_t) 28) /* in four bytes, LSB justified */ +-/* gap in the numbering for a future standard linear format */ +-#define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31) +-#define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_U24_3LE ((__force snd_pcm_format_t) 34) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_U24_3BE ((__force snd_pcm_format_t) 35) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_S20_3LE ((__force snd_pcm_format_t) 36) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_S20_3BE ((__force snd_pcm_format_t) 37) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_U20_3LE ((__force snd_pcm_format_t) 38) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_U20_3BE ((__force snd_pcm_format_t) 39) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_S18_3LE ((__force snd_pcm_format_t) 40) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43) /* in three bytes */ +-#define SNDRV_PCM_FORMAT_G723_24 ((__force snd_pcm_format_t) 44) /* 8 samples in 3 bytes */ +-#define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45) /* 1 sample in 1 byte */ +-#define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */ +-#define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47) /* 1 sample in 1 byte */ +-#define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */ +-#define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */ +-#define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */ +-#define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */ +-#define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */ +-#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE +-#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8 +- +-#ifdef SNDRV_LITTLE_ENDIAN +-#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE +-#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE +-#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE +-#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE +-#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE +-#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE +-#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE +-#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE +-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE +-#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_LE +-#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_LE +-#endif +-#ifdef SNDRV_BIG_ENDIAN +-#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE +-#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE +-#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE +-#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE +-#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE +-#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE +-#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE +-#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE +-#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE +-#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_BE +-#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE +-#endif +- +-typedef int __bitwise snd_pcm_subformat_t; +-#define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0) +-#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD +- +-#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ +-#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */ +-#define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */ +-#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */ +-#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020 /* need the explicit sync of appl_ptr update */ +-#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */ +-#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */ +-#define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */ +-#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000 /* hardware transfer block of samples */ +-#define SNDRV_PCM_INFO_OVERRANGE 0x00020000 /* hardware supports ADC (capture) overrange detection */ +-#define SNDRV_PCM_INFO_RESUME 0x00040000 /* hardware supports stream resume after suspend */ +-#define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */ +-#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */ +-#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */ +-#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */ +-#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */ +-#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000 /* (Deprecated)has audio wall clock for audio/system time sync */ +-#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 /* report hardware link audio time, reset on startup */ +-#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000 /* report absolute hardware link audio time, not reset on startup */ +-#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 /* report estimated link audio time */ +-#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */ +- +-#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */ +-#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */ +- +- +- +-typedef int __bitwise snd_pcm_state_t; +-#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0) /* stream is open */ +-#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1) /* stream has a setup */ +-#define SNDRV_PCM_STATE_PREPARED ((__force snd_pcm_state_t) 2) /* stream is ready to start */ +-#define SNDRV_PCM_STATE_RUNNING ((__force snd_pcm_state_t) 3) /* stream is running */ +-#define SNDRV_PCM_STATE_XRUN ((__force snd_pcm_state_t) 4) /* stream reached an xrun */ +-#define SNDRV_PCM_STATE_DRAINING ((__force snd_pcm_state_t) 5) /* stream is draining */ +-#define SNDRV_PCM_STATE_PAUSED ((__force snd_pcm_state_t) 6) /* stream is paused */ +-#define SNDRV_PCM_STATE_SUSPENDED ((__force snd_pcm_state_t) 7) /* hardware is suspended */ +-#define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8) /* hardware is disconnected */ +-#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED +- +-enum { +- SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000, +- SNDRV_PCM_MMAP_OFFSET_STATUS = 0x80000000, +- SNDRV_PCM_MMAP_OFFSET_CONTROL = 0x81000000, +-}; +- +-union snd_pcm_sync_id { +- unsigned char id[16]; +- unsigned short id16[8]; +- unsigned int id32[4]; +-}; +- +-struct snd_pcm_info { +- unsigned int device; /* RO/WR (control): device number */ +- unsigned int subdevice; /* RO/WR (control): subdevice number */ +- int stream; /* RO/WR (control): stream direction */ +- int card; /* R: card number */ +- unsigned char id[64]; /* ID (user selectable) */ +- unsigned char name[80]; /* name of this device */ +- unsigned char subname[32]; /* subdevice name */ +- int dev_class; /* SNDRV_PCM_CLASS_* */ +- int dev_subclass; /* SNDRV_PCM_SUBCLASS_* */ +- unsigned int subdevices_count; +- unsigned int subdevices_avail; +- union snd_pcm_sync_id sync; /* hardware synchronization ID */ +- unsigned char reserved[64]; /* reserved for future... */ +-}; +- +-typedef int snd_pcm_hw_param_t; +-#define SNDRV_PCM_HW_PARAM_ACCESS 0 /* Access type */ +-#define SNDRV_PCM_HW_PARAM_FORMAT 1 /* Format */ +-#define SNDRV_PCM_HW_PARAM_SUBFORMAT 2 /* Subformat */ +-#define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS +-#define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT +- +-#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8 /* Bits per sample */ +-#define SNDRV_PCM_HW_PARAM_FRAME_BITS 9 /* Bits per frame */ +-#define SNDRV_PCM_HW_PARAM_CHANNELS 10 /* Channels */ +-#define SNDRV_PCM_HW_PARAM_RATE 11 /* Approx rate */ +-#define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12 /* Approx distance between +- * interrupts in us +- */ +-#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13 /* Approx frames between +- * interrupts +- */ +-#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14 /* Approx bytes between +- * interrupts +- */ +-#define SNDRV_PCM_HW_PARAM_PERIODS 15 /* Approx interrupts per +- * buffer +- */ +-#define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16 /* Approx duration of buffer +- * in us +- */ +-#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17 /* Size of buffer in frames */ +-#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18 /* Size of buffer in bytes */ +-#define SNDRV_PCM_HW_PARAM_TICK_TIME 19 /* Approx tick duration in us */ +-#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS +-#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME +- +-#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */ +-#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1<<1) /* export buffer */ +-#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1<<2) /* disable period wakeups */ +- +-struct snd_interval { +- unsigned int min, max; +- unsigned int openmin:1, +- openmax:1, +- integer:1, +- empty:1; +-}; +- +-#define SNDRV_MASK_MAX 256 +- +-struct snd_mask { +- __u32 bits[(SNDRV_MASK_MAX+31)/32]; +-}; +- +-struct snd_pcm_hw_params { +- unsigned int flags; +- struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - +- SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; +- struct snd_mask mres[5]; /* reserved masks */ +- struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - +- SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1]; +- struct snd_interval ires[9]; /* reserved intervals */ +- unsigned int rmask; /* W: requested masks */ +- unsigned int cmask; /* R: changed masks */ +- unsigned int info; /* R: Info flags for returned setup */ +- unsigned int msbits; /* R: used most significant bits */ +- unsigned int rate_num; /* R: rate numerator */ +- unsigned int rate_den; /* R: rate denominator */ +- snd_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */ +- unsigned char reserved[64]; /* reserved for future */ +-}; +- +-enum { +- SNDRV_PCM_TSTAMP_NONE = 0, +- SNDRV_PCM_TSTAMP_ENABLE, +- SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE, +-}; +- +-struct snd_pcm_sw_params { +- int tstamp_mode; /* timestamp mode */ +- unsigned int period_step; +- unsigned int sleep_min; /* min ticks to sleep */ +- snd_pcm_uframes_t avail_min; /* min avail frames for wakeup */ +- snd_pcm_uframes_t xfer_align; /* obsolete: xfer size need to be a multiple */ +- snd_pcm_uframes_t start_threshold; /* min hw_avail frames for automatic start */ +- snd_pcm_uframes_t stop_threshold; /* min avail frames for automatic stop */ +- snd_pcm_uframes_t silence_threshold; /* min distance from noise for silence filling */ +- snd_pcm_uframes_t silence_size; /* silence block size */ +- snd_pcm_uframes_t boundary; /* pointers wrap point */ +- unsigned int proto; /* protocol version */ +- unsigned int tstamp_type; /* timestamp type (req. proto >= 2.0.12) */ +- unsigned char reserved[56]; /* reserved for future */ +-}; +- +-struct snd_pcm_channel_info { +- unsigned int channel; +- __kernel_off_t offset; /* mmap offset */ +- unsigned int first; /* offset to first sample in bits */ +- unsigned int step; /* samples distance in bits */ +-}; +- +-enum { +- /* +- * first definition for backwards compatibility only, +- * maps to wallclock/link time for HDAudio playback and DEFAULT/DMA time for everything else +- */ +- SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0, +- +- /* timestamp definitions */ +- SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per hw_ptr */ +- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or wallclock counter, reset on startup */ +- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by sample or wallclock counter, not reset on startup */ +- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated indirectly */ +- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time synchronized with system time */ +- SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED +-}; +- +-struct snd_pcm_status { +- snd_pcm_state_t state; /* stream state */ +- struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */ +- struct timespec tstamp; /* reference timestamp */ +- snd_pcm_uframes_t appl_ptr; /* appl ptr */ +- snd_pcm_uframes_t hw_ptr; /* hw ptr */ +- snd_pcm_sframes_t delay; /* current delay in frames */ +- snd_pcm_uframes_t avail; /* number of frames available */ +- snd_pcm_uframes_t avail_max; /* max frames available on hw since last status */ +- snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */ +- snd_pcm_state_t suspended_state; /* suspended stream state */ +- __u32 audio_tstamp_data; /* needed for 64-bit alignment, used for configs/report to/from userspace */ +- struct timespec audio_tstamp; /* sample counter, wall clock, PHC or on-demand sync'ed */ +- struct timespec driver_tstamp; /* useful in case reference system tstamp is reported with delay */ +- __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in audio_tstamp_data */ +- unsigned char reserved[52-2*sizeof(struct timespec)]; /* must be filled with zero */ +-}; +- +-struct snd_pcm_mmap_status { +- snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */ +- int pad1; /* Needed for 64 bit alignment */ +- snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */ +- struct timespec tstamp; /* Timestamp */ +- snd_pcm_state_t suspended_state; /* RO: suspended stream state */ +- struct timespec audio_tstamp; /* from sample counter or wall clock */ +-}; +- +-struct snd_pcm_mmap_control { +- snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */ +- snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */ +-}; +- +-#define SNDRV_PCM_SYNC_PTR_HWSYNC (1<<0) /* execute hwsync */ +-#define SNDRV_PCM_SYNC_PTR_APPL (1<<1) /* get appl_ptr from driver (r/w op) */ +-#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1<<2) /* get avail_min from driver */ +- +-struct snd_pcm_sync_ptr { +- unsigned int flags; +- union { +- struct snd_pcm_mmap_status status; +- unsigned char reserved[64]; +- } s; +- union { +- struct snd_pcm_mmap_control control; +- unsigned char reserved[64]; +- } c; +-}; +- +-struct snd_xferi { +- snd_pcm_sframes_t result; +- void __user *buf; +- snd_pcm_uframes_t frames; +-}; +- +-struct snd_xfern { +- snd_pcm_sframes_t result; +- void __user * __user *bufs; +- snd_pcm_uframes_t frames; +-}; +- +-enum { +- SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */ +- SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */ +- SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */ +- SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, +-}; +- +-/* channel positions */ +-enum { +- SNDRV_CHMAP_UNKNOWN = 0, +- SNDRV_CHMAP_NA, /* N/A, silent */ +- SNDRV_CHMAP_MONO, /* mono stream */ +- /* this follows the alsa-lib mixer channel value + 3 */ +- SNDRV_CHMAP_FL, /* front left */ +- SNDRV_CHMAP_FR, /* front right */ +- SNDRV_CHMAP_RL, /* rear left */ +- SNDRV_CHMAP_RR, /* rear right */ +- SNDRV_CHMAP_FC, /* front center */ +- SNDRV_CHMAP_LFE, /* LFE */ +- SNDRV_CHMAP_SL, /* side left */ +- SNDRV_CHMAP_SR, /* side right */ +- SNDRV_CHMAP_RC, /* rear center */ +- /* new definitions */ +- SNDRV_CHMAP_FLC, /* front left center */ +- SNDRV_CHMAP_FRC, /* front right center */ +- SNDRV_CHMAP_RLC, /* rear left center */ +- SNDRV_CHMAP_RRC, /* rear right center */ +- SNDRV_CHMAP_FLW, /* front left wide */ +- SNDRV_CHMAP_FRW, /* front right wide */ +- SNDRV_CHMAP_FLH, /* front left high */ +- SNDRV_CHMAP_FCH, /* front center high */ +- SNDRV_CHMAP_FRH, /* front right high */ +- SNDRV_CHMAP_TC, /* top center */ +- SNDRV_CHMAP_TFL, /* top front left */ +- SNDRV_CHMAP_TFR, /* top front right */ +- SNDRV_CHMAP_TFC, /* top front center */ +- SNDRV_CHMAP_TRL, /* top rear left */ +- SNDRV_CHMAP_TRR, /* top rear right */ +- SNDRV_CHMAP_TRC, /* top rear center */ +- /* new definitions for UAC2 */ +- SNDRV_CHMAP_TFLC, /* top front left center */ +- SNDRV_CHMAP_TFRC, /* top front right center */ +- SNDRV_CHMAP_TSL, /* top side left */ +- SNDRV_CHMAP_TSR, /* top side right */ +- SNDRV_CHMAP_LLFE, /* left LFE */ +- SNDRV_CHMAP_RLFE, /* right LFE */ +- SNDRV_CHMAP_BC, /* bottom center */ +- SNDRV_CHMAP_BLC, /* bottom left center */ +- SNDRV_CHMAP_BRC, /* bottom right center */ +- SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC, +-}; +- +-#define SNDRV_CHMAP_POSITION_MASK 0xffff +-#define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16) +-#define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16) +- +-#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int) +-#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info) +-#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int) +-#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int) +-#define SNDRV_PCM_IOCTL_USER_PVERSION _IOW('A', 0x04, int) +-#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params) +-#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params) +-#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12) +-#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params) +-#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status) +-#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t) +-#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22) +-#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr) +-#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status) +-#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info) +-#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40) +-#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41) +-#define SNDRV_PCM_IOCTL_START _IO('A', 0x42) +-#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43) +-#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44) +-#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int) +-#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t) +-#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47) +-#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48) +-#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t) +-#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi) +-#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi) +-#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern) +-#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern) +-#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int) +-#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61) +- +-/***************************************************************************** +- * * +- * MIDI v1.0 interface * +- * * +- *****************************************************************************/ +- +-/* +- * Raw MIDI section - /dev/snd/midi?? +- */ +- +-#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 0) +- +-enum { +- SNDRV_RAWMIDI_STREAM_OUTPUT = 0, +- SNDRV_RAWMIDI_STREAM_INPUT, +- SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT, +-}; +- +-#define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001 +-#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002 +-#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004 +- +-struct snd_rawmidi_info { +- unsigned int device; /* RO/WR (control): device number */ +- unsigned int subdevice; /* RO/WR (control): subdevice number */ +- int stream; /* WR: stream */ +- int card; /* R: card number */ +- unsigned int flags; /* SNDRV_RAWMIDI_INFO_XXXX */ +- unsigned char id[64]; /* ID (user selectable) */ +- unsigned char name[80]; /* name of device */ +- unsigned char subname[32]; /* name of active or selected subdevice */ +- unsigned int subdevices_count; +- unsigned int subdevices_avail; +- unsigned char reserved[64]; /* reserved for future use */ +-}; +- +-struct snd_rawmidi_params { +- int stream; +- size_t buffer_size; /* queue size in bytes */ +- size_t avail_min; /* minimum avail bytes for wakeup */ +- unsigned int no_active_sensing: 1; /* do not send active sensing byte in close() */ +- unsigned char reserved[16]; /* reserved for future use */ +-}; +- +-struct snd_rawmidi_status { +- int stream; +- struct timespec tstamp; /* Timestamp */ +- size_t avail; /* available bytes */ +- size_t xruns; /* count of overruns since last status (in bytes) */ +- unsigned char reserved[16]; /* reserved for future use */ +-}; +- +-#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int) +-#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info) +-#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params) +-#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status) +-#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int) +-#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int) +- +-/* +- * Timer section - /dev/snd/timer +- */ +- +-#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6) +- +-enum { +- SNDRV_TIMER_CLASS_NONE = -1, +- SNDRV_TIMER_CLASS_SLAVE = 0, +- SNDRV_TIMER_CLASS_GLOBAL, +- SNDRV_TIMER_CLASS_CARD, +- SNDRV_TIMER_CLASS_PCM, +- SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM, +-}; +- +-/* slave timer classes */ +-enum { +- SNDRV_TIMER_SCLASS_NONE = 0, +- SNDRV_TIMER_SCLASS_APPLICATION, +- SNDRV_TIMER_SCLASS_SEQUENCER, /* alias */ +- SNDRV_TIMER_SCLASS_OSS_SEQUENCER, /* alias */ +- SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER, +-}; +- +-/* global timers (device member) */ +-#define SNDRV_TIMER_GLOBAL_SYSTEM 0 +-#define SNDRV_TIMER_GLOBAL_RTC 1 /* unused */ +-#define SNDRV_TIMER_GLOBAL_HPET 2 +-#define SNDRV_TIMER_GLOBAL_HRTIMER 3 +- +-/* info flags */ +-#define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ +- +-struct snd_timer_id { +- int dev_class; +- int dev_sclass; +- int card; +- int device; +- int subdevice; +-}; +- +-struct snd_timer_ginfo { +- struct snd_timer_id tid; /* requested timer ID */ +- unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */ +- int card; /* card number */ +- unsigned char id[64]; /* timer identification */ +- unsigned char name[80]; /* timer name */ +- unsigned long reserved0; /* reserved for future use */ +- unsigned long resolution; /* average period resolution in ns */ +- unsigned long resolution_min; /* minimal period resolution in ns */ +- unsigned long resolution_max; /* maximal period resolution in ns */ +- unsigned int clients; /* active timer clients */ +- unsigned char reserved[32]; +-}; +- +-struct snd_timer_gparams { +- struct snd_timer_id tid; /* requested timer ID */ +- unsigned long period_num; /* requested precise period duration (in seconds) - numerator */ +- unsigned long period_den; /* requested precise period duration (in seconds) - denominator */ +- unsigned char reserved[32]; +-}; +- +-struct snd_timer_gstatus { +- struct snd_timer_id tid; /* requested timer ID */ +- unsigned long resolution; /* current period resolution in ns */ +- unsigned long resolution_num; /* precise current period resolution (in seconds) - numerator */ +- unsigned long resolution_den; /* precise current period resolution (in seconds) - denominator */ +- unsigned char reserved[32]; +-}; +- +-struct snd_timer_select { +- struct snd_timer_id id; /* bind to timer ID */ +- unsigned char reserved[32]; /* reserved */ +-}; +- +-struct snd_timer_info { +- unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */ +- int card; /* card number */ +- unsigned char id[64]; /* timer identificator */ +- unsigned char name[80]; /* timer name */ +- unsigned long reserved0; /* reserved for future use */ +- unsigned long resolution; /* average period resolution in ns */ +- unsigned char reserved[64]; /* reserved */ +-}; +- +-#define SNDRV_TIMER_PSFLG_AUTO (1<<0) /* auto start, otherwise one-shot */ +-#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1<<1) /* exclusive use, precise start/stop/pause/continue */ +-#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1<<2) /* write early event to the poll queue */ +- +-struct snd_timer_params { +- unsigned int flags; /* flags - SNDRV_TIMER_PSFLG_* */ +- unsigned int ticks; /* requested resolution in ticks */ +- unsigned int queue_size; /* total size of queue (32-1024) */ +- unsigned int reserved0; /* reserved, was: failure locations */ +- unsigned int filter; /* event filter (bitmask of SNDRV_TIMER_EVENT_*) */ +- unsigned char reserved[60]; /* reserved */ +-}; +- +-struct snd_timer_status { +- struct timespec tstamp; /* Timestamp - last update */ +- unsigned int resolution; /* current period resolution in ns */ +- unsigned int lost; /* counter of master tick lost */ +- unsigned int overrun; /* count of read queue overruns */ +- unsigned int queue; /* used queue size */ +- unsigned char reserved[64]; /* reserved */ +-}; +- +-#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int) +-#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id) +-#define SNDRV_TIMER_IOCTL_TREAD _IOW('T', 0x02, int) +-#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo) +-#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams) +-#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus) +-#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select) +-#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info) +-#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params) +-#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status) +-/* The following four ioctls are changed since 1.0.9 due to confliction */ +-#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0) +-#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1) +-#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2) +-#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3) +- +-struct snd_timer_read { +- unsigned int resolution; +- unsigned int ticks; +-}; +- +-enum { +- SNDRV_TIMER_EVENT_RESOLUTION = 0, /* val = resolution in ns */ +- SNDRV_TIMER_EVENT_TICK, /* val = ticks */ +- SNDRV_TIMER_EVENT_START, /* val = resolution in ns */ +- SNDRV_TIMER_EVENT_STOP, /* val = 0 */ +- SNDRV_TIMER_EVENT_CONTINUE, /* val = resolution in ns */ +- SNDRV_TIMER_EVENT_PAUSE, /* val = 0 */ +- SNDRV_TIMER_EVENT_EARLY, /* val = 0, early event */ +- SNDRV_TIMER_EVENT_SUSPEND, /* val = 0 */ +- SNDRV_TIMER_EVENT_RESUME, /* val = resolution in ns */ +- /* master timer events for slave timer instances */ +- SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10, +- SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10, +- SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10, +- SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10, +- SNDRV_TIMER_EVENT_MSUSPEND = SNDRV_TIMER_EVENT_SUSPEND + 10, +- SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10, +-}; +- +-struct snd_timer_tread { +- int event; +- struct timespec tstamp; +- unsigned int val; +-}; +- +-/**************************************************************************** +- * * +- * Section for driver control interface - /dev/snd/control? * +- * * +- ****************************************************************************/ +- +-#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7) +- +-struct snd_ctl_card_info { +- int card; /* card number */ +- int pad; /* reserved for future (was type) */ +- unsigned char id[16]; /* ID of card (user selectable) */ +- unsigned char driver[16]; /* Driver name */ +- unsigned char name[32]; /* Short name of soundcard */ +- unsigned char longname[80]; /* name + info text about soundcard */ +- unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */ +- unsigned char mixername[80]; /* visual mixer identification */ +- unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */ +-}; +- +-typedef int __bitwise snd_ctl_elem_type_t; +-#define SNDRV_CTL_ELEM_TYPE_NONE ((__force snd_ctl_elem_type_t) 0) /* invalid */ +-#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) 1) /* boolean type */ +-#define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) 2) /* integer type */ +-#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((__force snd_ctl_elem_type_t) 3) /* enumerated type */ +-#define SNDRV_CTL_ELEM_TYPE_BYTES ((__force snd_ctl_elem_type_t) 4) /* byte array */ +-#define SNDRV_CTL_ELEM_TYPE_IEC958 ((__force snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */ +-#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6) /* 64-bit integer type */ +-#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64 +- +-typedef int __bitwise snd_ctl_elem_iface_t; +-#define SNDRV_CTL_ELEM_IFACE_CARD ((__force snd_ctl_elem_iface_t) 0) /* global control */ +-#define SNDRV_CTL_ELEM_IFACE_HWDEP ((__force snd_ctl_elem_iface_t) 1) /* hardware dependent device */ +-#define SNDRV_CTL_ELEM_IFACE_MIXER ((__force snd_ctl_elem_iface_t) 2) /* virtual mixer device */ +-#define SNDRV_CTL_ELEM_IFACE_PCM ((__force snd_ctl_elem_iface_t) 3) /* PCM device */ +-#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((__force snd_ctl_elem_iface_t) 4) /* RawMidi device */ +-#define SNDRV_CTL_ELEM_IFACE_TIMER ((__force snd_ctl_elem_iface_t) 5) /* timer device */ +-#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((__force snd_ctl_elem_iface_t) 6) /* sequencer client */ +-#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER +- +-#define SNDRV_CTL_ELEM_ACCESS_READ (1<<0) +-#define SNDRV_CTL_ELEM_ACCESS_WRITE (1<<1) +-#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE) +-#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1<<2) /* control value may be changed without a notification */ +-#define SNDRV_CTL_ELEM_ACCESS_TIMESTAMP (1<<3) /* when was control changed */ +-#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1<<4) /* TLV read is possible */ +-#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1<<5) /* TLV write is possible */ +-#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ|SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) +-#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1<<6) /* TLV command is possible */ +-#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1<<8) /* control does actually nothing, but may be updated */ +-#define SNDRV_CTL_ELEM_ACCESS_LOCK (1<<9) /* write lock */ +-#define SNDRV_CTL_ELEM_ACCESS_OWNER (1<<10) /* write lock owner */ +-#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1<<28) /* kernel use a TLV callback */ +-#define SNDRV_CTL_ELEM_ACCESS_USER (1<<29) /* user space element */ +-/* bits 30 and 31 are obsoleted (for indirect access) */ +- +-/* for further details see the ACPI and PCI power management specification */ +-#define SNDRV_CTL_POWER_D0 0x0000 /* full On */ +-#define SNDRV_CTL_POWER_D1 0x0100 /* partial On */ +-#define SNDRV_CTL_POWER_D2 0x0200 /* partial On */ +-#define SNDRV_CTL_POWER_D3 0x0300 /* Off */ +-#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3|0x0000) /* Off, with power */ +-#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3|0x0001) /* Off, without power */ +- +-#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44 +- +-struct snd_ctl_elem_id { +- unsigned int numid; /* numeric identifier, zero = invalid */ +- snd_ctl_elem_iface_t iface; /* interface identifier */ +- unsigned int device; /* device/client number */ +- unsigned int subdevice; /* subdevice (substream) number */ +- unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* ASCII name of item */ +- unsigned int index; /* index of item */ +-}; +- +-struct snd_ctl_elem_list { +- unsigned int offset; /* W: first element ID to get */ +- unsigned int space; /* W: count of element IDs to get */ +- unsigned int used; /* R: count of element IDs set */ +- unsigned int count; /* R: count of all elements */ +- struct snd_ctl_elem_id __user *pids; /* R: IDs */ +- unsigned char reserved[50]; +-}; +- +-struct snd_ctl_elem_info { +- struct snd_ctl_elem_id id; /* W: element ID */ +- snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */ +- unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */ +- unsigned int count; /* count of values */ +- __kernel_pid_t owner; /* owner's PID of this control */ +- union { +- struct { +- long min; /* R: minimum value */ +- long max; /* R: maximum value */ +- long step; /* R: step (0 variable) */ +- } integer; +- struct { +- long long min; /* R: minimum value */ +- long long max; /* R: maximum value */ +- long long step; /* R: step (0 variable) */ +- } integer64; +- struct { +- unsigned int items; /* R: number of items */ +- unsigned int item; /* W: item number */ +- char name[64]; /* R: value name */ +- __u64 names_ptr; /* W: names list (ELEM_ADD only) */ +- unsigned int names_length; +- } enumerated; +- unsigned char reserved[128]; +- } value; +- union { +- unsigned short d[4]; /* dimensions */ +- unsigned short *d_ptr; /* indirect - obsoleted */ +- } dimen; +- unsigned char reserved[64-4*sizeof(unsigned short)]; +-}; +- +-struct snd_ctl_elem_value { +- struct snd_ctl_elem_id id; /* W: element ID */ +- unsigned int indirect: 1; /* W: indirect access - obsoleted */ +- union { +- union { +- long value[128]; +- long *value_ptr; /* obsoleted */ +- } integer; +- union { +- long long value[64]; +- long long *value_ptr; /* obsoleted */ +- } integer64; +- union { +- unsigned int item[128]; +- unsigned int *item_ptr; /* obsoleted */ +- } enumerated; +- union { +- unsigned char data[512]; +- unsigned char *data_ptr; /* obsoleted */ +- } bytes; +- struct snd_aes_iec958 iec958; +- } value; /* RO */ +- struct timespec tstamp; +- unsigned char reserved[128-sizeof(struct timespec)]; +-}; +- +-struct snd_ctl_tlv { +- unsigned int numid; /* control element numeric identification */ +- unsigned int length; /* in bytes aligned to 4 */ +- unsigned int tlv[0]; /* first TLV */ +-}; +- +-#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int) +-#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info) +-#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list) +-#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info) +-#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value) +-#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value) +-#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id) +-#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id) +-#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int) +-#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info) +-#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info) +-#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id) +-#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv) +-#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv) +-#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv) +-#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int) +-#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info) +-#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int) +-#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info) +-#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int) +-#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int) +-#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info) +-#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int) +-#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int) +-#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int) +- +-/* +- * Read interface. +- */ +- +-enum sndrv_ctl_event_type { +- SNDRV_CTL_EVENT_ELEM = 0, +- SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM, +-}; +- +-#define SNDRV_CTL_EVENT_MASK_VALUE (1<<0) /* element value was changed */ +-#define SNDRV_CTL_EVENT_MASK_INFO (1<<1) /* element info was changed */ +-#define SNDRV_CTL_EVENT_MASK_ADD (1<<2) /* element was added */ +-#define SNDRV_CTL_EVENT_MASK_TLV (1<<3) /* element TLV tree was changed */ +-#define SNDRV_CTL_EVENT_MASK_REMOVE (~0U) /* element was removed */ +- +-struct snd_ctl_event { +- int type; /* event type - SNDRV_CTL_EVENT_* */ +- union { +- struct { +- unsigned int mask; +- struct snd_ctl_elem_id id; +- } elem; +- unsigned char data8[60]; +- } data; +-}; +- +-/* +- * Control names +- */ +- +-#define SNDRV_CTL_NAME_NONE "" +-#define SNDRV_CTL_NAME_PLAYBACK "Playback " +-#define SNDRV_CTL_NAME_CAPTURE "Capture " +- +-#define SNDRV_CTL_NAME_IEC958_NONE "" +-#define SNDRV_CTL_NAME_IEC958_SWITCH "Switch" +-#define SNDRV_CTL_NAME_IEC958_VOLUME "Volume" +-#define SNDRV_CTL_NAME_IEC958_DEFAULT "Default" +-#define SNDRV_CTL_NAME_IEC958_MASK "Mask" +-#define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask" +-#define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask" +-#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream" +-#define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what +- +-#endif /* _UAPI__SOUND_ASOUND_H */ ++#include <alsa/sound/uapi/asound.h> +diff --git a/include/sound/asound_fm.h b/include/sound/asound_fm.h +index 8471f404..3e5da4d0 100644 +--- a/include/sound/asound_fm.h ++++ b/include/sound/asound_fm.h +@@ -1,135 +1 @@ +-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +-#ifndef __SOUND_ASOUND_FM_H +-#define __SOUND_ASOUND_FM_H +- +-/* +- * Advanced Linux Sound Architecture - ALSA +- * +- * Interface file between ALSA driver & user space +- * Copyright (c) 1994-98 by Jaroslav Kysela <perex@perex.cz>, +- * 4Front Technologies +- * +- * Direct FM control +- * +- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * +- */ +- +-#define SNDRV_DM_FM_MODE_OPL2 0x00 +-#define SNDRV_DM_FM_MODE_OPL3 0x01 +- +-struct snd_dm_fm_info { +- unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */ +- unsigned char rhythm; /* percussion mode flag */ +-}; +- +-/* +- * Data structure composing an FM "note" or sound event. +- */ +- +-struct snd_dm_fm_voice { +- unsigned char op; /* operator cell (0 or 1) */ +- unsigned char voice; /* FM voice (0 to 17) */ +- +- unsigned char am; /* amplitude modulation */ +- unsigned char vibrato; /* vibrato effect */ +- unsigned char do_sustain; /* sustain phase */ +- unsigned char kbd_scale; /* keyboard scaling */ +- unsigned char harmonic; /* 4 bits: harmonic and multiplier */ +- unsigned char scale_level; /* 2 bits: decrease output freq rises */ +- unsigned char volume; /* 6 bits: volume */ +- +- unsigned char attack; /* 4 bits: attack rate */ +- unsigned char decay; /* 4 bits: decay rate */ +- unsigned char sustain; /* 4 bits: sustain level */ +- unsigned char release; /* 4 bits: release rate */ +- +- unsigned char feedback; /* 3 bits: feedback for op0 */ +- unsigned char connection; /* 0 for serial, 1 for parallel */ +- unsigned char left; /* stereo left */ +- unsigned char right; /* stereo right */ +- unsigned char waveform; /* 3 bits: waveform shape */ +-}; +- +-/* +- * This describes an FM note by its voice, octave, frequency number (10bit) +- * and key on/off. +- */ +- +-struct snd_dm_fm_note { +- unsigned char voice; /* 0-17 voice channel */ +- unsigned char octave; /* 3 bits: what octave to play */ +- unsigned int fnum; /* 10 bits: frequency number */ +- unsigned char key_on; /* set for active, clear for silent */ +-}; +- +-/* +- * FM parameters that apply globally to all voices, and thus are not "notes" +- */ +- +-struct snd_dm_fm_params { +- unsigned char am_depth; /* amplitude modulation depth (1=hi) */ +- unsigned char vib_depth; /* vibrato depth (1=hi) */ +- unsigned char kbd_split; /* keyboard split */ +- unsigned char rhythm; /* percussion mode select */ +- +- /* This block is the percussion instrument data */ +- unsigned char bass; +- unsigned char snare; +- unsigned char tomtom; +- unsigned char cymbal; +- unsigned char hihat; +-}; +- +-/* +- * FM mode ioctl settings +- */ +- +-#define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info) +-#define SNDRV_DM_FM_IOCTL_RESET _IO ('H', 0x21) +-#define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note) +-#define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice) +-#define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params) +-#define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int) +-/* for OPL3 only */ +-#define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int) +-/* SBI patch management */ +-#define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO ('H', 0x40) +- +-#define SNDRV_DM_FM_OSS_IOCTL_RESET 0x20 +-#define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE 0x21 +-#define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE 0x22 +-#define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS 0x23 +-#define SNDRV_DM_FM_OSS_IOCTL_SET_MODE 0x24 +-#define SNDRV_DM_FM_OSS_IOCTL_SET_OPL 0x25 +- +-/* +- * Patch Record - fixed size for write +- */ +- +-#define FM_KEY_SBI "SBI\032" +-#define FM_KEY_2OP "2OP\032" +-#define FM_KEY_4OP "4OP\032" +- +-struct sbi_patch { +- unsigned char prog; +- unsigned char bank; +- char key[4]; +- char name[25]; +- char extension[7]; +- unsigned char data[32]; +-}; +- +-#endif /* __SOUND_ASOUND_FM_H */ ++#include <alsa/sound/uapi/asound_fm.h> +diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h +index 042c5a6f..f06ecee5 100644 +--- a/include/sound/emu10k1.h ++++ b/include/sound/emu10k1.h +@@ -1,381 +1,2 @@ +-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +-/* +- * Copyright (c) by Jaroslav Kysela <perex@perex.cz>, +- * Creative Labs, Inc. +- * Definitions for EMU10K1 (SB Live!) chips +- * +- * +- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * +- */ +-#ifndef _UAPI__SOUND_EMU10K1_H +-#define _UAPI__SOUND_EMU10K1_H +- +-#include <linux/types.h> +-#include <sound/asound.h> +- +-/* +- * ---- FX8010 ---- +- */ +- +-#define EMU10K1_CARD_CREATIVE 0x00000000 +-#define EMU10K1_CARD_EMUAPS 0x00000001 +- +-#define EMU10K1_FX8010_PCM_COUNT 8 +- +-/* +- * Following definition is copied from linux/types.h to support compiling +- * this header file in userspace since they are not generally available for +- * uapi headers. +- */ +-#define __EMU10K1_DECLARE_BITMAP(name,bits) \ +- unsigned long name[(bits) / (sizeof(unsigned long) * 8)] +- +-/* instruction set */ +-#define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */ +-#define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */ +-#define iMAC2 0x02 /* R = A + (X * Y >> 31) ; wraparound */ +-#define iMAC3 0x03 /* R = A + (-X * Y >> 31) ; wraparound */ +-#define iMACINT0 0x04 /* R = A + X * Y ; saturation */ +-#define iMACINT1 0x05 /* R = A + X * Y ; wraparound (31-bit) */ +-#define iACC3 0x06 /* R = A + X + Y ; saturation */ +-#define iMACMV 0x07 /* R = A, acc += X * Y >> 31 */ +-#define iANDXOR 0x08 /* R = (A & X) ^ Y */ +-#define iTSTNEG 0x09 /* R = (A >= Y) ? X : ~X */ +-#define iLIMITGE 0x0a /* R = (A >= Y) ? X : Y */ +-#define iLIMITLT 0x0b /* R = (A < Y) ? X : Y */ +-#define iLOG 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */ +-#define iEXP 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */ +-#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */ +-#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */ +- +-/* GPRs */ +-#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */ +-#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */ +-#define EXTOUT(x) (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */ +-#define FXBUS2(x) (0x30 + (x)) /* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC high 16 bits */ +- /* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */ +- +-#define C_00000000 0x40 +-#define C_00000001 0x41 +-#define C_00000002 0x42 +-#define C_00000003 0x43 +-#define C_00000004 0x44 +-#define C_00000008 0x45 +-#define C_00000010 0x46 +-#define C_00000020 0x47 +-#define C_00000100 0x48 +-#define C_00010000 0x49 +-#define C_00080000 0x4a +-#define C_10000000 0x4b +-#define C_20000000 0x4c +-#define C_40000000 0x4d +-#define C_80000000 0x4e +-#define C_7fffffff 0x4f +-#define C_ffffffff 0x50 +-#define C_fffffffe 0x51 +-#define C_c0000000 0x52 +-#define C_4f1bbcdc 0x53 +-#define C_5a7ef9db 0x54 +-#define C_00100000 0x55 /* ?? */ +-#define GPR_ACCU 0x56 /* ACCUM, accumulator */ +-#define GPR_COND 0x57 /* CCR, condition register */ +-#define GPR_NOISE0 0x58 /* noise source */ +-#define GPR_NOISE1 0x59 /* noise source */ +-#define GPR_IRQ 0x5a /* IRQ register */ +-#define GPR_DBAC 0x5b /* TRAM Delay Base Address Counter */ +-#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */ +-#define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ +-#define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ +-#define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ +-#define ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ +- +-#define A_ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ +-#define A_ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ +-#define A_ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ +-#define A_ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ +-#define A_ITRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ +-#define A_ETRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ +- +-#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */ +-#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */ +-#define A_P16VIN(x) (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */ +-#define A_EXTOUT(x) (0x60 + (x)) /* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f unknown */ +-#define A_FXBUS2(x) (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */ +-#define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" - ??? */ +-#define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_1 - _F" - ??? */ +-#define A3_EMU32IN(x) (0x160 + (x)) /* x = 0x00 - 0x3f "EMU32_IN_00 - _3F" - Only when .device = 0x0008 */ +-#define A3_EMU32OUT(x) (0x1E0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_00 - _3F" - Only when .device = 0x0008 */ +-#define A_GPR(x) (A_FXGPREGBASE + (x)) +- +-/* cc_reg constants */ +-#define CC_REG_NORMALIZED C_00000001 +-#define CC_REG_BORROW C_00000002 +-#define CC_REG_MINUS C_00000004 +-#define CC_REG_ZERO C_00000008 +-#define CC_REG_SATURATE C_00000010 +-#define CC_REG_NONZERO C_00000100 +- +-/* FX buses */ +-#define FXBUS_PCM_LEFT 0x00 +-#define FXBUS_PCM_RIGHT 0x01 +-#define FXBUS_PCM_LEFT_REAR 0x02 +-#define FXBUS_PCM_RIGHT_REAR 0x03 +-#define FXBUS_MIDI_LEFT 0x04 +-#define FXBUS_MIDI_RIGHT 0x05 +-#define FXBUS_PCM_CENTER 0x06 +-#define FXBUS_PCM_LFE 0x07 +-#define FXBUS_PCM_LEFT_FRONT 0x08 +-#define FXBUS_PCM_RIGHT_FRONT 0x09 +-#define FXBUS_MIDI_REVERB 0x0c +-#define FXBUS_MIDI_CHORUS 0x0d +-#define FXBUS_PCM_LEFT_SIDE 0x0e +-#define FXBUS_PCM_RIGHT_SIDE 0x0f +-#define FXBUS_PT_LEFT 0x14 +-#define FXBUS_PT_RIGHT 0x15 +- +-/* Inputs */ +-#define EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */ +-#define EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */ +-#define EXTIN_SPDIF_CD_L 0x02 /* internal S/PDIF CD - onboard - left */ +-#define EXTIN_SPDIF_CD_R 0x03 /* internal S/PDIF CD - onboard - right */ +-#define EXTIN_ZOOM_L 0x04 /* Zoom Video I2S - left */ +-#define EXTIN_ZOOM_R 0x05 /* Zoom Video I2S - right */ +-#define EXTIN_TOSLINK_L 0x06 /* LiveDrive - TOSLink Optical - left */ +-#define EXTIN_TOSLINK_R 0x07 /* LiveDrive - TOSLink Optical - right */ +-#define EXTIN_LINE1_L 0x08 /* LiveDrive - Line/Mic 1 - left */ +-#define EXTIN_LINE1_R 0x09 /* LiveDrive - Line/Mic 1 - right */ +-#define EXTIN_COAX_SPDIF_L 0x0a /* LiveDrive - Coaxial S/PDIF - left */ +-#define EXTIN_COAX_SPDIF_R 0x0b /* LiveDrive - Coaxial S/PDIF - right */ +-#define EXTIN_LINE2_L 0x0c /* LiveDrive - Line/Mic 2 - left */ +-#define EXTIN_LINE2_R 0x0d /* LiveDrive - Line/Mic 2 - right */ +- +-/* Outputs */ +-#define EXTOUT_AC97_L 0x00 /* AC'97 playback channel - left */ +-#define EXTOUT_AC97_R 0x01 /* AC'97 playback channel - right */ +-#define EXTOUT_TOSLINK_L 0x02 /* LiveDrive - TOSLink Optical - left */ +-#define EXTOUT_TOSLINK_R 0x03 /* LiveDrive - TOSLink Optical - right */ +-#define EXTOUT_AC97_CENTER 0x04 /* SB Live 5.1 - center */ +-#define EXTOUT_AC97_LFE 0x05 /* SB Live 5.1 - LFE */ +-#define EXTOUT_HEADPHONE_L 0x06 /* LiveDrive - Headphone - left */ +-#define EXTOUT_HEADPHONE_R 0x07 /* LiveDrive - Headphone - right */ +-#define EXTOUT_REAR_L 0x08 /* Rear channel - left */ +-#define EXTOUT_REAR_R 0x09 /* Rear channel - right */ +-#define EXTOUT_ADC_CAP_L 0x0a /* ADC Capture buffer - left */ +-#define EXTOUT_ADC_CAP_R 0x0b /* ADC Capture buffer - right */ +-#define EXTOUT_MIC_CAP 0x0c /* MIC Capture buffer */ +-#define EXTOUT_AC97_REAR_L 0x0d /* SB Live 5.1 (c) 2003 - Rear Left */ +-#define EXTOUT_AC97_REAR_R 0x0e /* SB Live 5.1 (c) 2003 - Rear Right */ +-#define EXTOUT_ACENTER 0x11 /* Analog Center */ +-#define EXTOUT_ALFE 0x12 /* Analog LFE */ +- +-/* Audigy Inputs */ +-#define A_EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */ +-#define A_EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */ +-#define A_EXTIN_SPDIF_CD_L 0x02 /* digital CD left */ +-#define A_EXTIN_SPDIF_CD_R 0x03 /* digital CD left */ +-#define A_EXTIN_OPT_SPDIF_L 0x04 /* audigy drive Optical SPDIF - left */ +-#define A_EXTIN_OPT_SPDIF_R 0x05 /* right */ +-#define A_EXTIN_LINE2_L 0x08 /* audigy drive line2/mic2 - left */ +-#define A_EXTIN_LINE2_R 0x09 /* right */ +-#define A_EXTIN_ADC_L 0x0a /* Philips ADC - left */ +-#define A_EXTIN_ADC_R 0x0b /* right */ +-#define A_EXTIN_AUX2_L 0x0c /* audigy drive aux2 - left */ +-#define A_EXTIN_AUX2_R 0x0d /* - right */ +- +-/* Audigiy Outputs */ +-#define A_EXTOUT_FRONT_L 0x00 /* digital front left */ +-#define A_EXTOUT_FRONT_R 0x01 /* right */ +-#define A_EXTOUT_CENTER 0x02 /* digital front center */ +-#define A_EXTOUT_LFE 0x03 /* digital front lfe */ +-#define A_EXTOUT_HEADPHONE_L 0x04 /* headphone audigy drive left */ +-#define A_EXTOUT_HEADPHONE_R 0x05 /* right */ +-#define A_EXTOUT_REAR_L 0x06 /* digital rear left */ +-#define A_EXTOUT_REAR_R 0x07 /* right */ +-#define A_EXTOUT_AFRONT_L 0x08 /* analog front left */ +-#define A_EXTOUT_AFRONT_R 0x09 /* right */ +-#define A_EXTOUT_ACENTER 0x0a /* analog center */ +-#define A_EXTOUT_ALFE 0x0b /* analog LFE */ +-#define A_EXTOUT_ASIDE_L 0x0c /* analog side left - Audigy 2 ZS */ +-#define A_EXTOUT_ASIDE_R 0x0d /* right - Audigy 2 ZS */ +-#define A_EXTOUT_AREAR_L 0x0e /* analog rear left */ +-#define A_EXTOUT_AREAR_R 0x0f /* right */ +-#define A_EXTOUT_AC97_L 0x10 /* AC97 left (front) */ +-#define A_EXTOUT_AC97_R 0x11 /* right */ +-#define A_EXTOUT_ADC_CAP_L 0x16 /* ADC capture buffer left */ +-#define A_EXTOUT_ADC_CAP_R 0x17 /* right */ +-#define A_EXTOUT_MIC_CAP 0x18 /* Mic capture buffer */ +- +-/* Audigy constants */ +-#define A_C_00000000 0xc0 +-#define A_C_00000001 0xc1 +-#define A_C_00000002 0xc2 +-#define A_C_00000003 0xc3 +-#define A_C_00000004 0xc4 +-#define A_C_00000008 0xc5 +-#define A_C_00000010 0xc6 +-#define A_C_00000020 0xc7 +-#define A_C_00000100 0xc8 +-#define A_C_00010000 0xc9 +-#define A_C_00000800 0xca +-#define A_C_10000000 0xcb +-#define A_C_20000000 0xcc +-#define A_C_40000000 0xcd +-#define A_C_80000000 0xce +-#define A_C_7fffffff 0xcf +-#define A_C_ffffffff 0xd0 +-#define A_C_fffffffe 0xd1 +-#define A_C_c0000000 0xd2 +-#define A_C_4f1bbcdc 0xd3 +-#define A_C_5a7ef9db 0xd4 +-#define A_C_00100000 0xd5 +-#define A_GPR_ACCU 0xd6 /* ACCUM, accumulator */ +-#define A_GPR_COND 0xd7 /* CCR, condition register */ +-#define A_GPR_NOISE0 0xd8 /* noise source */ +-#define A_GPR_NOISE1 0xd9 /* noise source */ +-#define A_GPR_IRQ 0xda /* IRQ register */ +-#define A_GPR_DBAC 0xdb /* TRAM Delay Base Address Counter - internal */ +-#define A_GPR_DBACE 0xde /* TRAM Delay Base Address Counter - external */ +- +-/* definitions for debug register */ +-#define EMU10K1_DBG_ZC 0x80000000 /* zero tram counter */ +-#define EMU10K1_DBG_SATURATION_OCCURED 0x02000000 /* saturation control */ +-#define EMU10K1_DBG_SATURATION_ADDR 0x01ff0000 /* saturation address */ +-#define EMU10K1_DBG_SINGLE_STEP 0x00008000 /* single step mode */ +-#define EMU10K1_DBG_STEP 0x00004000 /* start single step */ +-#define EMU10K1_DBG_CONDITION_CODE 0x00003e00 /* condition code */ +-#define EMU10K1_DBG_SINGLE_STEP_ADDR 0x000001ff /* single step address */ +- +-/* tank memory address line */ +-#ifndef __KERNEL__ +-#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */ +-#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */ +-#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */ +-#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */ +-#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */ +-#endif +- +-struct snd_emu10k1_fx8010_info { +- unsigned int internal_tram_size; /* in samples */ +- unsigned int external_tram_size; /* in samples */ +- char fxbus_names[16][32]; /* names of FXBUSes */ +- char extin_names[16][32]; /* names of external inputs */ +- char extout_names[32][32]; /* names of external outputs */ +- unsigned int gpr_controls; /* count of GPR controls */ +-}; +- +-#define EMU10K1_GPR_TRANSLATION_NONE 0 +-#define EMU10K1_GPR_TRANSLATION_TABLE100 1 +-#define EMU10K1_GPR_TRANSLATION_BASS 2 +-#define EMU10K1_GPR_TRANSLATION_TREBLE 3 +-#define EMU10K1_GPR_TRANSLATION_ONOFF 4 +- +-struct snd_emu10k1_fx8010_control_gpr { +- struct snd_ctl_elem_id id; /* full control ID definition */ +- unsigned int vcount; /* visible count */ +- unsigned int count; /* count of GPR (1..16) */ +- unsigned short gpr[32]; /* GPR number(s) */ +- unsigned int value[32]; /* initial values */ +- unsigned int min; /* minimum range */ +- unsigned int max; /* maximum range */ +- unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ +- const unsigned int *tlv; +-}; +- +-/* old ABI without TLV support */ +-struct snd_emu10k1_fx8010_control_old_gpr { +- struct snd_ctl_elem_id id; +- unsigned int vcount; +- unsigned int count; +- unsigned short gpr[32]; +- unsigned int value[32]; +- unsigned int min; +- unsigned int max; +- unsigned int translation; +-}; +- +-struct snd_emu10k1_fx8010_code { +- char name[128]; +- +- __EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ +- __u32 __user *gpr_map; /* initializers */ +- +- unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ +- struct snd_emu10k1_fx8010_control_gpr __user *gpr_add_controls; /* GPR controls to add/replace */ +- +- unsigned int gpr_del_control_count; /* count of GPR controls to remove */ +- struct snd_ctl_elem_id __user *gpr_del_controls; /* IDs of GPR controls to remove */ +- +- unsigned int gpr_list_control_count; /* count of GPR controls to list */ +- unsigned int gpr_list_control_total; /* total count of GPR controls */ +- struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */ +- +- __EMU10K1_DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ +- __u32 __user *tram_data_map; /* data initializers */ +- __u32 __user *tram_addr_map; /* map initializers */ +- +- __EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ +- __u32 __user *code; /* one instruction - 64 bits */ +-}; +- +-struct snd_emu10k1_fx8010_tram { +- unsigned int address; /* 31.bit == 1 -> external TRAM */ +- unsigned int size; /* size in samples (4 bytes) */ +- unsigned int *samples; /* pointer to samples (20-bit) */ +- /* NULL->clear memory */ +-}; +- +-struct snd_emu10k1_fx8010_pcm_rec { +- unsigned int substream; /* substream number */ +- unsigned int res1; /* reserved */ +- unsigned int channels; /* 16-bit channels count, zero = remove this substream */ +- unsigned int tram_start; /* ring buffer position in TRAM (in samples) */ +- unsigned int buffer_size; /* count of buffered samples */ +- unsigned short gpr_size; /* GPR containing size of ringbuffer in samples (host) */ +- unsigned short gpr_ptr; /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */ +- unsigned short gpr_count; /* GPR containing count of samples between two interrupts (host) */ +- unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */ +- unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */ +- unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */ +- unsigned char pad; /* reserved */ +- unsigned char etram[32]; /* external TRAM address & data (one per channel) */ +- unsigned int res2; /* reserved */ +-}; +- +-#define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) +- +-#define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info) +-#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code) +-#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code) +-#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW ('H', 0x20, int) +-#define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW ('H', 0x21, struct snd_emu10k1_fx8010_tram) +-#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram) +-#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec) +-#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec) +-#define SNDRV_EMU10K1_IOCTL_PVERSION _IOR ('H', 0x40, int) +-#define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80) +-#define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81) +-#define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82) +-#define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int) +-#define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int) +- +-/* typedefs for compatibility to user-space */ +-typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t; +-typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t; +-typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t; +-typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t; +-typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t; +- +-#endif /* _UAPI__SOUND_EMU10K1_H */ ++#include <alsa/sound/type_compat.h> ++#include <alsa/sound/uapi/emu10k1.h> +diff --git a/include/sound/hdsp.h b/include/sound/hdsp.h +index 5dc0c3db..78fb745b 100644 +--- a/include/sound/hdsp.h ++++ b/include/sound/hdsp.h +@@ -1,111 +1,2 @@ +-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +-#ifndef __SOUND_HDSP_H +-#define __SOUND_HDSP_H +- +-/* +- * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) +- * +- * 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., 675 Mass Ave, Cambridge, MA 02139, USA. +- */ +- +-#include <linux/types.h> +- +-#define HDSP_MATRIX_MIXER_SIZE 2048 +- +-enum HDSP_IO_Type { +- Digiface, +- Multiface, +- H9652, +- H9632, +- RPM, +- Undefined, +-}; +- +-struct hdsp_peak_rms { +- __u32 input_peaks[26]; +- __u32 playback_peaks[26]; +- __u32 output_peaks[28]; +- __u64 input_rms[26]; +- __u64 playback_rms[26]; +- /* These are only used for H96xx cards */ +- __u64 output_rms[26]; +-}; +- +-#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms) +- +-struct hdsp_config_info { +- unsigned char pref_sync_ref; +- unsigned char wordclock_sync_check; +- unsigned char spdif_sync_check; +- unsigned char adatsync_sync_check; +- unsigned char adat_sync_check[3]; +- unsigned char spdif_in; +- unsigned char spdif_out; +- unsigned char spdif_professional; +- unsigned char spdif_emphasis; +- unsigned char spdif_nonaudio; +- unsigned int spdif_sample_rate; +- unsigned int system_sample_rate; +- unsigned int autosync_sample_rate; +- unsigned char system_clock_mode; +- unsigned char clock_source; +- unsigned char autosync_ref; +- unsigned char line_out; +- unsigned char passthru; +- unsigned char da_gain; +- unsigned char ad_gain; +- unsigned char phone_gain; +- unsigned char xlr_breakout_cable; +- unsigned char analog_extension_board; +-}; +- +-#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info) +- +-struct hdsp_firmware { +- void __user *firmware_data; /* 24413 x 4 bytes */ +-}; +- +-#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware) +- +-struct hdsp_version { +- enum HDSP_IO_Type io_type; +- unsigned short firmware_rev; +-}; +- +-#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version) +- +-struct hdsp_mixer { +- unsigned short matrix[HDSP_MATRIX_MIXER_SIZE]; +-}; +- +-#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer) +- +-struct hdsp_9632_aeb { +- int aebi; +- int aebo; +-}; +- +-#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb) +- +-/* typedefs for compatibility to user-space */ +-typedef enum HDSP_IO_Type HDSP_IO_Type; +-typedef struct hdsp_peak_rms hdsp_peak_rms_t; +-typedef struct hdsp_config_info hdsp_config_info_t; +-typedef struct hdsp_firmware hdsp_firmware_t; +-typedef struct hdsp_version hdsp_version_t; +-typedef struct hdsp_mixer hdsp_mixer_t; +-typedef struct hdsp_9632_aeb hdsp_9632_aeb_t; +- +-#endif /* __SOUND_HDSP_H */ ++#include <alsa/sound/type_compat.h> ++#include <alsa/sound/uapi/hdsp.h> +diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h +index a38f3f79..af6d19ed 100644 +--- a/include/sound/hdspm.h ++++ b/include/sound/hdspm.h +@@ -1,232 +1,2 @@ +-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +-#ifndef __SOUND_HDSPM_H +-#define __SOUND_HDSPM_H +-/* +- * Copyright (C) 2003 Winfried Ritsch (IEM) +- * based on hdsp.h from Thomas Charbonnel (thomas@undata.org) +- * +- * +- * 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., 675 Mass Ave, Cambridge, MA 02139, USA. +- */ +- +-#include <linux/types.h> +- +-/* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */ +-#define HDSPM_MAX_CHANNELS 64 +- +-enum hdspm_io_type { +- MADI, +- MADIface, +- AIO, +- AES32, +- RayDAT +-}; +- +-enum hdspm_speed { +- ss, +- ds, +- qs +-}; +- +-/* -------------------- IOCTL Peak/RMS Meters -------------------- */ +- +-struct hdspm_peak_rms { +- __u32 input_peaks[64]; +- __u32 playback_peaks[64]; +- __u32 output_peaks[64]; +- +- __u64 input_rms[64]; +- __u64 playback_rms[64]; +- __u64 output_rms[64]; +- +- __u8 speed; /* enum {ss, ds, qs} */ +- int status2; +-}; +- +-#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \ +- _IOR('H', 0x42, struct hdspm_peak_rms) +- +-/* ------------ CONFIG block IOCTL ---------------------- */ +- +-struct hdspm_config { +- unsigned char pref_sync_ref; +- unsigned char wordclock_sync_check; +- unsigned char madi_sync_check; +- unsigned int system_sample_rate; +- unsigned int autosync_sample_rate; +- unsigned char system_clock_mode; +- unsigned char clock_source; +- unsigned char autosync_ref; +- unsigned char line_out; +- unsigned int passthru; +- unsigned int analog_out; +-}; +- +-#define SNDRV_HDSPM_IOCTL_GET_CONFIG \ +- _IOR('H', 0x41, struct hdspm_config) +- +-/* +- * If there's a TCO (TimeCode Option) board installed, +- * there are further options and status data available. +- * The hdspm_ltc structure contains the current SMPTE +- * timecode and some status information and can be +- * obtained via SNDRV_HDSPM_IOCTL_GET_LTC or in the +- * hdspm_status struct. +- */ +- +-enum hdspm_ltc_format { +- format_invalid, +- fps_24, +- fps_25, +- fps_2997, +- fps_30 +-}; +- +-enum hdspm_ltc_frame { +- frame_invalid, +- drop_frame, +- full_frame +-}; +- +-enum hdspm_ltc_input_format { +- ntsc, +- pal, +- no_video +-}; +- +-struct hdspm_ltc { +- unsigned int ltc; +- +- enum hdspm_ltc_format format; +- enum hdspm_ltc_frame frame; +- enum hdspm_ltc_input_format input_format; +-}; +- +-#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc) +- +-/* +- * The status data reflects the device's current state +- * as determined by the card's configuration and +- * connection status. +- */ +- +-enum hdspm_sync { +- hdspm_sync_no_lock = 0, +- hdspm_sync_lock = 1, +- hdspm_sync_sync = 2 +-}; +- +-enum hdspm_madi_input { +- hdspm_input_optical = 0, +- hdspm_input_coax = 1 +-}; +- +-enum hdspm_madi_channel_format { +- hdspm_format_ch_64 = 0, +- hdspm_format_ch_56 = 1 +-}; +- +-enum hdspm_madi_frame_format { +- hdspm_frame_48 = 0, +- hdspm_frame_96 = 1 +-}; +- +-enum hdspm_syncsource { +- syncsource_wc = 0, +- syncsource_madi = 1, +- syncsource_tco = 2, +- syncsource_sync = 3, +- syncsource_none = 4 +-}; +- +-struct hdspm_status { +- __u8 card_type; /* enum hdspm_io_type */ +- enum hdspm_syncsource autosync_source; +- +- __u64 card_clock; +- __u32 master_period; +- +- union { +- struct { +- __u8 sync_wc; /* enum hdspm_sync */ +- __u8 sync_madi; /* enum hdspm_sync */ +- __u8 sync_tco; /* enum hdspm_sync */ +- __u8 sync_in; /* enum hdspm_sync */ +- __u8 madi_input; /* enum hdspm_madi_input */ +- __u8 channel_format; /* enum hdspm_madi_channel_format */ +- __u8 frame_format; /* enum hdspm_madi_frame_format */ +- } madi; +- } card_specific; +-}; +- +-#define SNDRV_HDSPM_IOCTL_GET_STATUS \ +- _IOR('H', 0x47, struct hdspm_status) +- +-/* +- * Get information about the card and its add-ons. +- */ +- +-#define HDSPM_ADDON_TCO 1 +- +-struct hdspm_version { +- __u8 card_type; /* enum hdspm_io_type */ +- char cardname[20]; +- unsigned int serial; +- unsigned short firmware_rev; +- int addons; +-}; +- +-#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version) +- +-/* ------------- get Matrix Mixer IOCTL --------------- */ +- +-/* MADI mixer: 64inputs+64playback in 64outputs = 8192 => *4Byte = +- * 32768 Bytes +- */ +- +-/* organisation is 64 channelfader in a continuous memory block */ +-/* equivalent to hardware definition, maybe for future feature of mmap of +- * them +- */ +-/* each of 64 outputs has 64 infader and 64 outfader: +- Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */ +- +-#define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS +- +-struct hdspm_channelfader { +- unsigned int in[HDSPM_MIXER_CHANNELS]; +- unsigned int pb[HDSPM_MIXER_CHANNELS]; +-}; +- +-struct hdspm_mixer { +- struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS]; +-}; +- +-struct hdspm_mixer_ioctl { +- struct hdspm_mixer *mixer; +-}; +- +-/* use indirect access due to the limit of ioctl bit size */ +-#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl) +- +-/* typedefs for compatibility to user-space */ +-typedef struct hdspm_peak_rms hdspm_peak_rms_t; +-typedef struct hdspm_config_info hdspm_config_info_t; +-typedef struct hdspm_version hdspm_version_t; +-typedef struct hdspm_channelfader snd_hdspm_channelfader_t; +-typedef struct hdspm_mixer hdspm_mixer_t; +- +- +-#endif ++#include <alsa/sound/type_compat.h> ++#include <alsa/sound/uapi/hdspm.h> +diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h +index e6485148..24121fcb 100644 +--- a/include/sound/sb16_csp.h ++++ b/include/sound/sb16_csp.h +@@ -1,123 +1 @@ +-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +-/* +- * Copyright (c) 1999 by Uros Bizjak <uros@kss-loka.si> +- * Takashi Iwai <tiwai@suse.de> +- * +- * SB16ASP/AWE32 CSP control +- * +- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +- * +- */ +-#ifndef _UAPI__SOUND_SB16_CSP_H +-#define _UAPI__SOUND_SB16_CSP_H +- +- +-/* CSP modes */ +-#define SNDRV_SB_CSP_MODE_NONE 0x00 +-#define SNDRV_SB_CSP_MODE_DSP_READ 0x01 /* Record from DSP */ +-#define SNDRV_SB_CSP_MODE_DSP_WRITE 0x02 /* Play to DSP */ +-#define SNDRV_SB_CSP_MODE_QSOUND 0x04 /* QSound */ +- +-/* CSP load flags */ +-#define SNDRV_SB_CSP_LOAD_FROMUSER 0x01 +-#define SNDRV_SB_CSP_LOAD_INITBLOCK 0x02 +- +-/* CSP sample width */ +-#define SNDRV_SB_CSP_SAMPLE_8BIT 0x01 +-#define SNDRV_SB_CSP_SAMPLE_16BIT 0x02 +- +-/* CSP channels */ +-#define SNDRV_SB_CSP_MONO 0x01 +-#define SNDRV_SB_CSP_STEREO 0x02 +- +-/* CSP rates */ +-#define SNDRV_SB_CSP_RATE_8000 0x01 +-#define SNDRV_SB_CSP_RATE_11025 0x02 +-#define SNDRV_SB_CSP_RATE_22050 0x04 +-#define SNDRV_SB_CSP_RATE_44100 0x08 +-#define SNDRV_SB_CSP_RATE_ALL 0x0f +- +-/* CSP running state */ +-#define SNDRV_SB_CSP_ST_IDLE 0x00 +-#define SNDRV_SB_CSP_ST_LOADED 0x01 +-#define SNDRV_SB_CSP_ST_RUNNING 0x02 +-#define SNDRV_SB_CSP_ST_PAUSED 0x04 +-#define SNDRV_SB_CSP_ST_AUTO 0x08 +-#define SNDRV_SB_CSP_ST_QSOUND 0x10 +- +-/* maximum QSound value (180 degrees right) */ +-#define SNDRV_SB_CSP_QSOUND_MAX_RIGHT 0x20 +- +-/* maximum microcode RIFF file size */ +-#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000 +- +-/* microcode header */ +-struct snd_sb_csp_mc_header { +- char codec_name[16]; /* id name of codec */ +- unsigned short func_req; /* requested function */ +-}; +- +-/* microcode to be loaded */ +-struct snd_sb_csp_microcode { +- struct snd_sb_csp_mc_header info; +- unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE]; +-}; +- +-/* start CSP with sample_width in mono/stereo */ +-struct snd_sb_csp_start { +- int sample_width; /* sample width, look above */ +- int channels; /* channels, look above */ +-}; +- +-/* CSP information */ +-struct snd_sb_csp_info { +- char codec_name[16]; /* id name of codec */ +- unsigned short func_nr; /* function number */ +- unsigned int acc_format; /* accepted PCM formats */ +- unsigned short acc_channels; /* accepted channels */ +- unsigned short acc_width; /* accepted sample width */ +- unsigned short acc_rates; /* accepted sample rates */ +- unsigned short csp_mode; /* CSP mode, see above */ +- unsigned short run_channels; /* current channels */ +- unsigned short run_width; /* current sample width */ +- unsigned short version; /* version id: 0x10 - 0x1f */ +- unsigned short state; /* state bits */ +-}; +- +-/* HWDEP controls */ +-/* get CSP information */ +-#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info) +-/* load microcode to CSP */ +-/* NOTE: struct snd_sb_csp_microcode overflows the max size (13 bits) +- * defined for some architectures like MIPS, and it leads to build errors. +- * (x86 and co have 14-bit size, thus it's valid, though.) +- * As a workaround for skipping the size-limit check, here we don't use the +- * normal _IOW() macro but _IOC() with the manual argument. +- */ +-#define SNDRV_SB_CSP_IOCTL_LOAD_CODE \ +- _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode)) +-/* unload microcode from CSP */ +-#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) +-/* start CSP */ +-#define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start) +-/* stop CSP */ +-#define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14) +-/* pause CSP and DMA transfer */ +-#define SNDRV_SB_CSP_IOCTL_PAUSE _IO('H', 0x15) +-/* restart CSP and DMA transfer */ +-#define SNDRV_SB_CSP_IOCTL_RESTART _IO('H', 0x16) +- +- +-#endif /* _UAPI__SOUND_SB16_CSP_H */ ++#include <alsa/sound/uapi/sb16_csp.h> +diff --git a/include/sound/sscape_ioctl.h b/include/sound/sscape_ioctl.h +index c6653ebf..23b48d33 100644 +--- a/include/sound/sscape_ioctl.h ++++ b/include/sound/sscape_ioctl.h +@@ -1,21 +1 @@ +-#ifndef SSCAPE_IOCTL_H +-#define SSCAPE_IOCTL_H +- +- +-struct sscape_bootblock +-{ +- unsigned char code[256]; +- unsigned version; +-}; +- +-#define SSCAPE_MICROCODE_SIZE 65536 +- +-struct sscape_microcode +-{ +- unsigned char *code; +-}; +- +-#define SND_SSCAPE_LOAD_BOOTB _IOWR('P', 100, struct sscape_bootblock) +-#define SND_SSCAPE_LOAD_MCODE _IOW ('P', 101, struct sscape_microcode) +- +-#endif ++#include <alsa/sound/uapi/sscape_ioctl.h> +diff --git a/include/sound/tlv.h b/include/sound/tlv.h +index 7d6d65f6..e435a5fc 100644 +--- a/include/sound/tlv.h ++++ b/include/sound/tlv.h +@@ -1,117 +1 @@ +-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +-/* +- * 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. +- */ +- +-#ifndef __UAPI_SOUND_TLV_H +-#define __UAPI_SOUND_TLV_H +- +-#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */ +-#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ +-#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */ +-#define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */ +-#define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ +-#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */ +- +-/* +- * channel-mapping TLV items +- * TLV length must match with num_channels +- */ +-#define SNDRV_CTL_TLVT_CHMAP_FIXED 0x101 /* fixed channel position */ +-#define SNDRV_CTL_TLVT_CHMAP_VAR 0x102 /* channels freely swappable */ +-#define SNDRV_CTL_TLVT_CHMAP_PAIRED 0x103 /* pair-wise swappable */ +- +-/* +- * TLV structure is right behind the struct snd_ctl_tlv: +- * unsigned int type - see SNDRV_CTL_TLVT_* +- * unsigned int length +- * .... data aligned to sizeof(unsigned int), use +- * block_length = (length + (sizeof(unsigned int) - 1)) & +- * ~(sizeof(unsigned int) - 1)) .... +- */ +-#define SNDRV_CTL_TLVD_ITEM(type, ...) \ +- (type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__ +-#define SNDRV_CTL_TLVD_LENGTH(...) \ +- ((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ })) +- +-/* Accessor offsets for TLV data items */ +-#define SNDRV_CTL_TLVO_TYPE 0 +-#define SNDRV_CTL_TLVO_LEN 1 +- +-#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) \ +- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__) +-#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name, ...) \ +- unsigned int name[] = { \ +- SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) \ +- } +- +-#define SNDRV_CTL_TLVD_DB_SCALE_MASK 0xffff +-#define SNDRV_CTL_TLVD_DB_SCALE_MUTE 0x10000 +-#define SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \ +- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_SCALE, \ +- (min), \ +- ((step) & SNDRV_CTL_TLVD_DB_SCALE_MASK) | \ +- ((mute) ? SNDRV_CTL_TLVD_DB_SCALE_MUTE : 0)) +-#define SNDRV_CTL_TLVD_DECLARE_DB_SCALE(name, min, step, mute) \ +- unsigned int name[] = { \ +- SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \ +- } +- +-/* Accessor offsets for min, mute and step items in dB scale type TLV */ +-#define SNDRV_CTL_TLVO_DB_SCALE_MIN 2 +-#define SNDRV_CTL_TLVO_DB_SCALE_MUTE_AND_STEP 3 +- +-/* dB scale specified with min/max values instead of step */ +-#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \ +- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB)) +-#define SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \ +- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB)) +-#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(name, min_dB, max_dB) \ +- unsigned int name[] = { \ +- SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \ +- } +-#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE(name, min_dB, max_dB) \ +- unsigned int name[] = { \ +- SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \ +- } +- +-/* Accessor offsets for min, max items in db-minmax types of TLV. */ +-#define SNDRV_CTL_TLVO_DB_MINMAX_MIN 2 +-#define SNDRV_CTL_TLVO_DB_MINMAX_MAX 3 +- +-/* linear volume between min_dB and max_dB (.01dB unit) */ +-#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \ +- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB)) +-#define SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(name, min_dB, max_dB) \ +- unsigned int name[] = { \ +- SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \ +- } +- +-/* Accessor offsets for min, max items in db-linear type of TLV. */ +-#define SNDRV_CTL_TLVO_DB_LINEAR_MIN 2 +-#define SNDRV_CTL_TLVO_DB_LINEAR_MAX 3 +- +-/* dB range container: +- * Items in dB range container must be ordered by their values and by their +- * dB values. This implies that larger values must correspond with larger +- * dB values (which is also required for all other mixer controls). +- */ +-/* Each item is: <min> <max> <TLV> */ +-#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) \ +- SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__) +-#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name, ...) \ +- unsigned int name[] = { \ +- SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) \ +- } +- +-#define SNDRV_CTL_TLVD_DB_GAIN_MUTE -9999999 +- +-#endif ++#include <alsa/sound/uapi/tlv.h> +diff --git a/include/sound/type_compat.h b/include/sound/type_compat.h +index e973ff31..d4790c1f 100644 +--- a/include/sound/type_compat.h ++++ b/include/sound/type_compat.h +@@ -3,6 +3,9 @@ + + #ifndef DOC_HIDDEN + #include <stdint.h> ++#ifdef __linux__ ++#include <linux/types.h> ++#else + typedef uint8_t __u8; + typedef uint16_t __u16; + typedef uint32_t __u32; +@@ -37,6 +40,16 @@ typedef int32_t __s32; + #define __be32 __u32 + #define __be16 __u16 + #define __be8 __u8 ++#endif ++ ++#ifndef __user ++#define __user ++#endif ++ ++#ifndef __packed ++#define __packed __attribute__((__packed__)) ++#endif ++ + #endif /* DOC_HIDDEN */ + + #endif /* __TYPE_COMPAT_H */ +diff --git a/include/sound/uapi/Makefile.am b/include/sound/uapi/Makefile.am +new file mode 100644 +index 00000000..99197108 +--- /dev/null ++++ b/include/sound/uapi/Makefile.am +@@ -0,0 +1,6 @@ ++alsasounduapiincludedir = ${includedir}/alsa/sound/uapi ++ ++alsasounduapiinclude_HEADERS = asound_fm.h hdsp.h hdspm.h sb16_csp.h \ ++ sscape_ioctl.h emu10k1.h asoc.h tlv.h ++ ++noinst_HEADERS = asound.h asequencer.h +diff --git a/include/sound/uapi/asequencer.h b/include/sound/uapi/asequencer.h +new file mode 100644 +index 00000000..a75e14ed +--- /dev/null ++++ b/include/sound/uapi/asequencer.h +@@ -0,0 +1,612 @@ ++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ ++/* ++ * Main header file for the ALSA sequencer ++ * Copyright (c) 1998-1999 by Frank van de Pol <fvdpol@coil.demon.nl> ++ * (c) 1998-1999 by Jaroslav Kysela <perex@perex.cz> ++ * ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++#ifndef _UAPI__SOUND_ASEQUENCER_H ++#define _UAPI__SOUND_ASEQUENCER_H ++ ++#include <sound/asound.h> ++ ++/** version of the sequencer */ ++#define SNDRV_SEQ_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 2) ++ ++/** ++ * definition of sequencer event types ++ */ ++ ++/** system messages ++ * event data type = #snd_seq_result ++ */ ++#define SNDRV_SEQ_EVENT_SYSTEM 0 ++#define SNDRV_SEQ_EVENT_RESULT 1 ++ ++/** note messages (channel specific) ++ * event data type = #snd_seq_ev_note ++ */ ++#define SNDRV_SEQ_EVENT_NOTE 5 ++#define SNDRV_SEQ_EVENT_NOTEON 6 ++#define SNDRV_SEQ_EVENT_NOTEOFF 7 ++#define SNDRV_SEQ_EVENT_KEYPRESS 8 ++ ++/** control messages (channel specific) ++ * event data type = #snd_seq_ev_ctrl ++ */ ++#define SNDRV_SEQ_EVENT_CONTROLLER 10 ++#define SNDRV_SEQ_EVENT_PGMCHANGE 11 ++#define SNDRV_SEQ_EVENT_CHANPRESS 12 ++#define SNDRV_SEQ_EVENT_PITCHBEND 13 /**< from -8192 to 8191 */ ++#define SNDRV_SEQ_EVENT_CONTROL14 14 /**< 14 bit controller value */ ++#define SNDRV_SEQ_EVENT_NONREGPARAM 15 /**< 14 bit NRPN address + 14 bit unsigned value */ ++#define SNDRV_SEQ_EVENT_REGPARAM 16 /**< 14 bit RPN address + 14 bit unsigned value */ ++ ++/** synchronisation messages ++ * event data type = #snd_seq_ev_ctrl ++ */ ++#define SNDRV_SEQ_EVENT_SONGPOS 20 /* Song Position Pointer with LSB and MSB values */ ++#define SNDRV_SEQ_EVENT_SONGSEL 21 /* Song Select with song ID number */ ++#define SNDRV_SEQ_EVENT_QFRAME 22 /* midi time code quarter frame */ ++#define SNDRV_SEQ_EVENT_TIMESIGN 23 /* SMF Time Signature event */ ++#define SNDRV_SEQ_EVENT_KEYSIGN 24 /* SMF Key Signature event */ ++ ++/** timer messages ++ * event data type = snd_seq_ev_queue_control ++ */ ++#define SNDRV_SEQ_EVENT_START 30 /* midi Real Time Start message */ ++#define SNDRV_SEQ_EVENT_CONTINUE 31 /* midi Real Time Continue message */ ++#define SNDRV_SEQ_EVENT_STOP 32 /* midi Real Time Stop message */ ++#define SNDRV_SEQ_EVENT_SETPOS_TICK 33 /* set tick queue position */ ++#define SNDRV_SEQ_EVENT_SETPOS_TIME 34 /* set realtime queue position */ ++#define SNDRV_SEQ_EVENT_TEMPO 35 /* (SMF) Tempo event */ ++#define SNDRV_SEQ_EVENT_CLOCK 36 /* midi Real Time Clock message */ ++#define SNDRV_SEQ_EVENT_TICK 37 /* midi Real Time Tick message */ ++#define SNDRV_SEQ_EVENT_QUEUE_SKEW 38 /* skew queue tempo */ ++ ++/** others ++ * event data type = none ++ */ ++#define SNDRV_SEQ_EVENT_TUNE_REQUEST 40 /* tune request */ ++#define SNDRV_SEQ_EVENT_RESET 41 /* reset to power-on state */ ++#define SNDRV_SEQ_EVENT_SENSING 42 /* "active sensing" event */ ++ ++/** echo back, kernel private messages ++ * event data type = any type ++ */ ++#define SNDRV_SEQ_EVENT_ECHO 50 /* echo event */ ++#define SNDRV_SEQ_EVENT_OSS 51 /* OSS raw event */ ++ ++/** system status messages (broadcast for subscribers) ++ * event data type = snd_seq_addr ++ */ ++#define SNDRV_SEQ_EVENT_CLIENT_START 60 /* new client has connected */ ++#define SNDRV_SEQ_EVENT_CLIENT_EXIT 61 /* client has left the system */ ++#define SNDRV_SEQ_EVENT_CLIENT_CHANGE 62 /* client status/info has changed */ ++#define SNDRV_SEQ_EVENT_PORT_START 63 /* new port was created */ ++#define SNDRV_SEQ_EVENT_PORT_EXIT 64 /* port was deleted from system */ ++#define SNDRV_SEQ_EVENT_PORT_CHANGE 65 /* port status/info has changed */ ++ ++/** port connection changes ++ * event data type = snd_seq_connect ++ */ ++#define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66 /* ports connected */ ++#define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67 /* ports disconnected */ ++ ++/* 70-89: synthesizer events - obsoleted */ ++ ++/** user-defined events with fixed length ++ * event data type = any ++ */ ++#define SNDRV_SEQ_EVENT_USR0 90 ++#define SNDRV_SEQ_EVENT_USR1 91 ++#define SNDRV_SEQ_EVENT_USR2 92 ++#define SNDRV_SEQ_EVENT_USR3 93 ++#define SNDRV_SEQ_EVENT_USR4 94 ++#define SNDRV_SEQ_EVENT_USR5 95 ++#define SNDRV_SEQ_EVENT_USR6 96 ++#define SNDRV_SEQ_EVENT_USR7 97 ++#define SNDRV_SEQ_EVENT_USR8 98 ++#define SNDRV_SEQ_EVENT_USR9 99 ++ ++/* 100-118: instrument layer - obsoleted */ ++/* 119-129: reserved */ ++ ++/* 130-139: variable length events ++ * event data type = snd_seq_ev_ext ++ * (SNDRV_SEQ_EVENT_LENGTH_VARIABLE must be set) ++ */ ++#define SNDRV_SEQ_EVENT_SYSEX 130 /* system exclusive data (variable length) */ ++#define SNDRV_SEQ_EVENT_BOUNCE 131 /* error event */ ++/* 132-134: reserved */ ++#define SNDRV_SEQ_EVENT_USR_VAR0 135 ++#define SNDRV_SEQ_EVENT_USR_VAR1 136 ++#define SNDRV_SEQ_EVENT_USR_VAR2 137 ++#define SNDRV_SEQ_EVENT_USR_VAR3 138 ++#define SNDRV_SEQ_EVENT_USR_VAR4 139 ++ ++/* 150-151: kernel events with quote - DO NOT use in user clients */ ++#define SNDRV_SEQ_EVENT_KERNEL_ERROR 150 ++#define SNDRV_SEQ_EVENT_KERNEL_QUOTE 151 /* obsolete */ ++ ++/* 152-191: reserved */ ++ ++/* 192-254: hardware specific events */ ++ ++/* 255: special event */ ++#define SNDRV_SEQ_EVENT_NONE 255 ++ ++ ++typedef unsigned char snd_seq_event_type_t; ++ ++/** event address */ ++struct snd_seq_addr { ++ unsigned char client; /**< Client number: 0..255, 255 = broadcast to all clients */ ++ unsigned char port; /**< Port within client: 0..255, 255 = broadcast to all ports */ ++}; ++ ++/** port connection */ ++struct snd_seq_connect { ++ struct snd_seq_addr sender; ++ struct snd_seq_addr dest; ++}; ++ ++ ++#define SNDRV_SEQ_ADDRESS_UNKNOWN 253 /* unknown source */ ++#define SNDRV_SEQ_ADDRESS_SUBSCRIBERS 254 /* send event to all subscribed ports */ ++#define SNDRV_SEQ_ADDRESS_BROADCAST 255 /* send event to all queues/clients/ports/channels */ ++#define SNDRV_SEQ_QUEUE_DIRECT 253 /* direct dispatch */ ++ ++ /* event mode flag - NOTE: only 8 bits available! */ ++#define SNDRV_SEQ_TIME_STAMP_TICK (0<<0) /* timestamp in clock ticks */ ++#define SNDRV_SEQ_TIME_STAMP_REAL (1<<0) /* timestamp in real time */ ++#define SNDRV_SEQ_TIME_STAMP_MASK (1<<0) ++ ++#define SNDRV_SEQ_TIME_MODE_ABS (0<<1) /* absolute timestamp */ ++#define SNDRV_SEQ_TIME_MODE_REL (1<<1) /* relative to current time */ ++#define SNDRV_SEQ_TIME_MODE_MASK (1<<1) ++ ++#define SNDRV_SEQ_EVENT_LENGTH_FIXED (0<<2) /* fixed event size */ ++#define SNDRV_SEQ_EVENT_LENGTH_VARIABLE (1<<2) /* variable event size */ ++#define SNDRV_SEQ_EVENT_LENGTH_VARUSR (2<<2) /* variable event size - user memory space */ ++#define SNDRV_SEQ_EVENT_LENGTH_MASK (3<<2) ++ ++#define SNDRV_SEQ_PRIORITY_NORMAL (0<<4) /* normal priority */ ++#define SNDRV_SEQ_PRIORITY_HIGH (1<<4) /* event should be processed before others */ ++#define SNDRV_SEQ_PRIORITY_MASK (1<<4) ++ ++ ++ /* note event */ ++struct snd_seq_ev_note { ++ unsigned char channel; ++ unsigned char note; ++ unsigned char velocity; ++ unsigned char off_velocity; /* only for SNDRV_SEQ_EVENT_NOTE */ ++ unsigned int duration; /* only for SNDRV_SEQ_EVENT_NOTE */ ++}; ++ ++ /* controller event */ ++struct snd_seq_ev_ctrl { ++ unsigned char channel; ++ unsigned char unused1, unused2, unused3; /* pad */ ++ unsigned int param; ++ signed int value; ++}; ++ ++ /* generic set of bytes (12x8 bit) */ ++struct snd_seq_ev_raw8 { ++ unsigned char d[12]; /* 8 bit value */ ++}; ++ ++ /* generic set of integers (3x32 bit) */ ++struct snd_seq_ev_raw32 { ++ unsigned int d[3]; /* 32 bit value */ ++}; ++ ++ /* external stored data */ ++struct snd_seq_ev_ext { ++ unsigned int len; /* length of data */ ++ void *ptr; /* pointer to data (note: maybe 64-bit) */ ++} __attribute__((packed)); ++ ++struct snd_seq_result { ++ int event; /* processed event type */ ++ int result; ++}; ++ ++ ++struct snd_seq_real_time { ++ unsigned int tv_sec; /* seconds */ ++ unsigned int tv_nsec; /* nanoseconds */ ++}; ++ ++typedef unsigned int snd_seq_tick_time_t; /* midi ticks */ ++ ++union snd_seq_timestamp { ++ snd_seq_tick_time_t tick; ++ struct snd_seq_real_time time; ++}; ++ ++struct snd_seq_queue_skew { ++ unsigned int value; ++ unsigned int base; ++}; ++ ++ /* queue timer control */ ++struct snd_seq_ev_queue_control { ++ unsigned char queue; /* affected queue */ ++ unsigned char pad[3]; /* reserved */ ++ union { ++ signed int value; /* affected value (e.g. tempo) */ ++ union snd_seq_timestamp time; /* time */ ++ unsigned int position; /* sync position */ ++ struct snd_seq_queue_skew skew; ++ unsigned int d32[2]; ++ unsigned char d8[8]; ++ } param; ++}; ++ ++ /* quoted event - inside the kernel only */ ++struct snd_seq_ev_quote { ++ struct snd_seq_addr origin; /* original sender */ ++ unsigned short value; /* optional data */ ++ struct snd_seq_event *event; /* quoted event */ ++} __attribute__((packed)); ++ ++ ++ /* sequencer event */ ++struct snd_seq_event { ++ snd_seq_event_type_t type; /* event type */ ++ unsigned char flags; /* event flags */ ++ char tag; ++ ++ unsigned char queue; /* schedule queue */ ++ union snd_seq_timestamp time; /* schedule time */ ++ ++ ++ struct snd_seq_addr source; /* source address */ ++ struct snd_seq_addr dest; /* destination address */ ++ ++ union { /* event data... */ ++ struct snd_seq_ev_note note; ++ struct snd_seq_ev_ctrl control; ++ struct snd_seq_ev_raw8 raw8; ++ struct snd_seq_ev_raw32 raw32; ++ struct snd_seq_ev_ext ext; ++ struct snd_seq_ev_queue_control queue; ++ union snd_seq_timestamp time; ++ struct snd_seq_addr addr; ++ struct snd_seq_connect connect; ++ struct snd_seq_result result; ++ struct snd_seq_ev_quote quote; ++ } data; ++}; ++ ++ ++/* ++ * bounce event - stored as variable size data ++ */ ++struct snd_seq_event_bounce { ++ int err; ++ struct snd_seq_event event; ++ /* external data follows here. */ ++}; ++ ++ ++ /* system information */ ++struct snd_seq_system_info { ++ int queues; /* maximum queues count */ ++ int clients; /* maximum clients count */ ++ int ports; /* maximum ports per client */ ++ int channels; /* maximum channels per port */ ++ int cur_clients; /* current clients */ ++ int cur_queues; /* current queues */ ++ char reserved[24]; ++}; ++ ++ ++ /* system running information */ ++struct snd_seq_running_info { ++ unsigned char client; /* client id */ ++ unsigned char big_endian; /* 1 = big-endian */ ++ unsigned char cpu_mode; /* 4 = 32bit, 8 = 64bit */ ++ unsigned char pad; /* reserved */ ++ unsigned char reserved[12]; ++}; ++ ++ ++ /* known client numbers */ ++#define SNDRV_SEQ_CLIENT_SYSTEM 0 ++ /* internal client numbers */ ++#define SNDRV_SEQ_CLIENT_DUMMY 14 /* midi through */ ++#define SNDRV_SEQ_CLIENT_OSS 15 /* oss sequencer emulator */ ++ ++ ++ /* client types */ ++typedef int __bitwise snd_seq_client_type_t; ++#define NO_CLIENT ((__force snd_seq_client_type_t) 0) ++#define USER_CLIENT ((__force snd_seq_client_type_t) 1) ++#define KERNEL_CLIENT ((__force snd_seq_client_type_t) 2) ++ ++ /* event filter flags */ ++#define SNDRV_SEQ_FILTER_BROADCAST (1<<0) /* accept broadcast messages */ ++#define SNDRV_SEQ_FILTER_MULTICAST (1<<1) /* accept multicast messages */ ++#define SNDRV_SEQ_FILTER_BOUNCE (1<<2) /* accept bounce event in error */ ++#define SNDRV_SEQ_FILTER_USE_EVENT (1<<31) /* use event filter */ ++ ++struct snd_seq_client_info { ++ int client; /* client number to inquire */ ++ snd_seq_client_type_t type; /* client type */ ++ char name[64]; /* client name */ ++ unsigned int filter; /* filter flags */ ++ unsigned char multicast_filter[8]; /* multicast filter bitmap */ ++ unsigned char event_filter[32]; /* event filter bitmap */ ++ int num_ports; /* RO: number of ports */ ++ int event_lost; /* number of lost events */ ++ int card; /* RO: card number[kernel] */ ++ int pid; /* RO: pid[user] */ ++ char reserved[56]; /* for future use */ ++}; ++ ++ ++/* client pool size */ ++struct snd_seq_client_pool { ++ int client; /* client number to inquire */ ++ int output_pool; /* outgoing (write) pool size */ ++ int input_pool; /* incoming (read) pool size */ ++ int output_room; /* minimum free pool size for select/blocking mode */ ++ int output_free; /* unused size */ ++ int input_free; /* unused size */ ++ char reserved[64]; ++}; ++ ++ ++/* Remove events by specified criteria */ ++ ++#define SNDRV_SEQ_REMOVE_INPUT (1<<0) /* Flush input queues */ ++#define SNDRV_SEQ_REMOVE_OUTPUT (1<<1) /* Flush output queues */ ++#define SNDRV_SEQ_REMOVE_DEST (1<<2) /* Restrict by destination q:client:port */ ++#define SNDRV_SEQ_REMOVE_DEST_CHANNEL (1<<3) /* Restrict by channel */ ++#define SNDRV_SEQ_REMOVE_TIME_BEFORE (1<<4) /* Restrict to before time */ ++#define SNDRV_SEQ_REMOVE_TIME_AFTER (1<<5) /* Restrict to time or after */ ++#define SNDRV_SEQ_REMOVE_TIME_TICK (1<<6) /* Time is in ticks */ ++#define SNDRV_SEQ_REMOVE_EVENT_TYPE (1<<7) /* Restrict to event type */ ++#define SNDRV_SEQ_REMOVE_IGNORE_OFF (1<<8) /* Do not flush off events */ ++#define SNDRV_SEQ_REMOVE_TAG_MATCH (1<<9) /* Restrict to events with given tag */ ++ ++struct snd_seq_remove_events { ++ unsigned int remove_mode; /* Flags that determine what gets removed */ ++ ++ union snd_seq_timestamp time; ++ ++ unsigned char queue; /* Queue for REMOVE_DEST */ ++ struct snd_seq_addr dest; /* Address for REMOVE_DEST */ ++ unsigned char channel; /* Channel for REMOVE_DEST */ ++ ++ int type; /* For REMOVE_EVENT_TYPE */ ++ char tag; /* Tag for REMOVE_TAG */ ++ ++ int reserved[10]; /* To allow for future binary compatibility */ ++ ++}; ++ ++ ++ /* known port numbers */ ++#define SNDRV_SEQ_PORT_SYSTEM_TIMER 0 ++#define SNDRV_SEQ_PORT_SYSTEM_ANNOUNCE 1 ++ ++ /* port capabilities (32 bits) */ ++#define SNDRV_SEQ_PORT_CAP_READ (1<<0) /* readable from this port */ ++#define SNDRV_SEQ_PORT_CAP_WRITE (1<<1) /* writable to this port */ ++ ++#define SNDRV_SEQ_PORT_CAP_SYNC_READ (1<<2) ++#define SNDRV_SEQ_PORT_CAP_SYNC_WRITE (1<<3) ++ ++#define SNDRV_SEQ_PORT_CAP_DUPLEX (1<<4) ++ ++#define SNDRV_SEQ_PORT_CAP_SUBS_READ (1<<5) /* allow read subscription */ ++#define SNDRV_SEQ_PORT_CAP_SUBS_WRITE (1<<6) /* allow write subscription */ ++#define SNDRV_SEQ_PORT_CAP_NO_EXPORT (1<<7) /* routing not allowed */ ++ ++ /* port type */ ++#define SNDRV_SEQ_PORT_TYPE_SPECIFIC (1<<0) /* hardware specific */ ++#define SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC (1<<1) /* generic MIDI device */ ++#define SNDRV_SEQ_PORT_TYPE_MIDI_GM (1<<2) /* General MIDI compatible device */ ++#define SNDRV_SEQ_PORT_TYPE_MIDI_GS (1<<3) /* GS compatible device */ ++#define SNDRV_SEQ_PORT_TYPE_MIDI_XG (1<<4) /* XG compatible device */ ++#define SNDRV_SEQ_PORT_TYPE_MIDI_MT32 (1<<5) /* MT-32 compatible device */ ++#define SNDRV_SEQ_PORT_TYPE_MIDI_GM2 (1<<6) /* General MIDI 2 compatible device */ ++ ++/* other standards...*/ ++#define SNDRV_SEQ_PORT_TYPE_SYNTH (1<<10) /* Synth device (no MIDI compatible - direct wavetable) */ ++#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /* Sampling device (support sample download) */ ++#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12) /* Sampling device (sample can be downloaded at any time) */ ++/*...*/ ++#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1<<16) /* driver for a hardware device */ ++#define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1<<17) /* implemented in software */ ++#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1<<18) /* generates sound */ ++#define SNDRV_SEQ_PORT_TYPE_PORT (1<<19) /* connects to other device(s) */ ++#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */ ++ ++/* misc. conditioning flags */ ++#define SNDRV_SEQ_PORT_FLG_GIVEN_PORT (1<<0) ++#define SNDRV_SEQ_PORT_FLG_TIMESTAMP (1<<1) ++#define SNDRV_SEQ_PORT_FLG_TIME_REAL (1<<2) ++ ++struct snd_seq_port_info { ++ struct snd_seq_addr addr; /* client/port numbers */ ++ char name[64]; /* port name */ ++ ++ unsigned int capability; /* port capability bits */ ++ unsigned int type; /* port type bits */ ++ int midi_channels; /* channels per MIDI port */ ++ int midi_voices; /* voices per MIDI port */ ++ int synth_voices; /* voices per SYNTH port */ ++ ++ int read_use; /* R/O: subscribers for output (from this port) */ ++ int write_use; /* R/O: subscribers for input (to this port) */ ++ ++ void *kernel; /* reserved for kernel use (must be NULL) */ ++ unsigned int flags; /* misc. conditioning */ ++ unsigned char time_queue; /* queue # for timestamping */ ++ char reserved[59]; /* for future use */ ++}; ++ ++ ++/* queue flags */ ++#define SNDRV_SEQ_QUEUE_FLG_SYNC (1<<0) /* sync enabled */ ++ ++/* queue information */ ++struct snd_seq_queue_info { ++ int queue; /* queue id */ ++ ++ /* ++ * security settings, only owner of this queue can start/stop timer ++ * etc. if the queue is locked for other clients ++ */ ++ int owner; /* client id for owner of the queue */ ++ unsigned locked:1; /* timing queue locked for other queues */ ++ char name[64]; /* name of this queue */ ++ unsigned int flags; /* flags */ ++ char reserved[60]; /* for future use */ ++ ++}; ++ ++/* queue info/status */ ++struct snd_seq_queue_status { ++ int queue; /* queue id */ ++ int events; /* read-only - queue size */ ++ snd_seq_tick_time_t tick; /* current tick */ ++ struct snd_seq_real_time time; /* current time */ ++ int running; /* running state of queue */ ++ int flags; /* various flags */ ++ char reserved[64]; /* for the future */ ++}; ++ ++ ++/* queue tempo */ ++struct snd_seq_queue_tempo { ++ int queue; /* sequencer queue */ ++ unsigned int tempo; /* current tempo, us/tick */ ++ int ppq; /* time resolution, ticks/quarter */ ++ unsigned int skew_value; /* queue skew */ ++ unsigned int skew_base; /* queue skew base */ ++ char reserved[24]; /* for the future */ ++}; ++ ++ ++/* sequencer timer sources */ ++#define SNDRV_SEQ_TIMER_ALSA 0 /* ALSA timer */ ++#define SNDRV_SEQ_TIMER_MIDI_CLOCK 1 /* Midi Clock (CLOCK event) */ ++#define SNDRV_SEQ_TIMER_MIDI_TICK 2 /* Midi Timer Tick (TICK event) */ ++ ++/* queue timer info */ ++struct snd_seq_queue_timer { ++ int queue; /* sequencer queue */ ++ int type; /* source timer type */ ++ union { ++ struct { ++ struct snd_timer_id id; /* ALSA's timer ID */ ++ unsigned int resolution; /* resolution in Hz */ ++ } alsa; ++ } u; ++ char reserved[64]; /* for the future use */ ++}; ++ ++ ++struct snd_seq_queue_client { ++ int queue; /* sequencer queue */ ++ int client; /* sequencer client */ ++ int used; /* queue is used with this client ++ (must be set for accepting events) */ ++ /* per client watermarks */ ++ char reserved[64]; /* for future use */ ++}; ++ ++ ++#define SNDRV_SEQ_PORT_SUBS_EXCLUSIVE (1<<0) /* exclusive connection */ ++#define SNDRV_SEQ_PORT_SUBS_TIMESTAMP (1<<1) ++#define SNDRV_SEQ_PORT_SUBS_TIME_REAL (1<<2) ++ ++struct snd_seq_port_subscribe { ++ struct snd_seq_addr sender; /* sender address */ ++ struct snd_seq_addr dest; /* destination address */ ++ unsigned int voices; /* number of voices to be allocated (0 = don't care) */ ++ unsigned int flags; /* modes */ ++ unsigned char queue; /* input time-stamp queue (optional) */ ++ unsigned char pad[3]; /* reserved */ ++ char reserved[64]; ++}; ++ ++/* type of query subscription */ ++#define SNDRV_SEQ_QUERY_SUBS_READ 0 ++#define SNDRV_SEQ_QUERY_SUBS_WRITE 1 ++ ++struct snd_seq_query_subs { ++ struct snd_seq_addr root; /* client/port id to be searched */ ++ int type; /* READ or WRITE */ ++ int index; /* 0..N-1 */ ++ int num_subs; /* R/O: number of subscriptions on this port */ ++ struct snd_seq_addr addr; /* R/O: result */ ++ unsigned char queue; /* R/O: result */ ++ unsigned int flags; /* R/O: result */ ++ char reserved[64]; /* for future use */ ++}; ++ ++ ++/* ++ * IOCTL commands ++ */ ++ ++#define SNDRV_SEQ_IOCTL_PVERSION _IOR ('S', 0x00, int) ++#define SNDRV_SEQ_IOCTL_CLIENT_ID _IOR ('S', 0x01, int) ++#define SNDRV_SEQ_IOCTL_SYSTEM_INFO _IOWR('S', 0x02, struct snd_seq_system_info) ++#define SNDRV_SEQ_IOCTL_RUNNING_MODE _IOWR('S', 0x03, struct snd_seq_running_info) ++ ++#define SNDRV_SEQ_IOCTL_GET_CLIENT_INFO _IOWR('S', 0x10, struct snd_seq_client_info) ++#define SNDRV_SEQ_IOCTL_SET_CLIENT_INFO _IOW ('S', 0x11, struct snd_seq_client_info) ++ ++#define SNDRV_SEQ_IOCTL_CREATE_PORT _IOWR('S', 0x20, struct snd_seq_port_info) ++#define SNDRV_SEQ_IOCTL_DELETE_PORT _IOW ('S', 0x21, struct snd_seq_port_info) ++#define SNDRV_SEQ_IOCTL_GET_PORT_INFO _IOWR('S', 0x22, struct snd_seq_port_info) ++#define SNDRV_SEQ_IOCTL_SET_PORT_INFO _IOW ('S', 0x23, struct snd_seq_port_info) ++ ++#define SNDRV_SEQ_IOCTL_SUBSCRIBE_PORT _IOW ('S', 0x30, struct snd_seq_port_subscribe) ++#define SNDRV_SEQ_IOCTL_UNSUBSCRIBE_PORT _IOW ('S', 0x31, struct snd_seq_port_subscribe) ++ ++#define SNDRV_SEQ_IOCTL_CREATE_QUEUE _IOWR('S', 0x32, struct snd_seq_queue_info) ++#define SNDRV_SEQ_IOCTL_DELETE_QUEUE _IOW ('S', 0x33, struct snd_seq_queue_info) ++#define SNDRV_SEQ_IOCTL_GET_QUEUE_INFO _IOWR('S', 0x34, struct snd_seq_queue_info) ++#define SNDRV_SEQ_IOCTL_SET_QUEUE_INFO _IOWR('S', 0x35, struct snd_seq_queue_info) ++#define SNDRV_SEQ_IOCTL_GET_NAMED_QUEUE _IOWR('S', 0x36, struct snd_seq_queue_info) ++#define SNDRV_SEQ_IOCTL_GET_QUEUE_STATUS _IOWR('S', 0x40, struct snd_seq_queue_status) ++#define SNDRV_SEQ_IOCTL_GET_QUEUE_TEMPO _IOWR('S', 0x41, struct snd_seq_queue_tempo) ++#define SNDRV_SEQ_IOCTL_SET_QUEUE_TEMPO _IOW ('S', 0x42, struct snd_seq_queue_tempo) ++#define SNDRV_SEQ_IOCTL_GET_QUEUE_TIMER _IOWR('S', 0x45, struct snd_seq_queue_timer) ++#define SNDRV_SEQ_IOCTL_SET_QUEUE_TIMER _IOW ('S', 0x46, struct snd_seq_queue_timer) ++#define SNDRV_SEQ_IOCTL_GET_QUEUE_CLIENT _IOWR('S', 0x49, struct snd_seq_queue_client) ++#define SNDRV_SEQ_IOCTL_SET_QUEUE_CLIENT _IOW ('S', 0x4a, struct snd_seq_queue_client) ++#define SNDRV_SEQ_IOCTL_GET_CLIENT_POOL _IOWR('S', 0x4b, struct snd_seq_client_pool) ++#define SNDRV_SEQ_IOCTL_SET_CLIENT_POOL _IOW ('S', 0x4c, struct snd_seq_client_pool) ++#define SNDRV_SEQ_IOCTL_REMOVE_EVENTS _IOW ('S', 0x4e, struct snd_seq_remove_events) ++#define SNDRV_SEQ_IOCTL_QUERY_SUBS _IOWR('S', 0x4f, struct snd_seq_query_subs) ++#define SNDRV_SEQ_IOCTL_GET_SUBSCRIPTION _IOWR('S', 0x50, struct snd_seq_port_subscribe) ++#define SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT _IOWR('S', 0x51, struct snd_seq_client_info) ++#define SNDRV_SEQ_IOCTL_QUERY_NEXT_PORT _IOWR('S', 0x52, struct snd_seq_port_info) ++ ++#endif /* _UAPI__SOUND_ASEQUENCER_H */ +diff --git a/include/sound/uapi/asoc.h b/include/sound/uapi/asoc.h +new file mode 100644 +index 00000000..a74ca232 +--- /dev/null ++++ b/include/sound/uapi/asoc.h +@@ -0,0 +1,633 @@ ++/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ ++/* ++ * uapi/sound/asoc.h -- ALSA SoC Firmware Controls and DAPM ++ * ++ * Copyright (C) 2012 Texas Instruments Inc. ++ * Copyright (C) 2015 Intel Corporation. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * Simple file API to load FW that includes mixers, coefficients, DAPM graphs, ++ * algorithms, equalisers, DAIs, widgets etc. ++*/ ++ ++#ifndef __LINUX_UAPI_SND_ASOC_H ++#define __LINUX_UAPI_SND_ASOC_H ++ ++#include <linux/types.h> ++#include <sound/asound.h> ++ ++/* ++ * Maximum number of channels topology kcontrol can represent. ++ */ ++#define SND_SOC_TPLG_MAX_CHAN 8 ++ ++/* ++ * Maximum number of PCM formats capability ++ */ ++#define SND_SOC_TPLG_MAX_FORMATS 16 ++ ++/* ++ * Maximum number of PCM stream configs ++ */ ++#define SND_SOC_TPLG_STREAM_CONFIG_MAX 8 ++ ++/* ++ * Maximum number of physical link's hardware configs ++ */ ++#define SND_SOC_TPLG_HW_CONFIG_MAX 8 ++ ++/* individual kcontrol info types - can be mixed with other types */ ++#define SND_SOC_TPLG_CTL_VOLSW 1 ++#define SND_SOC_TPLG_CTL_VOLSW_SX 2 ++#define SND_SOC_TPLG_CTL_VOLSW_XR_SX 3 ++#define SND_SOC_TPLG_CTL_ENUM 4 ++#define SND_SOC_TPLG_CTL_BYTES 5 ++#define SND_SOC_TPLG_CTL_ENUM_VALUE 6 ++#define SND_SOC_TPLG_CTL_RANGE 7 ++#define SND_SOC_TPLG_CTL_STROBE 8 ++ ++ ++/* individual widget kcontrol info types - can be mixed with other types */ ++#define SND_SOC_TPLG_DAPM_CTL_VOLSW 64 ++#define SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE 65 ++#define SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT 66 ++#define SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE 67 ++#define SND_SOC_TPLG_DAPM_CTL_PIN 68 ++ ++/* DAPM widget types - add new items to the end */ ++#define SND_SOC_TPLG_DAPM_INPUT 0 ++#define SND_SOC_TPLG_DAPM_OUTPUT 1 ++#define SND_SOC_TPLG_DAPM_MUX 2 ++#define SND_SOC_TPLG_DAPM_MIXER 3 ++#define SND_SOC_TPLG_DAPM_PGA 4 ++#define SND_SOC_TPLG_DAPM_OUT_DRV 5 ++#define SND_SOC_TPLG_DAPM_ADC 6 ++#define SND_SOC_TPLG_DAPM_DAC 7 ++#define SND_SOC_TPLG_DAPM_SWITCH 8 ++#define SND_SOC_TPLG_DAPM_PRE 9 ++#define SND_SOC_TPLG_DAPM_POST 10 ++#define SND_SOC_TPLG_DAPM_AIF_IN 11 ++#define SND_SOC_TPLG_DAPM_AIF_OUT 12 ++#define SND_SOC_TPLG_DAPM_DAI_IN 13 ++#define SND_SOC_TPLG_DAPM_DAI_OUT 14 ++#define SND_SOC_TPLG_DAPM_DAI_LINK 15 ++#define SND_SOC_TPLG_DAPM_BUFFER 16 ++#define SND_SOC_TPLG_DAPM_SCHEDULER 17 ++#define SND_SOC_TPLG_DAPM_EFFECT 18 ++#define SND_SOC_TPLG_DAPM_SIGGEN 19 ++#define SND_SOC_TPLG_DAPM_SRC 20 ++#define SND_SOC_TPLG_DAPM_ASRC 21 ++#define SND_SOC_TPLG_DAPM_ENCODER 22 ++#define SND_SOC_TPLG_DAPM_DECODER 23 ++#define SND_SOC_TPLG_DAPM_LAST SND_SOC_TPLG_DAPM_DECODER ++ ++/* Header magic number and string sizes */ ++#define SND_SOC_TPLG_MAGIC 0x41536F43 /* ASoC */ ++ ++/* string sizes */ ++#define SND_SOC_TPLG_NUM_TEXTS 16 ++ ++/* ABI version */ ++#define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */ ++#define SND_SOC_TPLG_ABI_VERSION_MIN 0x4 /* oldest version supported */ ++ ++/* Max size of TLV data */ ++#define SND_SOC_TPLG_TLV_SIZE 32 ++ ++/* ++ * File and Block header data types. ++ * Add new generic and vendor types to end of list. ++ * Generic types are handled by the core whilst vendors types are passed ++ * to the component drivers for handling. ++ */ ++#define SND_SOC_TPLG_TYPE_MIXER 1 ++#define SND_SOC_TPLG_TYPE_BYTES 2 ++#define SND_SOC_TPLG_TYPE_ENUM 3 ++#define SND_SOC_TPLG_TYPE_DAPM_GRAPH 4 ++#define SND_SOC_TPLG_TYPE_DAPM_WIDGET 5 ++#define SND_SOC_TPLG_TYPE_DAI_LINK 6 ++#define SND_SOC_TPLG_TYPE_PCM 7 ++#define SND_SOC_TPLG_TYPE_MANIFEST 8 ++#define SND_SOC_TPLG_TYPE_CODEC_LINK 9 ++#define SND_SOC_TPLG_TYPE_BACKEND_LINK 10 ++#define SND_SOC_TPLG_TYPE_PDATA 11 ++#define SND_SOC_TPLG_TYPE_DAI 12 ++#define SND_SOC_TPLG_TYPE_MAX SND_SOC_TPLG_TYPE_DAI ++ ++/* vendor block IDs - please add new vendor types to end */ ++#define SND_SOC_TPLG_TYPE_VENDOR_FW 1000 ++#define SND_SOC_TPLG_TYPE_VENDOR_CONFIG 1001 ++#define SND_SOC_TPLG_TYPE_VENDOR_COEFF 1002 ++#define SND_SOC_TPLG_TYPEVENDOR_CODEC 1003 ++ ++#define SND_SOC_TPLG_STREAM_PLAYBACK 0 ++#define SND_SOC_TPLG_STREAM_CAPTURE 1 ++ ++/* vendor tuple types */ ++#define SND_SOC_TPLG_TUPLE_TYPE_UUID 0 ++#define SND_SOC_TPLG_TUPLE_TYPE_STRING 1 ++#define SND_SOC_TPLG_TUPLE_TYPE_BOOL 2 ++#define SND_SOC_TPLG_TUPLE_TYPE_BYTE 3 ++#define SND_SOC_TPLG_TUPLE_TYPE_WORD 4 ++#define SND_SOC_TPLG_TUPLE_TYPE_SHORT 5 ++ ++/* DAI flags */ ++#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_RATES (1 << 0) ++#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) ++#define SND_SOC_TPLG_DAI_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) ++ ++/* DAI clock gating */ ++#define SND_SOC_TPLG_DAI_CLK_GATE_UNDEFINED 0 ++#define SND_SOC_TPLG_DAI_CLK_GATE_GATED 1 ++#define SND_SOC_TPLG_DAI_CLK_GATE_CONT 2 ++ ++/* DAI mclk_direction */ ++#define SND_SOC_TPLG_MCLK_CO 0 /* for codec, mclk is output */ ++#define SND_SOC_TPLG_MCLK_CI 1 /* for codec, mclk is input */ ++ ++/* DAI physical PCM data formats. ++ * Add new formats to the end of the list. ++ */ ++#define SND_SOC_DAI_FORMAT_I2S 1 /* I2S mode */ ++#define SND_SOC_DAI_FORMAT_RIGHT_J 2 /* Right Justified mode */ ++#define SND_SOC_DAI_FORMAT_LEFT_J 3 /* Left Justified mode */ ++#define SND_SOC_DAI_FORMAT_DSP_A 4 /* L data MSB after FRM LRC */ ++#define SND_SOC_DAI_FORMAT_DSP_B 5 /* L data MSB during FRM LRC */ ++#define SND_SOC_DAI_FORMAT_AC97 6 /* AC97 */ ++#define SND_SOC_DAI_FORMAT_PDM 7 /* Pulse density modulation */ ++ ++/* left and right justified also known as MSB and LSB respectively */ ++#define SND_SOC_DAI_FORMAT_MSB SND_SOC_DAI_FORMAT_LEFT_J ++#define SND_SOC_DAI_FORMAT_LSB SND_SOC_DAI_FORMAT_RIGHT_J ++ ++/* DAI link flags */ ++#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_RATES (1 << 0) ++#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_CHANNELS (1 << 1) ++#define SND_SOC_TPLG_LNK_FLGBIT_SYMMETRIC_SAMPLEBITS (1 << 2) ++#define SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP (1 << 3) ++ ++/* DAI topology BCLK parameter ++ * For the backwards capability, by default codec is bclk master ++ */ ++#define SND_SOC_TPLG_BCLK_CM 0 /* codec is bclk master */ ++#define SND_SOC_TPLG_BCLK_CS 1 /* codec is bclk slave */ ++ ++/* DAI topology FSYNC parameter ++ * For the backwards capability, by default codec is fsync master ++ */ ++#define SND_SOC_TPLG_FSYNC_CM 0 /* codec is fsync master */ ++#define SND_SOC_TPLG_FSYNC_CS 1 /* codec is fsync slave */ ++ ++/* ++ * Block Header. ++ * This header precedes all object and object arrays below. ++ */ ++struct snd_soc_tplg_hdr { ++ __le32 magic; /* magic number */ ++ __le32 abi; /* ABI version */ ++ __le32 version; /* optional vendor specific version details */ ++ __le32 type; /* SND_SOC_TPLG_TYPE_ */ ++ __le32 size; /* size of this structure */ ++ __le32 vendor_type; /* optional vendor specific type info */ ++ __le32 payload_size; /* data bytes, excluding this header */ ++ __le32 index; /* identifier for block */ ++ __le32 count; /* number of elements in block */ ++} __attribute__((packed)); ++ ++/* vendor tuple for uuid */ ++struct snd_soc_tplg_vendor_uuid_elem { ++ __le32 token; ++ char uuid[16]; ++} __attribute__((packed)); ++ ++/* vendor tuple for a bool/byte/short/word value */ ++struct snd_soc_tplg_vendor_value_elem { ++ __le32 token; ++ __le32 value; ++} __attribute__((packed)); ++ ++/* vendor tuple for string */ ++struct snd_soc_tplg_vendor_string_elem { ++ __le32 token; ++ char string[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++} __attribute__((packed)); ++ ++struct snd_soc_tplg_vendor_array { ++ __le32 size; /* size in bytes of the array, including all elements */ ++ __le32 type; /* SND_SOC_TPLG_TUPLE_TYPE_ */ ++ __le32 num_elems; /* number of elements in array */ ++ union { ++ struct snd_soc_tplg_vendor_uuid_elem uuid[0]; ++ struct snd_soc_tplg_vendor_value_elem value[0]; ++ struct snd_soc_tplg_vendor_string_elem string[0]; ++ }; ++} __attribute__((packed)); ++ ++/* ++ * Private data. ++ * All topology objects may have private data that can be used by the driver or ++ * firmware. Core will ignore this data. ++ */ ++struct snd_soc_tplg_private { ++ __le32 size; /* in bytes of private data */ ++ union { ++ char data[0]; ++ struct snd_soc_tplg_vendor_array array[0]; ++ }; ++} __attribute__((packed)); ++ ++/* ++ * Kcontrol TLV data. ++ */ ++struct snd_soc_tplg_tlv_dbscale { ++ __le32 min; ++ __le32 step; ++ __le32 mute; ++} __attribute__((packed)); ++ ++struct snd_soc_tplg_ctl_tlv { ++ __le32 size; /* in bytes of this structure */ ++ __le32 type; /* SNDRV_CTL_TLVT_*, type of TLV */ ++ union { ++ __le32 data[SND_SOC_TPLG_TLV_SIZE]; ++ struct snd_soc_tplg_tlv_dbscale scale; ++ }; ++} __attribute__((packed)); ++ ++/* ++ * Kcontrol channel data ++ */ ++struct snd_soc_tplg_channel { ++ __le32 size; /* in bytes of this structure */ ++ __le32 reg; ++ __le32 shift; ++ __le32 id; /* ID maps to Left, Right, LFE etc */ ++} __attribute__((packed)); ++ ++/* ++ * Genericl Operations IDs, for binding Kcontrol or Bytes ext ops ++ * Kcontrol ops need get/put/info. ++ * Bytes ext ops need get/put. ++ */ ++struct snd_soc_tplg_io_ops { ++ __le32 get; ++ __le32 put; ++ __le32 info; ++} __attribute__((packed)); ++ ++/* ++ * kcontrol header ++ */ ++struct snd_soc_tplg_ctl_hdr { ++ __le32 size; /* in bytes of this structure */ ++ __le32 type; ++ char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ __le32 access; ++ struct snd_soc_tplg_io_ops ops; ++ struct snd_soc_tplg_ctl_tlv tlv; ++} __attribute__((packed)); ++ ++/* ++ * Stream Capabilities ++ */ ++struct snd_soc_tplg_stream_caps { ++ __le32 size; /* in bytes of this structure */ ++ char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ ++ __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ ++ __le32 rate_min; /* min rate */ ++ __le32 rate_max; /* max rate */ ++ __le32 channels_min; /* min channels */ ++ __le32 channels_max; /* max channels */ ++ __le32 periods_min; /* min number of periods */ ++ __le32 periods_max; /* max number of periods */ ++ __le32 period_size_min; /* min period size bytes */ ++ __le32 period_size_max; /* max period size bytes */ ++ __le32 buffer_size_min; /* min buffer size bytes */ ++ __le32 buffer_size_max; /* max buffer size bytes */ ++ __le32 sig_bits; /* number of bits of content */ ++} __attribute__((packed)); ++ ++/* ++ * FE or BE Stream configuration supported by SW/FW ++ */ ++struct snd_soc_tplg_stream { ++ __le32 size; /* in bytes of this structure */ ++ char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* Name of the stream */ ++ __le64 format; /* SNDRV_PCM_FMTBIT_* */ ++ __le32 rate; /* SNDRV_PCM_RATE_* */ ++ __le32 period_bytes; /* size of period in bytes */ ++ __le32 buffer_bytes; /* size of buffer in bytes */ ++ __le32 channels; /* channels */ ++} __attribute__((packed)); ++ ++ ++/* ++ * Describes a physical link's runtime supported hardware config, ++ * i.e. hardware audio formats. ++ */ ++struct snd_soc_tplg_hw_config { ++ __le32 size; /* in bytes of this structure */ ++ __le32 id; /* unique ID - - used to match */ ++ __le32 fmt; /* SND_SOC_DAI_FORMAT_ format value */ ++ __u8 clock_gated; /* SND_SOC_TPLG_DAI_CLK_GATE_ value */ ++ __u8 invert_bclk; /* 1 for inverted BCLK, 0 for normal */ ++ __u8 invert_fsync; /* 1 for inverted frame clock, 0 for normal */ ++ __u8 bclk_master; /* SND_SOC_TPLG_BCLK_ value */ ++ __u8 fsync_master; /* SND_SOC_TPLG_FSYNC_ value */ ++ __u8 mclk_direction; /* SND_SOC_TPLG_MCLK_ value */ ++ __le16 reserved; /* for 32bit alignment */ ++ __le32 mclk_rate; /* MCLK or SYSCLK freqency in Hz */ ++ __le32 bclk_rate; /* BCLK freqency in Hz */ ++ __le32 fsync_rate; /* frame clock in Hz */ ++ __le32 tdm_slots; /* number of TDM slots in use */ ++ __le32 tdm_slot_width; /* width in bits for each slot */ ++ __le32 tx_slots; /* bit mask for active Tx slots */ ++ __le32 rx_slots; /* bit mask for active Rx slots */ ++ __le32 tx_channels; /* number of Tx channels */ ++ __le32 tx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ ++ __le32 rx_channels; /* number of Rx channels */ ++ __le32 rx_chanmap[SND_SOC_TPLG_MAX_CHAN]; /* array of slot number */ ++} __attribute__((packed)); ++ ++/* ++ * Manifest. List totals for each payload type. Not used in parsing, but will ++ * be passed to the component driver before any other objects in order for any ++ * global component resource allocations. ++ * ++ * File block representation for manifest :- ++ * +-----------------------------------+----+ ++ * | struct snd_soc_tplg_hdr | 1 | ++ * +-----------------------------------+----+ ++ * | struct snd_soc_tplg_manifest | 1 | ++ * +-----------------------------------+----+ ++ */ ++struct snd_soc_tplg_manifest { ++ __le32 size; /* in bytes of this structure */ ++ __le32 control_elems; /* number of control elements */ ++ __le32 widget_elems; /* number of widget elements */ ++ __le32 graph_elems; /* number of graph elements */ ++ __le32 pcm_elems; /* number of PCM elements */ ++ __le32 dai_link_elems; /* number of DAI link elements */ ++ __le32 dai_elems; /* number of physical DAI elements */ ++ __le32 reserved[20]; /* reserved for new ABI element types */ ++ struct snd_soc_tplg_private priv; ++} __attribute__((packed)); ++ ++/* ++ * Mixer kcontrol. ++ * ++ * File block representation for mixer kcontrol :- ++ * +-----------------------------------+----+ ++ * | struct snd_soc_tplg_hdr | 1 | ++ * +-----------------------------------+----+ ++ * | struct snd_soc_tplg_mixer_control | N | ++ * +-----------------------------------+----+ ++ */ ++struct snd_soc_tplg_mixer_control { ++ struct snd_soc_tplg_ctl_hdr hdr; ++ __le32 size; /* in bytes of this structure */ ++ __le32 min; ++ __le32 max; ++ __le32 platform_max; ++ __le32 invert; ++ __le32 num_channels; ++ struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; ++ struct snd_soc_tplg_private priv; ++} __attribute__((packed)); ++ ++/* ++ * Enumerated kcontrol ++ * ++ * File block representation for enum kcontrol :- ++ * +-----------------------------------+----+ ++ * | struct snd_soc_tplg_hdr | 1 | ++ * +-----------------------------------+----+ ++ * | struct snd_soc_tplg_enum_control | N | ++ * +-----------------------------------+----+ ++ */ ++struct snd_soc_tplg_enum_control { ++ struct snd_soc_tplg_ctl_hdr hdr; ++ __le32 size; /* in bytes of this structure */ ++ __le32 num_channels; ++ struct snd_soc_tplg_channel channel[SND_SOC_TPLG_MAX_CHAN]; ++ __le32 items; ++ __le32 mask; ++ __le32 count; ++ char texts[SND_SOC_TPLG_NUM_TEXTS][SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ __le32 values[SND_SOC_TPLG_NUM_TEXTS * SNDRV_CTL_ELEM_ID_NAME_MAXLEN / 4]; ++ struct snd_soc_tplg_private priv; ++} __attribute__((packed)); ++ ++/* ++ * Bytes kcontrol ++ * ++ * File block representation for bytes kcontrol :- ++ * +-----------------------------------+----+ ++ * | struct snd_soc_tplg_hdr | 1 | ++ * +-----------------------------------+----+ ++ * | struct snd_soc_tplg_bytes_control | N | ++ * +-----------------------------------+----+ ++ */ ++struct snd_soc_tplg_bytes_control { ++ struct snd_soc_tplg_ctl_hdr hdr; ++ __le32 size; /* in bytes of this structure */ ++ __le32 max; ++ __le32 mask; ++ __le32 base; ++ __le32 num_regs; ++ struct snd_soc_tplg_io_ops ext_ops; ++ struct snd_soc_tplg_private priv; ++} __attribute__((packed)); ++ ++/* ++ * DAPM Graph Element ++ * ++ * File block representation for DAPM graph elements :- ++ * +-------------------------------------+----+ ++ * | struct snd_soc_tplg_hdr | 1 | ++ * +-------------------------------------+----+ ++ * | struct snd_soc_tplg_dapm_graph_elem | N | ++ * +-------------------------------------+----+ ++ */ ++struct snd_soc_tplg_dapm_graph_elem { ++ char sink[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ char control[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ char source[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++} __attribute__((packed)); ++ ++/* ++ * DAPM Widget. ++ * ++ * File block representation for DAPM widget :- ++ * +-------------------------------------+-----+ ++ * | struct snd_soc_tplg_hdr | 1 | ++ * +-------------------------------------+-----+ ++ * | struct snd_soc_tplg_dapm_widget | N | ++ * +-------------------------------------+-----+ ++ * | struct snd_soc_tplg_enum_control | 0|1 | ++ * | struct snd_soc_tplg_mixer_control | 0|N | ++ * +-------------------------------------+-----+ ++ * ++ * Optional enum or mixer control can be appended to the end of each widget ++ * in the block. ++ */ ++struct snd_soc_tplg_dapm_widget { ++ __le32 size; /* in bytes of this structure */ ++ __le32 id; /* SND_SOC_DAPM_CTL */ ++ char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ char sname[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ ++ __le32 reg; /* negative reg = no direct dapm */ ++ __le32 shift; /* bits to shift */ ++ __le32 mask; /* non-shifted mask */ ++ __le32 subseq; /* sort within widget type */ ++ __le32 invert; /* invert the power bit */ ++ __le32 ignore_suspend; /* kept enabled over suspend */ ++ __le16 event_flags; ++ __le16 event_type; ++ __le32 num_kcontrols; ++ struct snd_soc_tplg_private priv; ++ /* ++ * kcontrols that relate to this widget ++ * follow here after widget private data ++ */ ++} __attribute__((packed)); ++ ++ ++/* ++ * Describes SW/FW specific features of PCM (FE DAI & DAI link). ++ * ++ * File block representation for PCM :- ++ * +-----------------------------------+-----+ ++ * | struct snd_soc_tplg_hdr | 1 | ++ * +-----------------------------------+-----+ ++ * | struct snd_soc_tplg_pcm | N | ++ * +-----------------------------------+-----+ ++ */ ++struct snd_soc_tplg_pcm { ++ __le32 size; /* in bytes of this structure */ ++ char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ __le32 pcm_id; /* unique ID - used to match with DAI link */ ++ __le32 dai_id; /* unique ID - used to match */ ++ __le32 playback; /* supports playback mode */ ++ __le32 capture; /* supports capture mode */ ++ __le32 compress; /* 1 = compressed; 0 = PCM */ ++ struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ ++ __le32 num_streams; /* number of streams */ ++ struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ ++ __le32 flag_mask; /* bitmask of flags to configure */ ++ __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ ++ struct snd_soc_tplg_private priv; ++} __attribute__((packed)); ++ ++ ++/* ++ * Describes the physical link runtime supported configs or params ++ * ++ * File block representation for physical link config :- ++ * +-----------------------------------+-----+ ++ * | struct snd_soc_tplg_hdr | 1 | ++ * +-----------------------------------+-----+ ++ * | struct snd_soc_tplg_link_config | N | ++ * +-----------------------------------+-----+ ++ */ ++struct snd_soc_tplg_link_config { ++ __le32 size; /* in bytes of this structure */ ++ __le32 id; /* unique ID - used to match */ ++ char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ ++ char stream_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* stream name - used to match */ ++ struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ ++ __le32 num_streams; /* number of streams */ ++ struct snd_soc_tplg_hw_config hw_config[SND_SOC_TPLG_HW_CONFIG_MAX]; /* hw configs */ ++ __le32 num_hw_configs; /* number of hw configs */ ++ __le32 default_hw_config_id; /* default hw config ID for init */ ++ __le32 flag_mask; /* bitmask of flags to configure */ ++ __le32 flags; /* SND_SOC_TPLG_LNK_FLGBIT_* flag value */ ++ struct snd_soc_tplg_private priv; ++} __attribute__((packed)); ++ ++/* ++ * Describes SW/FW specific features of physical DAI. ++ * It can be used to configure backend DAIs for DPCM. ++ * ++ * File block representation for physical DAI :- ++ * +-----------------------------------+-----+ ++ * | struct snd_soc_tplg_hdr | 1 | ++ * +-----------------------------------+-----+ ++ * | struct snd_soc_tplg_dai | N | ++ * +-----------------------------------+-----+ ++ */ ++struct snd_soc_tplg_dai { ++ __le32 size; /* in bytes of this structure */ ++ char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* name - used to match */ ++ __le32 dai_id; /* unique ID - used to match */ ++ __le32 playback; /* supports playback mode */ ++ __le32 capture; /* supports capture mode */ ++ struct snd_soc_tplg_stream_caps caps[2]; /* playback and capture for DAI */ ++ __le32 flag_mask; /* bitmask of flags to configure */ ++ __le32 flags; /* SND_SOC_TPLG_DAI_FLGBIT_* */ ++ struct snd_soc_tplg_private priv; ++} __attribute__((packed)); ++ ++/* ++ * Old version of ABI structs, supported for backward compatibility. ++ */ ++ ++/* Manifest v4 */ ++struct snd_soc_tplg_manifest_v4 { ++ __le32 size; /* in bytes of this structure */ ++ __le32 control_elems; /* number of control elements */ ++ __le32 widget_elems; /* number of widget elements */ ++ __le32 graph_elems; /* number of graph elements */ ++ __le32 pcm_elems; /* number of PCM elements */ ++ __le32 dai_link_elems; /* number of DAI link elements */ ++ struct snd_soc_tplg_private priv; ++} __packed; ++ ++/* Stream Capabilities v4 */ ++struct snd_soc_tplg_stream_caps_v4 { ++ __le32 size; /* in bytes of this structure */ ++ char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ __le64 formats; /* supported formats SNDRV_PCM_FMTBIT_* */ ++ __le32 rates; /* supported rates SNDRV_PCM_RATE_* */ ++ __le32 rate_min; /* min rate */ ++ __le32 rate_max; /* max rate */ ++ __le32 channels_min; /* min channels */ ++ __le32 channels_max; /* max channels */ ++ __le32 periods_min; /* min number of periods */ ++ __le32 periods_max; /* max number of periods */ ++ __le32 period_size_min; /* min period size bytes */ ++ __le32 period_size_max; /* max period size bytes */ ++ __le32 buffer_size_min; /* min buffer size bytes */ ++ __le32 buffer_size_max; /* max buffer size bytes */ ++} __packed; ++ ++/* PCM v4 */ ++struct snd_soc_tplg_pcm_v4 { ++ __le32 size; /* in bytes of this structure */ ++ char pcm_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ char dai_name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ++ __le32 pcm_id; /* unique ID - used to match with DAI link */ ++ __le32 dai_id; /* unique ID - used to match */ ++ __le32 playback; /* supports playback mode */ ++ __le32 capture; /* supports capture mode */ ++ __le32 compress; /* 1 = compressed; 0 = PCM */ ++ struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* for DAI link */ ++ __le32 num_streams; /* number of streams */ ++ struct snd_soc_tplg_stream_caps_v4 caps[2]; /* playback and capture for DAI */ ++} __packed; ++ ++/* Physical link config v4 */ ++struct snd_soc_tplg_link_config_v4 { ++ __le32 size; /* in bytes of this structure */ ++ __le32 id; /* unique ID - used to match */ ++ struct snd_soc_tplg_stream stream[SND_SOC_TPLG_STREAM_CONFIG_MAX]; /* supported configs playback and captrure */ ++ __le32 num_streams; /* number of streams */ ++} __packed; ++ ++#endif +diff --git a/include/sound/uapi/asound.h b/include/sound/uapi/asound.h +new file mode 100644 +index 00000000..df1153ce +--- /dev/null ++++ b/include/sound/uapi/asound.h +@@ -0,0 +1,1038 @@ ++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ ++/* ++ * Advanced Linux Sound Architecture - ALSA - Driver ++ * Copyright (c) 1994-2003 by Jaroslav Kysela <perex@perex.cz>, ++ * Abramo Bagnara <abramo@alsa-project.org> ++ * ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++#ifndef _UAPI__SOUND_ASOUND_H ++#define _UAPI__SOUND_ASOUND_H ++ ++#if defined(__KERNEL__) || defined(__linux__) ++#include <linux/types.h> ++#else ++#include <sys/ioctl.h> ++#endif ++ ++#ifndef __KERNEL__ ++#include <stdlib.h> ++#include <time.h> ++#endif ++ ++/* ++ * protocol version ++ */ ++ ++#define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major)<<16)|((minor)<<8)|(subminor)) ++#define SNDRV_PROTOCOL_MAJOR(version) (((version)>>16)&0xffff) ++#define SNDRV_PROTOCOL_MINOR(version) (((version)>>8)&0xff) ++#define SNDRV_PROTOCOL_MICRO(version) ((version)&0xff) ++#define SNDRV_PROTOCOL_INCOMPATIBLE(kversion, uversion) \ ++ (SNDRV_PROTOCOL_MAJOR(kversion) != SNDRV_PROTOCOL_MAJOR(uversion) || \ ++ (SNDRV_PROTOCOL_MAJOR(kversion) == SNDRV_PROTOCOL_MAJOR(uversion) && \ ++ SNDRV_PROTOCOL_MINOR(kversion) != SNDRV_PROTOCOL_MINOR(uversion))) ++ ++/**************************************************************************** ++ * * ++ * Digital audio interface * ++ * * ++ ****************************************************************************/ ++ ++struct snd_aes_iec958 { ++ unsigned char status[24]; /* AES/IEC958 channel status bits */ ++ unsigned char subcode[147]; /* AES/IEC958 subcode bits */ ++ unsigned char pad; /* nothing */ ++ unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */ ++}; ++ ++/**************************************************************************** ++ * * ++ * CEA-861 Audio InfoFrame. Used in HDMI and DisplayPort * ++ * * ++ ****************************************************************************/ ++ ++struct snd_cea_861_aud_if { ++ unsigned char db1_ct_cc; /* coding type and channel count */ ++ unsigned char db2_sf_ss; /* sample frequency and size */ ++ unsigned char db3; /* not used, all zeros */ ++ unsigned char db4_ca; /* channel allocation code */ ++ unsigned char db5_dminh_lsv; /* downmix inhibit & level-shit values */ ++}; ++ ++/**************************************************************************** ++ * * ++ * Section for driver hardware dependent interface - /dev/snd/hw? * ++ * * ++ ****************************************************************************/ ++ ++#define SNDRV_HWDEP_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) ++ ++enum { ++ SNDRV_HWDEP_IFACE_OPL2 = 0, ++ SNDRV_HWDEP_IFACE_OPL3, ++ SNDRV_HWDEP_IFACE_OPL4, ++ SNDRV_HWDEP_IFACE_SB16CSP, /* Creative Signal Processor */ ++ SNDRV_HWDEP_IFACE_EMU10K1, /* FX8010 processor in EMU10K1 chip */ ++ SNDRV_HWDEP_IFACE_YSS225, /* Yamaha FX processor */ ++ SNDRV_HWDEP_IFACE_ICS2115, /* Wavetable synth */ ++ SNDRV_HWDEP_IFACE_SSCAPE, /* Ensoniq SoundScape ISA card (MC68EC000) */ ++ SNDRV_HWDEP_IFACE_VX, /* Digigram VX cards */ ++ SNDRV_HWDEP_IFACE_MIXART, /* Digigram miXart cards */ ++ SNDRV_HWDEP_IFACE_USX2Y, /* Tascam US122, US224 & US428 usb */ ++ SNDRV_HWDEP_IFACE_EMUX_WAVETABLE, /* EmuX wavetable */ ++ SNDRV_HWDEP_IFACE_BLUETOOTH, /* Bluetooth audio */ ++ SNDRV_HWDEP_IFACE_USX2Y_PCM, /* Tascam US122, US224 & US428 rawusb pcm */ ++ SNDRV_HWDEP_IFACE_PCXHR, /* Digigram PCXHR */ ++ SNDRV_HWDEP_IFACE_SB_RC, /* SB Extigy/Audigy2NX remote control */ ++ SNDRV_HWDEP_IFACE_HDA, /* HD-audio */ ++ SNDRV_HWDEP_IFACE_USB_STREAM, /* direct access to usb stream */ ++ SNDRV_HWDEP_IFACE_FW_DICE, /* TC DICE FireWire device */ ++ SNDRV_HWDEP_IFACE_FW_FIREWORKS, /* Echo Audio Fireworks based device */ ++ SNDRV_HWDEP_IFACE_FW_BEBOB, /* BridgeCo BeBoB based device */ ++ SNDRV_HWDEP_IFACE_FW_OXFW, /* Oxford OXFW970/971 based device */ ++ SNDRV_HWDEP_IFACE_FW_DIGI00X, /* Digidesign Digi 002/003 family */ ++ SNDRV_HWDEP_IFACE_FW_TASCAM, /* TASCAM FireWire series */ ++ SNDRV_HWDEP_IFACE_LINE6, /* Line6 USB processors */ ++ SNDRV_HWDEP_IFACE_FW_MOTU, /* MOTU FireWire series */ ++ SNDRV_HWDEP_IFACE_FW_FIREFACE, /* RME Fireface series */ ++ ++ /* Don't forget to change the following: */ ++ SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREFACE ++}; ++ ++struct snd_hwdep_info { ++ unsigned int device; /* WR: device number */ ++ int card; /* R: card number */ ++ unsigned char id[64]; /* ID (user selectable) */ ++ unsigned char name[80]; /* hwdep name */ ++ int iface; /* hwdep interface */ ++ unsigned char reserved[64]; /* reserved for future */ ++}; ++ ++/* generic DSP loader */ ++struct snd_hwdep_dsp_status { ++ unsigned int version; /* R: driver-specific version */ ++ unsigned char id[32]; /* R: driver-specific ID string */ ++ unsigned int num_dsps; /* R: number of DSP images to transfer */ ++ unsigned int dsp_loaded; /* R: bit flags indicating the loaded DSPs */ ++ unsigned int chip_ready; /* R: 1 = initialization finished */ ++ unsigned char reserved[16]; /* reserved for future use */ ++}; ++ ++struct snd_hwdep_dsp_image { ++ unsigned int index; /* W: DSP index */ ++ unsigned char name[64]; /* W: ID (e.g. file name) */ ++ unsigned char __user *image; /* W: binary image */ ++ size_t length; /* W: size of image in bytes */ ++ unsigned long driver_data; /* W: driver-specific data */ ++}; ++ ++#define SNDRV_HWDEP_IOCTL_PVERSION _IOR ('H', 0x00, int) ++#define SNDRV_HWDEP_IOCTL_INFO _IOR ('H', 0x01, struct snd_hwdep_info) ++#define SNDRV_HWDEP_IOCTL_DSP_STATUS _IOR('H', 0x02, struct snd_hwdep_dsp_status) ++#define SNDRV_HWDEP_IOCTL_DSP_LOAD _IOW('H', 0x03, struct snd_hwdep_dsp_image) ++ ++/***************************************************************************** ++ * * ++ * Digital Audio (PCM) interface - /dev/snd/pcm?? * ++ * * ++ *****************************************************************************/ ++ ++#define SNDRV_PCM_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 14) ++ ++typedef unsigned long snd_pcm_uframes_t; ++typedef signed long snd_pcm_sframes_t; ++ ++enum { ++ SNDRV_PCM_CLASS_GENERIC = 0, /* standard mono or stereo device */ ++ SNDRV_PCM_CLASS_MULTI, /* multichannel device */ ++ SNDRV_PCM_CLASS_MODEM, /* software modem class */ ++ SNDRV_PCM_CLASS_DIGITIZER, /* digitizer class */ ++ /* Don't forget to change the following: */ ++ SNDRV_PCM_CLASS_LAST = SNDRV_PCM_CLASS_DIGITIZER, ++}; ++ ++enum { ++ SNDRV_PCM_SUBCLASS_GENERIC_MIX = 0, /* mono or stereo subdevices are mixed together */ ++ SNDRV_PCM_SUBCLASS_MULTI_MIX, /* multichannel subdevices are mixed together */ ++ /* Don't forget to change the following: */ ++ SNDRV_PCM_SUBCLASS_LAST = SNDRV_PCM_SUBCLASS_MULTI_MIX, ++}; ++ ++enum { ++ SNDRV_PCM_STREAM_PLAYBACK = 0, ++ SNDRV_PCM_STREAM_CAPTURE, ++ SNDRV_PCM_STREAM_LAST = SNDRV_PCM_STREAM_CAPTURE, ++}; ++ ++typedef int __bitwise snd_pcm_access_t; ++#define SNDRV_PCM_ACCESS_MMAP_INTERLEAVED ((__force snd_pcm_access_t) 0) /* interleaved mmap */ ++#define SNDRV_PCM_ACCESS_MMAP_NONINTERLEAVED ((__force snd_pcm_access_t) 1) /* noninterleaved mmap */ ++#define SNDRV_PCM_ACCESS_MMAP_COMPLEX ((__force snd_pcm_access_t) 2) /* complex mmap */ ++#define SNDRV_PCM_ACCESS_RW_INTERLEAVED ((__force snd_pcm_access_t) 3) /* readi/writei */ ++#define SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ((__force snd_pcm_access_t) 4) /* readn/writen */ ++#define SNDRV_PCM_ACCESS_LAST SNDRV_PCM_ACCESS_RW_NONINTERLEAVED ++ ++typedef int __bitwise snd_pcm_format_t; ++#define SNDRV_PCM_FORMAT_S8 ((__force snd_pcm_format_t) 0) ++#define SNDRV_PCM_FORMAT_U8 ((__force snd_pcm_format_t) 1) ++#define SNDRV_PCM_FORMAT_S16_LE ((__force snd_pcm_format_t) 2) ++#define SNDRV_PCM_FORMAT_S16_BE ((__force snd_pcm_format_t) 3) ++#define SNDRV_PCM_FORMAT_U16_LE ((__force snd_pcm_format_t) 4) ++#define SNDRV_PCM_FORMAT_U16_BE ((__force snd_pcm_format_t) 5) ++#define SNDRV_PCM_FORMAT_S24_LE ((__force snd_pcm_format_t) 6) /* low three bytes */ ++#define SNDRV_PCM_FORMAT_S24_BE ((__force snd_pcm_format_t) 7) /* low three bytes */ ++#define SNDRV_PCM_FORMAT_U24_LE ((__force snd_pcm_format_t) 8) /* low three bytes */ ++#define SNDRV_PCM_FORMAT_U24_BE ((__force snd_pcm_format_t) 9) /* low three bytes */ ++#define SNDRV_PCM_FORMAT_S32_LE ((__force snd_pcm_format_t) 10) ++#define SNDRV_PCM_FORMAT_S32_BE ((__force snd_pcm_format_t) 11) ++#define SNDRV_PCM_FORMAT_U32_LE ((__force snd_pcm_format_t) 12) ++#define SNDRV_PCM_FORMAT_U32_BE ((__force snd_pcm_format_t) 13) ++#define SNDRV_PCM_FORMAT_FLOAT_LE ((__force snd_pcm_format_t) 14) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ ++#define SNDRV_PCM_FORMAT_FLOAT_BE ((__force snd_pcm_format_t) 15) /* 4-byte float, IEEE-754 32-bit, range -1.0 to 1.0 */ ++#define SNDRV_PCM_FORMAT_FLOAT64_LE ((__force snd_pcm_format_t) 16) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ ++#define SNDRV_PCM_FORMAT_FLOAT64_BE ((__force snd_pcm_format_t) 17) /* 8-byte float, IEEE-754 64-bit, range -1.0 to 1.0 */ ++#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ((__force snd_pcm_format_t) 18) /* IEC-958 subframe, Little Endian */ ++#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ((__force snd_pcm_format_t) 19) /* IEC-958 subframe, Big Endian */ ++#define SNDRV_PCM_FORMAT_MU_LAW ((__force snd_pcm_format_t) 20) ++#define SNDRV_PCM_FORMAT_A_LAW ((__force snd_pcm_format_t) 21) ++#define SNDRV_PCM_FORMAT_IMA_ADPCM ((__force snd_pcm_format_t) 22) ++#define SNDRV_PCM_FORMAT_MPEG ((__force snd_pcm_format_t) 23) ++#define SNDRV_PCM_FORMAT_GSM ((__force snd_pcm_format_t) 24) ++#define SNDRV_PCM_FORMAT_S20_LE ((__force snd_pcm_format_t) 25) /* in four bytes, LSB justified */ ++#define SNDRV_PCM_FORMAT_S20_BE ((__force snd_pcm_format_t) 26) /* in four bytes, LSB justified */ ++#define SNDRV_PCM_FORMAT_U20_LE ((__force snd_pcm_format_t) 27) /* in four bytes, LSB justified */ ++#define SNDRV_PCM_FORMAT_U20_BE ((__force snd_pcm_format_t) 28) /* in four bytes, LSB justified */ ++/* gap in the numbering for a future standard linear format */ ++#define SNDRV_PCM_FORMAT_SPECIAL ((__force snd_pcm_format_t) 31) ++#define SNDRV_PCM_FORMAT_S24_3LE ((__force snd_pcm_format_t) 32) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_S24_3BE ((__force snd_pcm_format_t) 33) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_U24_3LE ((__force snd_pcm_format_t) 34) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_U24_3BE ((__force snd_pcm_format_t) 35) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_S20_3LE ((__force snd_pcm_format_t) 36) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_S20_3BE ((__force snd_pcm_format_t) 37) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_U20_3LE ((__force snd_pcm_format_t) 38) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_U20_3BE ((__force snd_pcm_format_t) 39) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_S18_3LE ((__force snd_pcm_format_t) 40) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_S18_3BE ((__force snd_pcm_format_t) 41) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_U18_3LE ((__force snd_pcm_format_t) 42) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_U18_3BE ((__force snd_pcm_format_t) 43) /* in three bytes */ ++#define SNDRV_PCM_FORMAT_G723_24 ((__force snd_pcm_format_t) 44) /* 8 samples in 3 bytes */ ++#define SNDRV_PCM_FORMAT_G723_24_1B ((__force snd_pcm_format_t) 45) /* 1 sample in 1 byte */ ++#define SNDRV_PCM_FORMAT_G723_40 ((__force snd_pcm_format_t) 46) /* 8 Samples in 5 bytes */ ++#define SNDRV_PCM_FORMAT_G723_40_1B ((__force snd_pcm_format_t) 47) /* 1 sample in 1 byte */ ++#define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */ ++#define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */ ++#define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */ ++#define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */ ++#define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */ ++#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE ++#define SNDRV_PCM_FORMAT_FIRST SNDRV_PCM_FORMAT_S8 ++ ++#ifdef SNDRV_LITTLE_ENDIAN ++#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE ++#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_LE ++#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_LE ++#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_LE ++#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_LE ++#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_LE ++#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_LE ++#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_LE ++#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE ++#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_LE ++#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_LE ++#endif ++#ifdef SNDRV_BIG_ENDIAN ++#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_BE ++#define SNDRV_PCM_FORMAT_U16 SNDRV_PCM_FORMAT_U16_BE ++#define SNDRV_PCM_FORMAT_S24 SNDRV_PCM_FORMAT_S24_BE ++#define SNDRV_PCM_FORMAT_U24 SNDRV_PCM_FORMAT_U24_BE ++#define SNDRV_PCM_FORMAT_S32 SNDRV_PCM_FORMAT_S32_BE ++#define SNDRV_PCM_FORMAT_U32 SNDRV_PCM_FORMAT_U32_BE ++#define SNDRV_PCM_FORMAT_FLOAT SNDRV_PCM_FORMAT_FLOAT_BE ++#define SNDRV_PCM_FORMAT_FLOAT64 SNDRV_PCM_FORMAT_FLOAT64_BE ++#define SNDRV_PCM_FORMAT_IEC958_SUBFRAME SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE ++#define SNDRV_PCM_FORMAT_S20 SNDRV_PCM_FORMAT_S20_BE ++#define SNDRV_PCM_FORMAT_U20 SNDRV_PCM_FORMAT_U20_BE ++#endif ++ ++typedef int __bitwise snd_pcm_subformat_t; ++#define SNDRV_PCM_SUBFORMAT_STD ((__force snd_pcm_subformat_t) 0) ++#define SNDRV_PCM_SUBFORMAT_LAST SNDRV_PCM_SUBFORMAT_STD ++ ++#define SNDRV_PCM_INFO_MMAP 0x00000001 /* hardware supports mmap */ ++#define SNDRV_PCM_INFO_MMAP_VALID 0x00000002 /* period data are valid during transfer */ ++#define SNDRV_PCM_INFO_DOUBLE 0x00000004 /* Double buffering needed for PCM start/stop */ ++#define SNDRV_PCM_INFO_BATCH 0x00000010 /* double buffering */ ++#define SNDRV_PCM_INFO_SYNC_APPLPTR 0x00000020 /* need the explicit sync of appl_ptr update */ ++#define SNDRV_PCM_INFO_INTERLEAVED 0x00000100 /* channels are interleaved */ ++#define SNDRV_PCM_INFO_NONINTERLEAVED 0x00000200 /* channels are not interleaved */ ++#define SNDRV_PCM_INFO_COMPLEX 0x00000400 /* complex frame organization (mmap only) */ ++#define SNDRV_PCM_INFO_BLOCK_TRANSFER 0x00010000 /* hardware transfer block of samples */ ++#define SNDRV_PCM_INFO_OVERRANGE 0x00020000 /* hardware supports ADC (capture) overrange detection */ ++#define SNDRV_PCM_INFO_RESUME 0x00040000 /* hardware supports stream resume after suspend */ ++#define SNDRV_PCM_INFO_PAUSE 0x00080000 /* pause ioctl is supported */ ++#define SNDRV_PCM_INFO_HALF_DUPLEX 0x00100000 /* only half duplex */ ++#define SNDRV_PCM_INFO_JOINT_DUPLEX 0x00200000 /* playback and capture stream are somewhat correlated */ ++#define SNDRV_PCM_INFO_SYNC_START 0x00400000 /* pcm support some kind of sync go */ ++#define SNDRV_PCM_INFO_NO_PERIOD_WAKEUP 0x00800000 /* period wakeup can be disabled */ ++#define SNDRV_PCM_INFO_HAS_WALL_CLOCK 0x01000000 /* (Deprecated)has audio wall clock for audio/system time sync */ ++#define SNDRV_PCM_INFO_HAS_LINK_ATIME 0x01000000 /* report hardware link audio time, reset on startup */ ++#define SNDRV_PCM_INFO_HAS_LINK_ABSOLUTE_ATIME 0x02000000 /* report absolute hardware link audio time, not reset on startup */ ++#define SNDRV_PCM_INFO_HAS_LINK_ESTIMATED_ATIME 0x04000000 /* report estimated link audio time */ ++#define SNDRV_PCM_INFO_HAS_LINK_SYNCHRONIZED_ATIME 0x08000000 /* report synchronized audio/system time */ ++ ++#define SNDRV_PCM_INFO_DRAIN_TRIGGER 0x40000000 /* internal kernel flag - trigger in drain */ ++#define SNDRV_PCM_INFO_FIFO_IN_FRAMES 0x80000000 /* internal kernel flag - FIFO size is in frames */ ++ ++ ++ ++typedef int __bitwise snd_pcm_state_t; ++#define SNDRV_PCM_STATE_OPEN ((__force snd_pcm_state_t) 0) /* stream is open */ ++#define SNDRV_PCM_STATE_SETUP ((__force snd_pcm_state_t) 1) /* stream has a setup */ ++#define SNDRV_PCM_STATE_PREPARED ((__force snd_pcm_state_t) 2) /* stream is ready to start */ ++#define SNDRV_PCM_STATE_RUNNING ((__force snd_pcm_state_t) 3) /* stream is running */ ++#define SNDRV_PCM_STATE_XRUN ((__force snd_pcm_state_t) 4) /* stream reached an xrun */ ++#define SNDRV_PCM_STATE_DRAINING ((__force snd_pcm_state_t) 5) /* stream is draining */ ++#define SNDRV_PCM_STATE_PAUSED ((__force snd_pcm_state_t) 6) /* stream is paused */ ++#define SNDRV_PCM_STATE_SUSPENDED ((__force snd_pcm_state_t) 7) /* hardware is suspended */ ++#define SNDRV_PCM_STATE_DISCONNECTED ((__force snd_pcm_state_t) 8) /* hardware is disconnected */ ++#define SNDRV_PCM_STATE_LAST SNDRV_PCM_STATE_DISCONNECTED ++ ++enum { ++ SNDRV_PCM_MMAP_OFFSET_DATA = 0x00000000, ++ SNDRV_PCM_MMAP_OFFSET_STATUS = 0x80000000, ++ SNDRV_PCM_MMAP_OFFSET_CONTROL = 0x81000000, ++}; ++ ++union snd_pcm_sync_id { ++ unsigned char id[16]; ++ unsigned short id16[8]; ++ unsigned int id32[4]; ++}; ++ ++struct snd_pcm_info { ++ unsigned int device; /* RO/WR (control): device number */ ++ unsigned int subdevice; /* RO/WR (control): subdevice number */ ++ int stream; /* RO/WR (control): stream direction */ ++ int card; /* R: card number */ ++ unsigned char id[64]; /* ID (user selectable) */ ++ unsigned char name[80]; /* name of this device */ ++ unsigned char subname[32]; /* subdevice name */ ++ int dev_class; /* SNDRV_PCM_CLASS_* */ ++ int dev_subclass; /* SNDRV_PCM_SUBCLASS_* */ ++ unsigned int subdevices_count; ++ unsigned int subdevices_avail; ++ union snd_pcm_sync_id sync; /* hardware synchronization ID */ ++ unsigned char reserved[64]; /* reserved for future... */ ++}; ++ ++typedef int snd_pcm_hw_param_t; ++#define SNDRV_PCM_HW_PARAM_ACCESS 0 /* Access type */ ++#define SNDRV_PCM_HW_PARAM_FORMAT 1 /* Format */ ++#define SNDRV_PCM_HW_PARAM_SUBFORMAT 2 /* Subformat */ ++#define SNDRV_PCM_HW_PARAM_FIRST_MASK SNDRV_PCM_HW_PARAM_ACCESS ++#define SNDRV_PCM_HW_PARAM_LAST_MASK SNDRV_PCM_HW_PARAM_SUBFORMAT ++ ++#define SNDRV_PCM_HW_PARAM_SAMPLE_BITS 8 /* Bits per sample */ ++#define SNDRV_PCM_HW_PARAM_FRAME_BITS 9 /* Bits per frame */ ++#define SNDRV_PCM_HW_PARAM_CHANNELS 10 /* Channels */ ++#define SNDRV_PCM_HW_PARAM_RATE 11 /* Approx rate */ ++#define SNDRV_PCM_HW_PARAM_PERIOD_TIME 12 /* Approx distance between ++ * interrupts in us ++ */ ++#define SNDRV_PCM_HW_PARAM_PERIOD_SIZE 13 /* Approx frames between ++ * interrupts ++ */ ++#define SNDRV_PCM_HW_PARAM_PERIOD_BYTES 14 /* Approx bytes between ++ * interrupts ++ */ ++#define SNDRV_PCM_HW_PARAM_PERIODS 15 /* Approx interrupts per ++ * buffer ++ */ ++#define SNDRV_PCM_HW_PARAM_BUFFER_TIME 16 /* Approx duration of buffer ++ * in us ++ */ ++#define SNDRV_PCM_HW_PARAM_BUFFER_SIZE 17 /* Size of buffer in frames */ ++#define SNDRV_PCM_HW_PARAM_BUFFER_BYTES 18 /* Size of buffer in bytes */ ++#define SNDRV_PCM_HW_PARAM_TICK_TIME 19 /* Approx tick duration in us */ ++#define SNDRV_PCM_HW_PARAM_FIRST_INTERVAL SNDRV_PCM_HW_PARAM_SAMPLE_BITS ++#define SNDRV_PCM_HW_PARAM_LAST_INTERVAL SNDRV_PCM_HW_PARAM_TICK_TIME ++ ++#define SNDRV_PCM_HW_PARAMS_NORESAMPLE (1<<0) /* avoid rate resampling */ ++#define SNDRV_PCM_HW_PARAMS_EXPORT_BUFFER (1<<1) /* export buffer */ ++#define SNDRV_PCM_HW_PARAMS_NO_PERIOD_WAKEUP (1<<2) /* disable period wakeups */ ++ ++struct snd_interval { ++ unsigned int min, max; ++ unsigned int openmin:1, ++ openmax:1, ++ integer:1, ++ empty:1; ++}; ++ ++#define SNDRV_MASK_MAX 256 ++ ++struct snd_mask { ++ __u32 bits[(SNDRV_MASK_MAX+31)/32]; ++}; ++ ++struct snd_pcm_hw_params { ++ unsigned int flags; ++ struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - ++ SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; ++ struct snd_mask mres[5]; /* reserved masks */ ++ struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - ++ SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1]; ++ struct snd_interval ires[9]; /* reserved intervals */ ++ unsigned int rmask; /* W: requested masks */ ++ unsigned int cmask; /* R: changed masks */ ++ unsigned int info; /* R: Info flags for returned setup */ ++ unsigned int msbits; /* R: used most significant bits */ ++ unsigned int rate_num; /* R: rate numerator */ ++ unsigned int rate_den; /* R: rate denominator */ ++ snd_pcm_uframes_t fifo_size; /* R: chip FIFO size in frames */ ++ unsigned char reserved[64]; /* reserved for future */ ++}; ++ ++enum { ++ SNDRV_PCM_TSTAMP_NONE = 0, ++ SNDRV_PCM_TSTAMP_ENABLE, ++ SNDRV_PCM_TSTAMP_LAST = SNDRV_PCM_TSTAMP_ENABLE, ++}; ++ ++struct snd_pcm_sw_params { ++ int tstamp_mode; /* timestamp mode */ ++ unsigned int period_step; ++ unsigned int sleep_min; /* min ticks to sleep */ ++ snd_pcm_uframes_t avail_min; /* min avail frames for wakeup */ ++ snd_pcm_uframes_t xfer_align; /* obsolete: xfer size need to be a multiple */ ++ snd_pcm_uframes_t start_threshold; /* min hw_avail frames for automatic start */ ++ snd_pcm_uframes_t stop_threshold; /* min avail frames for automatic stop */ ++ snd_pcm_uframes_t silence_threshold; /* min distance from noise for silence filling */ ++ snd_pcm_uframes_t silence_size; /* silence block size */ ++ snd_pcm_uframes_t boundary; /* pointers wrap point */ ++ unsigned int proto; /* protocol version */ ++ unsigned int tstamp_type; /* timestamp type (req. proto >= 2.0.12) */ ++ unsigned char reserved[56]; /* reserved for future */ ++}; ++ ++struct snd_pcm_channel_info { ++ unsigned int channel; ++ __kernel_off_t offset; /* mmap offset */ ++ unsigned int first; /* offset to first sample in bits */ ++ unsigned int step; /* samples distance in bits */ ++}; ++ ++enum { ++ /* ++ * first definition for backwards compatibility only, ++ * maps to wallclock/link time for HDAudio playback and DEFAULT/DMA time for everything else ++ */ ++ SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT = 0, ++ ++ /* timestamp definitions */ ++ SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT = 1, /* DMA time, reported as per hw_ptr */ ++ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK = 2, /* link time reported by sample or wallclock counter, reset on startup */ ++ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ABSOLUTE = 3, /* link time reported by sample or wallclock counter, not reset on startup */ ++ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_ESTIMATED = 4, /* link time estimated indirectly */ ++ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED = 5, /* link time synchronized with system time */ ++ SNDRV_PCM_AUDIO_TSTAMP_TYPE_LAST = SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK_SYNCHRONIZED ++}; ++ ++struct snd_pcm_status { ++ snd_pcm_state_t state; /* stream state */ ++ struct timespec trigger_tstamp; /* time when stream was started/stopped/paused */ ++ struct timespec tstamp; /* reference timestamp */ ++ snd_pcm_uframes_t appl_ptr; /* appl ptr */ ++ snd_pcm_uframes_t hw_ptr; /* hw ptr */ ++ snd_pcm_sframes_t delay; /* current delay in frames */ ++ snd_pcm_uframes_t avail; /* number of frames available */ ++ snd_pcm_uframes_t avail_max; /* max frames available on hw since last status */ ++ snd_pcm_uframes_t overrange; /* count of ADC (capture) overrange detections from last status */ ++ snd_pcm_state_t suspended_state; /* suspended stream state */ ++ __u32 audio_tstamp_data; /* needed for 64-bit alignment, used for configs/report to/from userspace */ ++ struct timespec audio_tstamp; /* sample counter, wall clock, PHC or on-demand sync'ed */ ++ struct timespec driver_tstamp; /* useful in case reference system tstamp is reported with delay */ ++ __u32 audio_tstamp_accuracy; /* in ns units, only valid if indicated in audio_tstamp_data */ ++ unsigned char reserved[52-2*sizeof(struct timespec)]; /* must be filled with zero */ ++}; ++ ++struct snd_pcm_mmap_status { ++ snd_pcm_state_t state; /* RO: state - SNDRV_PCM_STATE_XXXX */ ++ int pad1; /* Needed for 64 bit alignment */ ++ snd_pcm_uframes_t hw_ptr; /* RO: hw ptr (0...boundary-1) */ ++ struct timespec tstamp; /* Timestamp */ ++ snd_pcm_state_t suspended_state; /* RO: suspended stream state */ ++ struct timespec audio_tstamp; /* from sample counter or wall clock */ ++}; ++ ++struct snd_pcm_mmap_control { ++ snd_pcm_uframes_t appl_ptr; /* RW: appl ptr (0...boundary-1) */ ++ snd_pcm_uframes_t avail_min; /* RW: min available frames for wakeup */ ++}; ++ ++#define SNDRV_PCM_SYNC_PTR_HWSYNC (1<<0) /* execute hwsync */ ++#define SNDRV_PCM_SYNC_PTR_APPL (1<<1) /* get appl_ptr from driver (r/w op) */ ++#define SNDRV_PCM_SYNC_PTR_AVAIL_MIN (1<<2) /* get avail_min from driver */ ++ ++struct snd_pcm_sync_ptr { ++ unsigned int flags; ++ union { ++ struct snd_pcm_mmap_status status; ++ unsigned char reserved[64]; ++ } s; ++ union { ++ struct snd_pcm_mmap_control control; ++ unsigned char reserved[64]; ++ } c; ++}; ++ ++struct snd_xferi { ++ snd_pcm_sframes_t result; ++ void __user *buf; ++ snd_pcm_uframes_t frames; ++}; ++ ++struct snd_xfern { ++ snd_pcm_sframes_t result; ++ void __user * __user *bufs; ++ snd_pcm_uframes_t frames; ++}; ++ ++enum { ++ SNDRV_PCM_TSTAMP_TYPE_GETTIMEOFDAY = 0, /* gettimeofday equivalent */ ++ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC, /* posix_clock_monotonic equivalent */ ++ SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, /* monotonic_raw (no NTP) */ ++ SNDRV_PCM_TSTAMP_TYPE_LAST = SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW, ++}; ++ ++/* channel positions */ ++enum { ++ SNDRV_CHMAP_UNKNOWN = 0, ++ SNDRV_CHMAP_NA, /* N/A, silent */ ++ SNDRV_CHMAP_MONO, /* mono stream */ ++ /* this follows the alsa-lib mixer channel value + 3 */ ++ SNDRV_CHMAP_FL, /* front left */ ++ SNDRV_CHMAP_FR, /* front right */ ++ SNDRV_CHMAP_RL, /* rear left */ ++ SNDRV_CHMAP_RR, /* rear right */ ++ SNDRV_CHMAP_FC, /* front center */ ++ SNDRV_CHMAP_LFE, /* LFE */ ++ SNDRV_CHMAP_SL, /* side left */ ++ SNDRV_CHMAP_SR, /* side right */ ++ SNDRV_CHMAP_RC, /* rear center */ ++ /* new definitions */ ++ SNDRV_CHMAP_FLC, /* front left center */ ++ SNDRV_CHMAP_FRC, /* front right center */ ++ SNDRV_CHMAP_RLC, /* rear left center */ ++ SNDRV_CHMAP_RRC, /* rear right center */ ++ SNDRV_CHMAP_FLW, /* front left wide */ ++ SNDRV_CHMAP_FRW, /* front right wide */ ++ SNDRV_CHMAP_FLH, /* front left high */ ++ SNDRV_CHMAP_FCH, /* front center high */ ++ SNDRV_CHMAP_FRH, /* front right high */ ++ SNDRV_CHMAP_TC, /* top center */ ++ SNDRV_CHMAP_TFL, /* top front left */ ++ SNDRV_CHMAP_TFR, /* top front right */ ++ SNDRV_CHMAP_TFC, /* top front center */ ++ SNDRV_CHMAP_TRL, /* top rear left */ ++ SNDRV_CHMAP_TRR, /* top rear right */ ++ SNDRV_CHMAP_TRC, /* top rear center */ ++ /* new definitions for UAC2 */ ++ SNDRV_CHMAP_TFLC, /* top front left center */ ++ SNDRV_CHMAP_TFRC, /* top front right center */ ++ SNDRV_CHMAP_TSL, /* top side left */ ++ SNDRV_CHMAP_TSR, /* top side right */ ++ SNDRV_CHMAP_LLFE, /* left LFE */ ++ SNDRV_CHMAP_RLFE, /* right LFE */ ++ SNDRV_CHMAP_BC, /* bottom center */ ++ SNDRV_CHMAP_BLC, /* bottom left center */ ++ SNDRV_CHMAP_BRC, /* bottom right center */ ++ SNDRV_CHMAP_LAST = SNDRV_CHMAP_BRC, ++}; ++ ++#define SNDRV_CHMAP_POSITION_MASK 0xffff ++#define SNDRV_CHMAP_PHASE_INVERSE (0x01 << 16) ++#define SNDRV_CHMAP_DRIVER_SPEC (0x02 << 16) ++ ++#define SNDRV_PCM_IOCTL_PVERSION _IOR('A', 0x00, int) ++#define SNDRV_PCM_IOCTL_INFO _IOR('A', 0x01, struct snd_pcm_info) ++#define SNDRV_PCM_IOCTL_TSTAMP _IOW('A', 0x02, int) ++#define SNDRV_PCM_IOCTL_TTSTAMP _IOW('A', 0x03, int) ++#define SNDRV_PCM_IOCTL_USER_PVERSION _IOW('A', 0x04, int) ++#define SNDRV_PCM_IOCTL_HW_REFINE _IOWR('A', 0x10, struct snd_pcm_hw_params) ++#define SNDRV_PCM_IOCTL_HW_PARAMS _IOWR('A', 0x11, struct snd_pcm_hw_params) ++#define SNDRV_PCM_IOCTL_HW_FREE _IO('A', 0x12) ++#define SNDRV_PCM_IOCTL_SW_PARAMS _IOWR('A', 0x13, struct snd_pcm_sw_params) ++#define SNDRV_PCM_IOCTL_STATUS _IOR('A', 0x20, struct snd_pcm_status) ++#define SNDRV_PCM_IOCTL_DELAY _IOR('A', 0x21, snd_pcm_sframes_t) ++#define SNDRV_PCM_IOCTL_HWSYNC _IO('A', 0x22) ++#define SNDRV_PCM_IOCTL_SYNC_PTR _IOWR('A', 0x23, struct snd_pcm_sync_ptr) ++#define SNDRV_PCM_IOCTL_STATUS_EXT _IOWR('A', 0x24, struct snd_pcm_status) ++#define SNDRV_PCM_IOCTL_CHANNEL_INFO _IOR('A', 0x32, struct snd_pcm_channel_info) ++#define SNDRV_PCM_IOCTL_PREPARE _IO('A', 0x40) ++#define SNDRV_PCM_IOCTL_RESET _IO('A', 0x41) ++#define SNDRV_PCM_IOCTL_START _IO('A', 0x42) ++#define SNDRV_PCM_IOCTL_DROP _IO('A', 0x43) ++#define SNDRV_PCM_IOCTL_DRAIN _IO('A', 0x44) ++#define SNDRV_PCM_IOCTL_PAUSE _IOW('A', 0x45, int) ++#define SNDRV_PCM_IOCTL_REWIND _IOW('A', 0x46, snd_pcm_uframes_t) ++#define SNDRV_PCM_IOCTL_RESUME _IO('A', 0x47) ++#define SNDRV_PCM_IOCTL_XRUN _IO('A', 0x48) ++#define SNDRV_PCM_IOCTL_FORWARD _IOW('A', 0x49, snd_pcm_uframes_t) ++#define SNDRV_PCM_IOCTL_WRITEI_FRAMES _IOW('A', 0x50, struct snd_xferi) ++#define SNDRV_PCM_IOCTL_READI_FRAMES _IOR('A', 0x51, struct snd_xferi) ++#define SNDRV_PCM_IOCTL_WRITEN_FRAMES _IOW('A', 0x52, struct snd_xfern) ++#define SNDRV_PCM_IOCTL_READN_FRAMES _IOR('A', 0x53, struct snd_xfern) ++#define SNDRV_PCM_IOCTL_LINK _IOW('A', 0x60, int) ++#define SNDRV_PCM_IOCTL_UNLINK _IO('A', 0x61) ++ ++/***************************************************************************** ++ * * ++ * MIDI v1.0 interface * ++ * * ++ *****************************************************************************/ ++ ++/* ++ * Raw MIDI section - /dev/snd/midi?? ++ */ ++ ++#define SNDRV_RAWMIDI_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 0) ++ ++enum { ++ SNDRV_RAWMIDI_STREAM_OUTPUT = 0, ++ SNDRV_RAWMIDI_STREAM_INPUT, ++ SNDRV_RAWMIDI_STREAM_LAST = SNDRV_RAWMIDI_STREAM_INPUT, ++}; ++ ++#define SNDRV_RAWMIDI_INFO_OUTPUT 0x00000001 ++#define SNDRV_RAWMIDI_INFO_INPUT 0x00000002 ++#define SNDRV_RAWMIDI_INFO_DUPLEX 0x00000004 ++ ++struct snd_rawmidi_info { ++ unsigned int device; /* RO/WR (control): device number */ ++ unsigned int subdevice; /* RO/WR (control): subdevice number */ ++ int stream; /* WR: stream */ ++ int card; /* R: card number */ ++ unsigned int flags; /* SNDRV_RAWMIDI_INFO_XXXX */ ++ unsigned char id[64]; /* ID (user selectable) */ ++ unsigned char name[80]; /* name of device */ ++ unsigned char subname[32]; /* name of active or selected subdevice */ ++ unsigned int subdevices_count; ++ unsigned int subdevices_avail; ++ unsigned char reserved[64]; /* reserved for future use */ ++}; ++ ++struct snd_rawmidi_params { ++ int stream; ++ size_t buffer_size; /* queue size in bytes */ ++ size_t avail_min; /* minimum avail bytes for wakeup */ ++ unsigned int no_active_sensing: 1; /* do not send active sensing byte in close() */ ++ unsigned char reserved[16]; /* reserved for future use */ ++}; ++ ++struct snd_rawmidi_status { ++ int stream; ++ struct timespec tstamp; /* Timestamp */ ++ size_t avail; /* available bytes */ ++ size_t xruns; /* count of overruns since last status (in bytes) */ ++ unsigned char reserved[16]; /* reserved for future use */ ++}; ++ ++#define SNDRV_RAWMIDI_IOCTL_PVERSION _IOR('W', 0x00, int) ++#define SNDRV_RAWMIDI_IOCTL_INFO _IOR('W', 0x01, struct snd_rawmidi_info) ++#define SNDRV_RAWMIDI_IOCTL_PARAMS _IOWR('W', 0x10, struct snd_rawmidi_params) ++#define SNDRV_RAWMIDI_IOCTL_STATUS _IOWR('W', 0x20, struct snd_rawmidi_status) ++#define SNDRV_RAWMIDI_IOCTL_DROP _IOW('W', 0x30, int) ++#define SNDRV_RAWMIDI_IOCTL_DRAIN _IOW('W', 0x31, int) ++ ++/* ++ * Timer section - /dev/snd/timer ++ */ ++ ++#define SNDRV_TIMER_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 6) ++ ++enum { ++ SNDRV_TIMER_CLASS_NONE = -1, ++ SNDRV_TIMER_CLASS_SLAVE = 0, ++ SNDRV_TIMER_CLASS_GLOBAL, ++ SNDRV_TIMER_CLASS_CARD, ++ SNDRV_TIMER_CLASS_PCM, ++ SNDRV_TIMER_CLASS_LAST = SNDRV_TIMER_CLASS_PCM, ++}; ++ ++/* slave timer classes */ ++enum { ++ SNDRV_TIMER_SCLASS_NONE = 0, ++ SNDRV_TIMER_SCLASS_APPLICATION, ++ SNDRV_TIMER_SCLASS_SEQUENCER, /* alias */ ++ SNDRV_TIMER_SCLASS_OSS_SEQUENCER, /* alias */ ++ SNDRV_TIMER_SCLASS_LAST = SNDRV_TIMER_SCLASS_OSS_SEQUENCER, ++}; ++ ++/* global timers (device member) */ ++#define SNDRV_TIMER_GLOBAL_SYSTEM 0 ++#define SNDRV_TIMER_GLOBAL_RTC 1 /* unused */ ++#define SNDRV_TIMER_GLOBAL_HPET 2 ++#define SNDRV_TIMER_GLOBAL_HRTIMER 3 ++ ++/* info flags */ ++#define SNDRV_TIMER_FLG_SLAVE (1<<0) /* cannot be controlled */ ++ ++struct snd_timer_id { ++ int dev_class; ++ int dev_sclass; ++ int card; ++ int device; ++ int subdevice; ++}; ++ ++struct snd_timer_ginfo { ++ struct snd_timer_id tid; /* requested timer ID */ ++ unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */ ++ int card; /* card number */ ++ unsigned char id[64]; /* timer identification */ ++ unsigned char name[80]; /* timer name */ ++ unsigned long reserved0; /* reserved for future use */ ++ unsigned long resolution; /* average period resolution in ns */ ++ unsigned long resolution_min; /* minimal period resolution in ns */ ++ unsigned long resolution_max; /* maximal period resolution in ns */ ++ unsigned int clients; /* active timer clients */ ++ unsigned char reserved[32]; ++}; ++ ++struct snd_timer_gparams { ++ struct snd_timer_id tid; /* requested timer ID */ ++ unsigned long period_num; /* requested precise period duration (in seconds) - numerator */ ++ unsigned long period_den; /* requested precise period duration (in seconds) - denominator */ ++ unsigned char reserved[32]; ++}; ++ ++struct snd_timer_gstatus { ++ struct snd_timer_id tid; /* requested timer ID */ ++ unsigned long resolution; /* current period resolution in ns */ ++ unsigned long resolution_num; /* precise current period resolution (in seconds) - numerator */ ++ unsigned long resolution_den; /* precise current period resolution (in seconds) - denominator */ ++ unsigned char reserved[32]; ++}; ++ ++struct snd_timer_select { ++ struct snd_timer_id id; /* bind to timer ID */ ++ unsigned char reserved[32]; /* reserved */ ++}; ++ ++struct snd_timer_info { ++ unsigned int flags; /* timer flags - SNDRV_TIMER_FLG_* */ ++ int card; /* card number */ ++ unsigned char id[64]; /* timer identificator */ ++ unsigned char name[80]; /* timer name */ ++ unsigned long reserved0; /* reserved for future use */ ++ unsigned long resolution; /* average period resolution in ns */ ++ unsigned char reserved[64]; /* reserved */ ++}; ++ ++#define SNDRV_TIMER_PSFLG_AUTO (1<<0) /* auto start, otherwise one-shot */ ++#define SNDRV_TIMER_PSFLG_EXCLUSIVE (1<<1) /* exclusive use, precise start/stop/pause/continue */ ++#define SNDRV_TIMER_PSFLG_EARLY_EVENT (1<<2) /* write early event to the poll queue */ ++ ++struct snd_timer_params { ++ unsigned int flags; /* flags - SNDRV_TIMER_PSFLG_* */ ++ unsigned int ticks; /* requested resolution in ticks */ ++ unsigned int queue_size; /* total size of queue (32-1024) */ ++ unsigned int reserved0; /* reserved, was: failure locations */ ++ unsigned int filter; /* event filter (bitmask of SNDRV_TIMER_EVENT_*) */ ++ unsigned char reserved[60]; /* reserved */ ++}; ++ ++struct snd_timer_status { ++ struct timespec tstamp; /* Timestamp - last update */ ++ unsigned int resolution; /* current period resolution in ns */ ++ unsigned int lost; /* counter of master tick lost */ ++ unsigned int overrun; /* count of read queue overruns */ ++ unsigned int queue; /* used queue size */ ++ unsigned char reserved[64]; /* reserved */ ++}; ++ ++#define SNDRV_TIMER_IOCTL_PVERSION _IOR('T', 0x00, int) ++#define SNDRV_TIMER_IOCTL_NEXT_DEVICE _IOWR('T', 0x01, struct snd_timer_id) ++#define SNDRV_TIMER_IOCTL_TREAD _IOW('T', 0x02, int) ++#define SNDRV_TIMER_IOCTL_GINFO _IOWR('T', 0x03, struct snd_timer_ginfo) ++#define SNDRV_TIMER_IOCTL_GPARAMS _IOW('T', 0x04, struct snd_timer_gparams) ++#define SNDRV_TIMER_IOCTL_GSTATUS _IOWR('T', 0x05, struct snd_timer_gstatus) ++#define SNDRV_TIMER_IOCTL_SELECT _IOW('T', 0x10, struct snd_timer_select) ++#define SNDRV_TIMER_IOCTL_INFO _IOR('T', 0x11, struct snd_timer_info) ++#define SNDRV_TIMER_IOCTL_PARAMS _IOW('T', 0x12, struct snd_timer_params) ++#define SNDRV_TIMER_IOCTL_STATUS _IOR('T', 0x14, struct snd_timer_status) ++/* The following four ioctls are changed since 1.0.9 due to confliction */ ++#define SNDRV_TIMER_IOCTL_START _IO('T', 0xa0) ++#define SNDRV_TIMER_IOCTL_STOP _IO('T', 0xa1) ++#define SNDRV_TIMER_IOCTL_CONTINUE _IO('T', 0xa2) ++#define SNDRV_TIMER_IOCTL_PAUSE _IO('T', 0xa3) ++ ++struct snd_timer_read { ++ unsigned int resolution; ++ unsigned int ticks; ++}; ++ ++enum { ++ SNDRV_TIMER_EVENT_RESOLUTION = 0, /* val = resolution in ns */ ++ SNDRV_TIMER_EVENT_TICK, /* val = ticks */ ++ SNDRV_TIMER_EVENT_START, /* val = resolution in ns */ ++ SNDRV_TIMER_EVENT_STOP, /* val = 0 */ ++ SNDRV_TIMER_EVENT_CONTINUE, /* val = resolution in ns */ ++ SNDRV_TIMER_EVENT_PAUSE, /* val = 0 */ ++ SNDRV_TIMER_EVENT_EARLY, /* val = 0, early event */ ++ SNDRV_TIMER_EVENT_SUSPEND, /* val = 0 */ ++ SNDRV_TIMER_EVENT_RESUME, /* val = resolution in ns */ ++ /* master timer events for slave timer instances */ ++ SNDRV_TIMER_EVENT_MSTART = SNDRV_TIMER_EVENT_START + 10, ++ SNDRV_TIMER_EVENT_MSTOP = SNDRV_TIMER_EVENT_STOP + 10, ++ SNDRV_TIMER_EVENT_MCONTINUE = SNDRV_TIMER_EVENT_CONTINUE + 10, ++ SNDRV_TIMER_EVENT_MPAUSE = SNDRV_TIMER_EVENT_PAUSE + 10, ++ SNDRV_TIMER_EVENT_MSUSPEND = SNDRV_TIMER_EVENT_SUSPEND + 10, ++ SNDRV_TIMER_EVENT_MRESUME = SNDRV_TIMER_EVENT_RESUME + 10, ++}; ++ ++struct snd_timer_tread { ++ int event; ++ struct timespec tstamp; ++ unsigned int val; ++}; ++ ++/**************************************************************************** ++ * * ++ * Section for driver control interface - /dev/snd/control? * ++ * * ++ ****************************************************************************/ ++ ++#define SNDRV_CTL_VERSION SNDRV_PROTOCOL_VERSION(2, 0, 7) ++ ++struct snd_ctl_card_info { ++ int card; /* card number */ ++ int pad; /* reserved for future (was type) */ ++ unsigned char id[16]; /* ID of card (user selectable) */ ++ unsigned char driver[16]; /* Driver name */ ++ unsigned char name[32]; /* Short name of soundcard */ ++ unsigned char longname[80]; /* name + info text about soundcard */ ++ unsigned char reserved_[16]; /* reserved for future (was ID of mixer) */ ++ unsigned char mixername[80]; /* visual mixer identification */ ++ unsigned char components[128]; /* card components / fine identification, delimited with one space (AC97 etc..) */ ++}; ++ ++typedef int __bitwise snd_ctl_elem_type_t; ++#define SNDRV_CTL_ELEM_TYPE_NONE ((__force snd_ctl_elem_type_t) 0) /* invalid */ ++#define SNDRV_CTL_ELEM_TYPE_BOOLEAN ((__force snd_ctl_elem_type_t) 1) /* boolean type */ ++#define SNDRV_CTL_ELEM_TYPE_INTEGER ((__force snd_ctl_elem_type_t) 2) /* integer type */ ++#define SNDRV_CTL_ELEM_TYPE_ENUMERATED ((__force snd_ctl_elem_type_t) 3) /* enumerated type */ ++#define SNDRV_CTL_ELEM_TYPE_BYTES ((__force snd_ctl_elem_type_t) 4) /* byte array */ ++#define SNDRV_CTL_ELEM_TYPE_IEC958 ((__force snd_ctl_elem_type_t) 5) /* IEC958 (S/PDIF) setup */ ++#define SNDRV_CTL_ELEM_TYPE_INTEGER64 ((__force snd_ctl_elem_type_t) 6) /* 64-bit integer type */ ++#define SNDRV_CTL_ELEM_TYPE_LAST SNDRV_CTL_ELEM_TYPE_INTEGER64 ++ ++typedef int __bitwise snd_ctl_elem_iface_t; ++#define SNDRV_CTL_ELEM_IFACE_CARD ((__force snd_ctl_elem_iface_t) 0) /* global control */ ++#define SNDRV_CTL_ELEM_IFACE_HWDEP ((__force snd_ctl_elem_iface_t) 1) /* hardware dependent device */ ++#define SNDRV_CTL_ELEM_IFACE_MIXER ((__force snd_ctl_elem_iface_t) 2) /* virtual mixer device */ ++#define SNDRV_CTL_ELEM_IFACE_PCM ((__force snd_ctl_elem_iface_t) 3) /* PCM device */ ++#define SNDRV_CTL_ELEM_IFACE_RAWMIDI ((__force snd_ctl_elem_iface_t) 4) /* RawMidi device */ ++#define SNDRV_CTL_ELEM_IFACE_TIMER ((__force snd_ctl_elem_iface_t) 5) /* timer device */ ++#define SNDRV_CTL_ELEM_IFACE_SEQUENCER ((__force snd_ctl_elem_iface_t) 6) /* sequencer client */ ++#define SNDRV_CTL_ELEM_IFACE_LAST SNDRV_CTL_ELEM_IFACE_SEQUENCER ++ ++#define SNDRV_CTL_ELEM_ACCESS_READ (1<<0) ++#define SNDRV_CTL_ELEM_ACCESS_WRITE (1<<1) ++#define SNDRV_CTL_ELEM_ACCESS_READWRITE (SNDRV_CTL_ELEM_ACCESS_READ|SNDRV_CTL_ELEM_ACCESS_WRITE) ++#define SNDRV_CTL_ELEM_ACCESS_VOLATILE (1<<2) /* control value may be changed without a notification */ ++#define SNDRV_CTL_ELEM_ACCESS_TIMESTAMP (1<<3) /* when was control changed */ ++#define SNDRV_CTL_ELEM_ACCESS_TLV_READ (1<<4) /* TLV read is possible */ ++#define SNDRV_CTL_ELEM_ACCESS_TLV_WRITE (1<<5) /* TLV write is possible */ ++#define SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE (SNDRV_CTL_ELEM_ACCESS_TLV_READ|SNDRV_CTL_ELEM_ACCESS_TLV_WRITE) ++#define SNDRV_CTL_ELEM_ACCESS_TLV_COMMAND (1<<6) /* TLV command is possible */ ++#define SNDRV_CTL_ELEM_ACCESS_INACTIVE (1<<8) /* control does actually nothing, but may be updated */ ++#define SNDRV_CTL_ELEM_ACCESS_LOCK (1<<9) /* write lock */ ++#define SNDRV_CTL_ELEM_ACCESS_OWNER (1<<10) /* write lock owner */ ++#define SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK (1<<28) /* kernel use a TLV callback */ ++#define SNDRV_CTL_ELEM_ACCESS_USER (1<<29) /* user space element */ ++/* bits 30 and 31 are obsoleted (for indirect access) */ ++ ++/* for further details see the ACPI and PCI power management specification */ ++#define SNDRV_CTL_POWER_D0 0x0000 /* full On */ ++#define SNDRV_CTL_POWER_D1 0x0100 /* partial On */ ++#define SNDRV_CTL_POWER_D2 0x0200 /* partial On */ ++#define SNDRV_CTL_POWER_D3 0x0300 /* Off */ ++#define SNDRV_CTL_POWER_D3hot (SNDRV_CTL_POWER_D3|0x0000) /* Off, with power */ ++#define SNDRV_CTL_POWER_D3cold (SNDRV_CTL_POWER_D3|0x0001) /* Off, without power */ ++ ++#define SNDRV_CTL_ELEM_ID_NAME_MAXLEN 44 ++ ++struct snd_ctl_elem_id { ++ unsigned int numid; /* numeric identifier, zero = invalid */ ++ snd_ctl_elem_iface_t iface; /* interface identifier */ ++ unsigned int device; /* device/client number */ ++ unsigned int subdevice; /* subdevice (substream) number */ ++ unsigned char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; /* ASCII name of item */ ++ unsigned int index; /* index of item */ ++}; ++ ++struct snd_ctl_elem_list { ++ unsigned int offset; /* W: first element ID to get */ ++ unsigned int space; /* W: count of element IDs to get */ ++ unsigned int used; /* R: count of element IDs set */ ++ unsigned int count; /* R: count of all elements */ ++ struct snd_ctl_elem_id __user *pids; /* R: IDs */ ++ unsigned char reserved[50]; ++}; ++ ++struct snd_ctl_elem_info { ++ struct snd_ctl_elem_id id; /* W: element ID */ ++ snd_ctl_elem_type_t type; /* R: value type - SNDRV_CTL_ELEM_TYPE_* */ ++ unsigned int access; /* R: value access (bitmask) - SNDRV_CTL_ELEM_ACCESS_* */ ++ unsigned int count; /* count of values */ ++ __kernel_pid_t owner; /* owner's PID of this control */ ++ union { ++ struct { ++ long min; /* R: minimum value */ ++ long max; /* R: maximum value */ ++ long step; /* R: step (0 variable) */ ++ } integer; ++ struct { ++ long long min; /* R: minimum value */ ++ long long max; /* R: maximum value */ ++ long long step; /* R: step (0 variable) */ ++ } integer64; ++ struct { ++ unsigned int items; /* R: number of items */ ++ unsigned int item; /* W: item number */ ++ char name[64]; /* R: value name */ ++ __u64 names_ptr; /* W: names list (ELEM_ADD only) */ ++ unsigned int names_length; ++ } enumerated; ++ unsigned char reserved[128]; ++ } value; ++ union { ++ unsigned short d[4]; /* dimensions */ ++ unsigned short *d_ptr; /* indirect - obsoleted */ ++ } dimen; ++ unsigned char reserved[64-4*sizeof(unsigned short)]; ++}; ++ ++struct snd_ctl_elem_value { ++ struct snd_ctl_elem_id id; /* W: element ID */ ++ unsigned int indirect: 1; /* W: indirect access - obsoleted */ ++ union { ++ union { ++ long value[128]; ++ long *value_ptr; /* obsoleted */ ++ } integer; ++ union { ++ long long value[64]; ++ long long *value_ptr; /* obsoleted */ ++ } integer64; ++ union { ++ unsigned int item[128]; ++ unsigned int *item_ptr; /* obsoleted */ ++ } enumerated; ++ union { ++ unsigned char data[512]; ++ unsigned char *data_ptr; /* obsoleted */ ++ } bytes; ++ struct snd_aes_iec958 iec958; ++ } value; /* RO */ ++ struct timespec tstamp; ++ unsigned char reserved[128-sizeof(struct timespec)]; ++}; ++ ++struct snd_ctl_tlv { ++ unsigned int numid; /* control element numeric identification */ ++ unsigned int length; /* in bytes aligned to 4 */ ++ unsigned int tlv[0]; /* first TLV */ ++}; ++ ++#define SNDRV_CTL_IOCTL_PVERSION _IOR('U', 0x00, int) ++#define SNDRV_CTL_IOCTL_CARD_INFO _IOR('U', 0x01, struct snd_ctl_card_info) ++#define SNDRV_CTL_IOCTL_ELEM_LIST _IOWR('U', 0x10, struct snd_ctl_elem_list) ++#define SNDRV_CTL_IOCTL_ELEM_INFO _IOWR('U', 0x11, struct snd_ctl_elem_info) ++#define SNDRV_CTL_IOCTL_ELEM_READ _IOWR('U', 0x12, struct snd_ctl_elem_value) ++#define SNDRV_CTL_IOCTL_ELEM_WRITE _IOWR('U', 0x13, struct snd_ctl_elem_value) ++#define SNDRV_CTL_IOCTL_ELEM_LOCK _IOW('U', 0x14, struct snd_ctl_elem_id) ++#define SNDRV_CTL_IOCTL_ELEM_UNLOCK _IOW('U', 0x15, struct snd_ctl_elem_id) ++#define SNDRV_CTL_IOCTL_SUBSCRIBE_EVENTS _IOWR('U', 0x16, int) ++#define SNDRV_CTL_IOCTL_ELEM_ADD _IOWR('U', 0x17, struct snd_ctl_elem_info) ++#define SNDRV_CTL_IOCTL_ELEM_REPLACE _IOWR('U', 0x18, struct snd_ctl_elem_info) ++#define SNDRV_CTL_IOCTL_ELEM_REMOVE _IOWR('U', 0x19, struct snd_ctl_elem_id) ++#define SNDRV_CTL_IOCTL_TLV_READ _IOWR('U', 0x1a, struct snd_ctl_tlv) ++#define SNDRV_CTL_IOCTL_TLV_WRITE _IOWR('U', 0x1b, struct snd_ctl_tlv) ++#define SNDRV_CTL_IOCTL_TLV_COMMAND _IOWR('U', 0x1c, struct snd_ctl_tlv) ++#define SNDRV_CTL_IOCTL_HWDEP_NEXT_DEVICE _IOWR('U', 0x20, int) ++#define SNDRV_CTL_IOCTL_HWDEP_INFO _IOR('U', 0x21, struct snd_hwdep_info) ++#define SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE _IOR('U', 0x30, int) ++#define SNDRV_CTL_IOCTL_PCM_INFO _IOWR('U', 0x31, struct snd_pcm_info) ++#define SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE _IOW('U', 0x32, int) ++#define SNDRV_CTL_IOCTL_RAWMIDI_NEXT_DEVICE _IOWR('U', 0x40, int) ++#define SNDRV_CTL_IOCTL_RAWMIDI_INFO _IOWR('U', 0x41, struct snd_rawmidi_info) ++#define SNDRV_CTL_IOCTL_RAWMIDI_PREFER_SUBDEVICE _IOW('U', 0x42, int) ++#define SNDRV_CTL_IOCTL_POWER _IOWR('U', 0xd0, int) ++#define SNDRV_CTL_IOCTL_POWER_STATE _IOR('U', 0xd1, int) ++ ++/* ++ * Read interface. ++ */ ++ ++enum sndrv_ctl_event_type { ++ SNDRV_CTL_EVENT_ELEM = 0, ++ SNDRV_CTL_EVENT_LAST = SNDRV_CTL_EVENT_ELEM, ++}; ++ ++#define SNDRV_CTL_EVENT_MASK_VALUE (1<<0) /* element value was changed */ ++#define SNDRV_CTL_EVENT_MASK_INFO (1<<1) /* element info was changed */ ++#define SNDRV_CTL_EVENT_MASK_ADD (1<<2) /* element was added */ ++#define SNDRV_CTL_EVENT_MASK_TLV (1<<3) /* element TLV tree was changed */ ++#define SNDRV_CTL_EVENT_MASK_REMOVE (~0U) /* element was removed */ ++ ++struct snd_ctl_event { ++ int type; /* event type - SNDRV_CTL_EVENT_* */ ++ union { ++ struct { ++ unsigned int mask; ++ struct snd_ctl_elem_id id; ++ } elem; ++ unsigned char data8[60]; ++ } data; ++}; ++ ++/* ++ * Control names ++ */ ++ ++#define SNDRV_CTL_NAME_NONE "" ++#define SNDRV_CTL_NAME_PLAYBACK "Playback " ++#define SNDRV_CTL_NAME_CAPTURE "Capture " ++ ++#define SNDRV_CTL_NAME_IEC958_NONE "" ++#define SNDRV_CTL_NAME_IEC958_SWITCH "Switch" ++#define SNDRV_CTL_NAME_IEC958_VOLUME "Volume" ++#define SNDRV_CTL_NAME_IEC958_DEFAULT "Default" ++#define SNDRV_CTL_NAME_IEC958_MASK "Mask" ++#define SNDRV_CTL_NAME_IEC958_CON_MASK "Con Mask" ++#define SNDRV_CTL_NAME_IEC958_PRO_MASK "Pro Mask" ++#define SNDRV_CTL_NAME_IEC958_PCM_STREAM "PCM Stream" ++#define SNDRV_CTL_NAME_IEC958(expl,direction,what) "IEC958 " expl SNDRV_CTL_NAME_##direction SNDRV_CTL_NAME_IEC958_##what ++ ++#endif /* _UAPI__SOUND_ASOUND_H */ +diff --git a/include/sound/uapi/asound_fm.h b/include/sound/uapi/asound_fm.h +new file mode 100644 +index 00000000..8471f404 +--- /dev/null ++++ b/include/sound/uapi/asound_fm.h +@@ -0,0 +1,135 @@ ++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ ++#ifndef __SOUND_ASOUND_FM_H ++#define __SOUND_ASOUND_FM_H ++ ++/* ++ * Advanced Linux Sound Architecture - ALSA ++ * ++ * Interface file between ALSA driver & user space ++ * Copyright (c) 1994-98 by Jaroslav Kysela <perex@perex.cz>, ++ * 4Front Technologies ++ * ++ * Direct FM control ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++#define SNDRV_DM_FM_MODE_OPL2 0x00 ++#define SNDRV_DM_FM_MODE_OPL3 0x01 ++ ++struct snd_dm_fm_info { ++ unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */ ++ unsigned char rhythm; /* percussion mode flag */ ++}; ++ ++/* ++ * Data structure composing an FM "note" or sound event. ++ */ ++ ++struct snd_dm_fm_voice { ++ unsigned char op; /* operator cell (0 or 1) */ ++ unsigned char voice; /* FM voice (0 to 17) */ ++ ++ unsigned char am; /* amplitude modulation */ ++ unsigned char vibrato; /* vibrato effect */ ++ unsigned char do_sustain; /* sustain phase */ ++ unsigned char kbd_scale; /* keyboard scaling */ ++ unsigned char harmonic; /* 4 bits: harmonic and multiplier */ ++ unsigned char scale_level; /* 2 bits: decrease output freq rises */ ++ unsigned char volume; /* 6 bits: volume */ ++ ++ unsigned char attack; /* 4 bits: attack rate */ ++ unsigned char decay; /* 4 bits: decay rate */ ++ unsigned char sustain; /* 4 bits: sustain level */ ++ unsigned char release; /* 4 bits: release rate */ ++ ++ unsigned char feedback; /* 3 bits: feedback for op0 */ ++ unsigned char connection; /* 0 for serial, 1 for parallel */ ++ unsigned char left; /* stereo left */ ++ unsigned char right; /* stereo right */ ++ unsigned char waveform; /* 3 bits: waveform shape */ ++}; ++ ++/* ++ * This describes an FM note by its voice, octave, frequency number (10bit) ++ * and key on/off. ++ */ ++ ++struct snd_dm_fm_note { ++ unsigned char voice; /* 0-17 voice channel */ ++ unsigned char octave; /* 3 bits: what octave to play */ ++ unsigned int fnum; /* 10 bits: frequency number */ ++ unsigned char key_on; /* set for active, clear for silent */ ++}; ++ ++/* ++ * FM parameters that apply globally to all voices, and thus are not "notes" ++ */ ++ ++struct snd_dm_fm_params { ++ unsigned char am_depth; /* amplitude modulation depth (1=hi) */ ++ unsigned char vib_depth; /* vibrato depth (1=hi) */ ++ unsigned char kbd_split; /* keyboard split */ ++ unsigned char rhythm; /* percussion mode select */ ++ ++ /* This block is the percussion instrument data */ ++ unsigned char bass; ++ unsigned char snare; ++ unsigned char tomtom; ++ unsigned char cymbal; ++ unsigned char hihat; ++}; ++ ++/* ++ * FM mode ioctl settings ++ */ ++ ++#define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info) ++#define SNDRV_DM_FM_IOCTL_RESET _IO ('H', 0x21) ++#define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note) ++#define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice) ++#define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params) ++#define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int) ++/* for OPL3 only */ ++#define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int) ++/* SBI patch management */ ++#define SNDRV_DM_FM_IOCTL_CLEAR_PATCHES _IO ('H', 0x40) ++ ++#define SNDRV_DM_FM_OSS_IOCTL_RESET 0x20 ++#define SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE 0x21 ++#define SNDRV_DM_FM_OSS_IOCTL_SET_VOICE 0x22 ++#define SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS 0x23 ++#define SNDRV_DM_FM_OSS_IOCTL_SET_MODE 0x24 ++#define SNDRV_DM_FM_OSS_IOCTL_SET_OPL 0x25 ++ ++/* ++ * Patch Record - fixed size for write ++ */ ++ ++#define FM_KEY_SBI "SBI\032" ++#define FM_KEY_2OP "2OP\032" ++#define FM_KEY_4OP "4OP\032" ++ ++struct sbi_patch { ++ unsigned char prog; ++ unsigned char bank; ++ char key[4]; ++ char name[25]; ++ char extension[7]; ++ unsigned char data[32]; ++}; ++ ++#endif /* __SOUND_ASOUND_FM_H */ +diff --git a/include/sound/uapi/emu10k1.h b/include/sound/uapi/emu10k1.h +new file mode 100644 +index 00000000..c1150e4d +--- /dev/null ++++ b/include/sound/uapi/emu10k1.h +@@ -0,0 +1,395 @@ ++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ ++/* ++ * Copyright (c) by Jaroslav Kysela <perex@perex.cz>, ++ * Creative Labs, Inc. ++ * Definitions for EMU10K1 (SB Live!) chips ++ * ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++#ifndef _UAPI__SOUND_EMU10K1_H ++#define _UAPI__SOUND_EMU10K1_H ++ ++/* ++ * ---- FX8010 ---- ++ */ ++ ++#define EMU10K1_CARD_CREATIVE 0x00000000 ++#define EMU10K1_CARD_EMUAPS 0x00000001 ++ ++#define EMU10K1_FX8010_PCM_COUNT 8 ++ ++/* ++ * Following definition is copied from linux/types.h to support compiling ++ * this header file in userspace since they are not generally available for ++ * uapi headers. ++ */ ++#define __EMU10K1_DECLARE_BITMAP(name,bits) \ ++ unsigned long name[(bits) / (sizeof(unsigned long) * 8)] ++ ++/* instruction set */ ++#define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */ ++#define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */ ++#define iMAC2 0x02 /* R = A + (X * Y >> 31) ; wraparound */ ++#define iMAC3 0x03 /* R = A + (-X * Y >> 31) ; wraparound */ ++#define iMACINT0 0x04 /* R = A + X * Y ; saturation */ ++#define iMACINT1 0x05 /* R = A + X * Y ; wraparound (31-bit) */ ++#define iACC3 0x06 /* R = A + X + Y ; saturation */ ++#define iMACMV 0x07 /* R = A, acc += X * Y >> 31 */ ++#define iANDXOR 0x08 /* R = (A & X) ^ Y */ ++#define iTSTNEG 0x09 /* R = (A >= Y) ? X : ~X */ ++#define iLIMITGE 0x0a /* R = (A >= Y) ? X : Y */ ++#define iLIMITLT 0x0b /* R = (A < Y) ? X : Y */ ++#define iLOG 0x0c /* R = linear_data, A (log_data), X (max_exp), Y (format_word) */ ++#define iEXP 0x0d /* R = log_data, A (linear_data), X (max_exp), Y (format_word) */ ++#define iINTERP 0x0e /* R = A + (X * (Y - A) >> 31) ; saturation */ ++#define iSKIP 0x0f /* R = A (cc_reg), X (count), Y (cc_test) */ ++ ++/* GPRs */ ++#define FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x0f */ ++#define EXTIN(x) (0x10 + (x)) /* x = 0x00 - 0x0f */ ++#define EXTOUT(x) (0x20 + (x)) /* x = 0x00 - 0x0f physical outs -> FXWC low 16 bits */ ++#define FXBUS2(x) (0x30 + (x)) /* x = 0x00 - 0x0f copies of fx buses for capture -> FXWC high 16 bits */ ++ /* NB: 0x31 and 0x32 are shared with Center/LFE on SB live 5.1 */ ++ ++#define C_00000000 0x40 ++#define C_00000001 0x41 ++#define C_00000002 0x42 ++#define C_00000003 0x43 ++#define C_00000004 0x44 ++#define C_00000008 0x45 ++#define C_00000010 0x46 ++#define C_00000020 0x47 ++#define C_00000100 0x48 ++#define C_00010000 0x49 ++#define C_00080000 0x4a ++#define C_10000000 0x4b ++#define C_20000000 0x4c ++#define C_40000000 0x4d ++#define C_80000000 0x4e ++#define C_7fffffff 0x4f ++#define C_ffffffff 0x50 ++#define C_fffffffe 0x51 ++#define C_c0000000 0x52 ++#define C_4f1bbcdc 0x53 ++#define C_5a7ef9db 0x54 ++#define C_00100000 0x55 /* ?? */ ++#define GPR_ACCU 0x56 /* ACCUM, accumulator */ ++#define GPR_COND 0x57 /* CCR, condition register */ ++#define GPR_NOISE0 0x58 /* noise source */ ++#define GPR_NOISE1 0x59 /* noise source */ ++#define GPR_IRQ 0x5a /* IRQ register */ ++#define GPR_DBAC 0x5b /* TRAM Delay Base Address Counter */ ++#define GPR(x) (FXGPREGBASE + (x)) /* free GPRs: x = 0x00 - 0xff */ ++#define ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ ++#define ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ ++#define ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0x7f */ ++#define ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x80 + (x)) /* x = 0x00 - 0x1f */ ++ ++#define A_ITRAM_DATA(x) (TANKMEMDATAREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ ++#define A_ETRAM_DATA(x) (TANKMEMDATAREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ ++#define A_ITRAM_ADDR(x) (TANKMEMADDRREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ ++#define A_ETRAM_ADDR(x) (TANKMEMADDRREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ ++#define A_ITRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0x00 + (x)) /* x = 0x00 - 0xbf */ ++#define A_ETRAM_CTL(x) (A_TANKMEMCTLREGBASE + 0xc0 + (x)) /* x = 0x00 - 0x3f */ ++ ++#define A_FXBUS(x) (0x00 + (x)) /* x = 0x00 - 0x3f FX buses */ ++#define A_EXTIN(x) (0x40 + (x)) /* x = 0x00 - 0x0f physical ins */ ++#define A_P16VIN(x) (0x50 + (x)) /* x = 0x00 - 0x0f p16v ins (A2 only) "EMU32 inputs" */ ++#define A_EXTOUT(x) (0x60 + (x)) /* x = 0x00 - 0x1f physical outs -> A_FXWC1 0x79-7f unknown */ ++#define A_FXBUS2(x) (0x80 + (x)) /* x = 0x00 - 0x1f extra outs used for EFX capture -> A_FXWC2 */ ++#define A_EMU32OUTH(x) (0xa0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_10 - _1F" - ??? */ ++#define A_EMU32OUTL(x) (0xb0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_1 - _F" - ??? */ ++#define A3_EMU32IN(x) (0x160 + (x)) /* x = 0x00 - 0x3f "EMU32_IN_00 - _3F" - Only when .device = 0x0008 */ ++#define A3_EMU32OUT(x) (0x1E0 + (x)) /* x = 0x00 - 0x0f "EMU32_OUT_00 - _3F" - Only when .device = 0x0008 */ ++#define A_GPR(x) (A_FXGPREGBASE + (x)) ++ ++/* cc_reg constants */ ++#define CC_REG_NORMALIZED C_00000001 ++#define CC_REG_BORROW C_00000002 ++#define CC_REG_MINUS C_00000004 ++#define CC_REG_ZERO C_00000008 ++#define CC_REG_SATURATE C_00000010 ++#define CC_REG_NONZERO C_00000100 ++ ++/* FX buses */ ++#define FXBUS_PCM_LEFT 0x00 ++#define FXBUS_PCM_RIGHT 0x01 ++#define FXBUS_PCM_LEFT_REAR 0x02 ++#define FXBUS_PCM_RIGHT_REAR 0x03 ++#define FXBUS_MIDI_LEFT 0x04 ++#define FXBUS_MIDI_RIGHT 0x05 ++#define FXBUS_PCM_CENTER 0x06 ++#define FXBUS_PCM_LFE 0x07 ++#define FXBUS_PCM_LEFT_FRONT 0x08 ++#define FXBUS_PCM_RIGHT_FRONT 0x09 ++#define FXBUS_MIDI_REVERB 0x0c ++#define FXBUS_MIDI_CHORUS 0x0d ++#define FXBUS_PCM_LEFT_SIDE 0x0e ++#define FXBUS_PCM_RIGHT_SIDE 0x0f ++#define FXBUS_PT_LEFT 0x14 ++#define FXBUS_PT_RIGHT 0x15 ++ ++/* Inputs */ ++#define EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */ ++#define EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */ ++#define EXTIN_SPDIF_CD_L 0x02 /* internal S/PDIF CD - onboard - left */ ++#define EXTIN_SPDIF_CD_R 0x03 /* internal S/PDIF CD - onboard - right */ ++#define EXTIN_ZOOM_L 0x04 /* Zoom Video I2S - left */ ++#define EXTIN_ZOOM_R 0x05 /* Zoom Video I2S - right */ ++#define EXTIN_TOSLINK_L 0x06 /* LiveDrive - TOSLink Optical - left */ ++#define EXTIN_TOSLINK_R 0x07 /* LiveDrive - TOSLink Optical - right */ ++#define EXTIN_LINE1_L 0x08 /* LiveDrive - Line/Mic 1 - left */ ++#define EXTIN_LINE1_R 0x09 /* LiveDrive - Line/Mic 1 - right */ ++#define EXTIN_COAX_SPDIF_L 0x0a /* LiveDrive - Coaxial S/PDIF - left */ ++#define EXTIN_COAX_SPDIF_R 0x0b /* LiveDrive - Coaxial S/PDIF - right */ ++#define EXTIN_LINE2_L 0x0c /* LiveDrive - Line/Mic 2 - left */ ++#define EXTIN_LINE2_R 0x0d /* LiveDrive - Line/Mic 2 - right */ ++ ++/* Outputs */ ++#define EXTOUT_AC97_L 0x00 /* AC'97 playback channel - left */ ++#define EXTOUT_AC97_R 0x01 /* AC'97 playback channel - right */ ++#define EXTOUT_TOSLINK_L 0x02 /* LiveDrive - TOSLink Optical - left */ ++#define EXTOUT_TOSLINK_R 0x03 /* LiveDrive - TOSLink Optical - right */ ++#define EXTOUT_AC97_CENTER 0x04 /* SB Live 5.1 - center */ ++#define EXTOUT_AC97_LFE 0x05 /* SB Live 5.1 - LFE */ ++#define EXTOUT_HEADPHONE_L 0x06 /* LiveDrive - Headphone - left */ ++#define EXTOUT_HEADPHONE_R 0x07 /* LiveDrive - Headphone - right */ ++#define EXTOUT_REAR_L 0x08 /* Rear channel - left */ ++#define EXTOUT_REAR_R 0x09 /* Rear channel - right */ ++#define EXTOUT_ADC_CAP_L 0x0a /* ADC Capture buffer - left */ ++#define EXTOUT_ADC_CAP_R 0x0b /* ADC Capture buffer - right */ ++#define EXTOUT_MIC_CAP 0x0c /* MIC Capture buffer */ ++#define EXTOUT_AC97_REAR_L 0x0d /* SB Live 5.1 (c) 2003 - Rear Left */ ++#define EXTOUT_AC97_REAR_R 0x0e /* SB Live 5.1 (c) 2003 - Rear Right */ ++#define EXTOUT_ACENTER 0x11 /* Analog Center */ ++#define EXTOUT_ALFE 0x12 /* Analog LFE */ ++ ++/* Audigy Inputs */ ++#define A_EXTIN_AC97_L 0x00 /* AC'97 capture channel - left */ ++#define A_EXTIN_AC97_R 0x01 /* AC'97 capture channel - right */ ++#define A_EXTIN_SPDIF_CD_L 0x02 /* digital CD left */ ++#define A_EXTIN_SPDIF_CD_R 0x03 /* digital CD left */ ++#define A_EXTIN_OPT_SPDIF_L 0x04 /* audigy drive Optical SPDIF - left */ ++#define A_EXTIN_OPT_SPDIF_R 0x05 /* right */ ++#define A_EXTIN_LINE2_L 0x08 /* audigy drive line2/mic2 - left */ ++#define A_EXTIN_LINE2_R 0x09 /* right */ ++#define A_EXTIN_ADC_L 0x0a /* Philips ADC - left */ ++#define A_EXTIN_ADC_R 0x0b /* right */ ++#define A_EXTIN_AUX2_L 0x0c /* audigy drive aux2 - left */ ++#define A_EXTIN_AUX2_R 0x0d /* - right */ ++ ++/* Audigiy Outputs */ ++#define A_EXTOUT_FRONT_L 0x00 /* digital front left */ ++#define A_EXTOUT_FRONT_R 0x01 /* right */ ++#define A_EXTOUT_CENTER 0x02 /* digital front center */ ++#define A_EXTOUT_LFE 0x03 /* digital front lfe */ ++#define A_EXTOUT_HEADPHONE_L 0x04 /* headphone audigy drive left */ ++#define A_EXTOUT_HEADPHONE_R 0x05 /* right */ ++#define A_EXTOUT_REAR_L 0x06 /* digital rear left */ ++#define A_EXTOUT_REAR_R 0x07 /* right */ ++#define A_EXTOUT_AFRONT_L 0x08 /* analog front left */ ++#define A_EXTOUT_AFRONT_R 0x09 /* right */ ++#define A_EXTOUT_ACENTER 0x0a /* analog center */ ++#define A_EXTOUT_ALFE 0x0b /* analog LFE */ ++#define A_EXTOUT_ASIDE_L 0x0c /* analog side left - Audigy 2 ZS */ ++#define A_EXTOUT_ASIDE_R 0x0d /* right - Audigy 2 ZS */ ++#define A_EXTOUT_AREAR_L 0x0e /* analog rear left */ ++#define A_EXTOUT_AREAR_R 0x0f /* right */ ++#define A_EXTOUT_AC97_L 0x10 /* AC97 left (front) */ ++#define A_EXTOUT_AC97_R 0x11 /* right */ ++#define A_EXTOUT_ADC_CAP_L 0x16 /* ADC capture buffer left */ ++#define A_EXTOUT_ADC_CAP_R 0x17 /* right */ ++#define A_EXTOUT_MIC_CAP 0x18 /* Mic capture buffer */ ++ ++/* Audigy constants */ ++#define A_C_00000000 0xc0 ++#define A_C_00000001 0xc1 ++#define A_C_00000002 0xc2 ++#define A_C_00000003 0xc3 ++#define A_C_00000004 0xc4 ++#define A_C_00000008 0xc5 ++#define A_C_00000010 0xc6 ++#define A_C_00000020 0xc7 ++#define A_C_00000100 0xc8 ++#define A_C_00010000 0xc9 ++#define A_C_00000800 0xca ++#define A_C_10000000 0xcb ++#define A_C_20000000 0xcc ++#define A_C_40000000 0xcd ++#define A_C_80000000 0xce ++#define A_C_7fffffff 0xcf ++#define A_C_ffffffff 0xd0 ++#define A_C_fffffffe 0xd1 ++#define A_C_c0000000 0xd2 ++#define A_C_4f1bbcdc 0xd3 ++#define A_C_5a7ef9db 0xd4 ++#define A_C_00100000 0xd5 ++#define A_GPR_ACCU 0xd6 /* ACCUM, accumulator */ ++#define A_GPR_COND 0xd7 /* CCR, condition register */ ++#define A_GPR_NOISE0 0xd8 /* noise source */ ++#define A_GPR_NOISE1 0xd9 /* noise source */ ++#define A_GPR_IRQ 0xda /* IRQ register */ ++#define A_GPR_DBAC 0xdb /* TRAM Delay Base Address Counter - internal */ ++#define A_GPR_DBACE 0xde /* TRAM Delay Base Address Counter - external */ ++ ++/* definitions for debug register */ ++#define EMU10K1_DBG_ZC 0x80000000 /* zero tram counter */ ++#define EMU10K1_DBG_SATURATION_OCCURED 0x02000000 /* saturation control */ ++#define EMU10K1_DBG_SATURATION_ADDR 0x01ff0000 /* saturation address */ ++#define EMU10K1_DBG_SINGLE_STEP 0x00008000 /* single step mode */ ++#define EMU10K1_DBG_STEP 0x00004000 /* start single step */ ++#define EMU10K1_DBG_CONDITION_CODE 0x00003e00 /* condition code */ ++#define EMU10K1_DBG_SINGLE_STEP_ADDR 0x000001ff /* single step address */ ++ ++/* tank memory address line */ ++#ifndef __KERNEL__ ++#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */ ++#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */ ++#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */ ++#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */ ++#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */ ++#endif ++ ++struct snd_emu10k1_fx8010_info { ++ unsigned int internal_tram_size; /* in samples */ ++ unsigned int external_tram_size; /* in samples */ ++ char fxbus_names[16][32]; /* names of FXBUSes */ ++ char extin_names[16][32]; /* names of external inputs */ ++ char extout_names[32][32]; /* names of external outputs */ ++ unsigned int gpr_controls; /* count of GPR controls */ ++}; ++ ++#define EMU10K1_GPR_TRANSLATION_NONE 0 ++#define EMU10K1_GPR_TRANSLATION_TABLE100 1 ++#define EMU10K1_GPR_TRANSLATION_BASS 2 ++#define EMU10K1_GPR_TRANSLATION_TREBLE 3 ++#define EMU10K1_GPR_TRANSLATION_ONOFF 4 ++ ++enum emu10k1_ctl_elem_iface { ++ EMU10K1_CTL_ELEM_IFACE_MIXER = 2, /* virtual mixer device */ ++ EMU10K1_CTL_ELEM_IFACE_PCM = 3, /* PCM device */ ++}; ++ ++struct emu10k1_ctl_elem_id { ++ unsigned int pad; /* don't use */ ++ int iface; /* interface identifier */ ++ unsigned int device; /* device/client number */ ++ unsigned int subdevice; /* subdevice (substream) number */ ++ unsigned char name[44]; /* ASCII name of item */ ++ unsigned int index; /* index of item */ ++}; ++ ++struct snd_emu10k1_fx8010_control_gpr { ++ struct emu10k1_ctl_elem_id id; /* full control ID definition */ ++ unsigned int vcount; /* visible count */ ++ unsigned int count; /* count of GPR (1..16) */ ++ unsigned short gpr[32]; /* GPR number(s) */ ++ unsigned int value[32]; /* initial values */ ++ unsigned int min; /* minimum range */ ++ unsigned int max; /* maximum range */ ++ unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ ++ const unsigned int *tlv; ++}; ++ ++/* old ABI without TLV support */ ++struct snd_emu10k1_fx8010_control_old_gpr { ++ struct emu10k1_ctl_elem_id id; ++ unsigned int vcount; ++ unsigned int count; ++ unsigned short gpr[32]; ++ unsigned int value[32]; ++ unsigned int min; ++ unsigned int max; ++ unsigned int translation; ++}; ++ ++struct snd_emu10k1_fx8010_code { ++ char name[128]; ++ ++ __EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ ++ __u32 *gpr_map; /* initializers */ ++ ++ unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ ++ struct snd_emu10k1_fx8010_control_gpr *gpr_add_controls; /* GPR controls to add/replace */ ++ ++ unsigned int gpr_del_control_count; /* count of GPR controls to remove */ ++ struct emu10k1_ctl_elem_id *gpr_del_controls; /* IDs of GPR controls to remove */ ++ ++ unsigned int gpr_list_control_count; /* count of GPR controls to list */ ++ unsigned int gpr_list_control_total; /* total count of GPR controls */ ++ struct snd_emu10k1_fx8010_control_gpr *gpr_list_controls; /* listed GPR controls */ ++ ++ __EMU10K1_DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ ++ __u32 *tram_data_map; /* data initializers */ ++ __u32 *tram_addr_map; /* map initializers */ ++ ++ __EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ ++ __u32 *code; /* one instruction - 64 bits */ ++}; ++ ++struct snd_emu10k1_fx8010_tram { ++ unsigned int address; /* 31.bit == 1 -> external TRAM */ ++ unsigned int size; /* size in samples (4 bytes) */ ++ unsigned int *samples; /* pointer to samples (20-bit) */ ++ /* NULL->clear memory */ ++}; ++ ++struct snd_emu10k1_fx8010_pcm_rec { ++ unsigned int substream; /* substream number */ ++ unsigned int res1; /* reserved */ ++ unsigned int channels; /* 16-bit channels count, zero = remove this substream */ ++ unsigned int tram_start; /* ring buffer position in TRAM (in samples) */ ++ unsigned int buffer_size; /* count of buffered samples */ ++ unsigned short gpr_size; /* GPR containing size of ringbuffer in samples (host) */ ++ unsigned short gpr_ptr; /* GPR containing current pointer in the ring buffer (host = reset, FX8010) */ ++ unsigned short gpr_count; /* GPR containing count of samples between two interrupts (host) */ ++ unsigned short gpr_tmpcount; /* GPR containing current count of samples to interrupt (host = set, FX8010) */ ++ unsigned short gpr_trigger; /* GPR containing trigger (activate) information (host) */ ++ unsigned short gpr_running; /* GPR containing info if PCM is running (FX8010) */ ++ unsigned char pad; /* reserved */ ++ unsigned char etram[32]; /* external TRAM address & data (one per channel) */ ++ unsigned int res2; /* reserved */ ++}; ++ ++#define SNDRV_EMU10K1_VERSION SNDRV_PROTOCOL_VERSION(1, 0, 1) ++ ++#define SNDRV_EMU10K1_IOCTL_INFO _IOR ('H', 0x10, struct snd_emu10k1_fx8010_info) ++#define SNDRV_EMU10K1_IOCTL_CODE_POKE _IOW ('H', 0x11, struct snd_emu10k1_fx8010_code) ++#define SNDRV_EMU10K1_IOCTL_CODE_PEEK _IOWR('H', 0x12, struct snd_emu10k1_fx8010_code) ++#define SNDRV_EMU10K1_IOCTL_TRAM_SETUP _IOW ('H', 0x20, int) ++#define SNDRV_EMU10K1_IOCTL_TRAM_POKE _IOW ('H', 0x21, struct snd_emu10k1_fx8010_tram) ++#define SNDRV_EMU10K1_IOCTL_TRAM_PEEK _IOWR('H', 0x22, struct snd_emu10k1_fx8010_tram) ++#define SNDRV_EMU10K1_IOCTL_PCM_POKE _IOW ('H', 0x30, struct snd_emu10k1_fx8010_pcm_rec) ++#define SNDRV_EMU10K1_IOCTL_PCM_PEEK _IOWR('H', 0x31, struct snd_emu10k1_fx8010_pcm_rec) ++#define SNDRV_EMU10K1_IOCTL_PVERSION _IOR ('H', 0x40, int) ++#define SNDRV_EMU10K1_IOCTL_STOP _IO ('H', 0x80) ++#define SNDRV_EMU10K1_IOCTL_CONTINUE _IO ('H', 0x81) ++#define SNDRV_EMU10K1_IOCTL_ZERO_TRAM_COUNTER _IO ('H', 0x82) ++#define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int) ++#define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int) ++ ++#ifndef __KERNEL__ ++/* typedefs for compatibility to user-space */ ++typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t; ++typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t; ++typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t; ++typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t; ++typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t; ++typedef struct emu10k1_ctl_elem_id emu10k1_ctl_elem_id_t; ++#endif ++ ++#endif /* _UAPI__SOUND_EMU10K1_H */ +diff --git a/include/sound/uapi/hdsp.h b/include/sound/uapi/hdsp.h +new file mode 100644 +index 00000000..88c92a3f +--- /dev/null ++++ b/include/sound/uapi/hdsp.h +@@ -0,0 +1,109 @@ ++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ ++#ifndef __SOUND_HDSP_H ++#define __SOUND_HDSP_H ++ ++/* ++ * Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org) ++ * ++ * 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., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#define HDSP_MATRIX_MIXER_SIZE 2048 ++ ++enum HDSP_IO_Type { ++ Digiface, ++ Multiface, ++ H9652, ++ H9632, ++ RPM, ++ Undefined, ++}; ++ ++struct hdsp_peak_rms { ++ __u32 input_peaks[26]; ++ __u32 playback_peaks[26]; ++ __u32 output_peaks[28]; ++ __u64 input_rms[26]; ++ __u64 playback_rms[26]; ++ /* These are only used for H96xx cards */ ++ __u64 output_rms[26]; ++}; ++ ++#define SNDRV_HDSP_IOCTL_GET_PEAK_RMS _IOR('H', 0x40, struct hdsp_peak_rms) ++ ++struct hdsp_config_info { ++ unsigned char pref_sync_ref; ++ unsigned char wordclock_sync_check; ++ unsigned char spdif_sync_check; ++ unsigned char adatsync_sync_check; ++ unsigned char adat_sync_check[3]; ++ unsigned char spdif_in; ++ unsigned char spdif_out; ++ unsigned char spdif_professional; ++ unsigned char spdif_emphasis; ++ unsigned char spdif_nonaudio; ++ unsigned int spdif_sample_rate; ++ unsigned int system_sample_rate; ++ unsigned int autosync_sample_rate; ++ unsigned char system_clock_mode; ++ unsigned char clock_source; ++ unsigned char autosync_ref; ++ unsigned char line_out; ++ unsigned char passthru; ++ unsigned char da_gain; ++ unsigned char ad_gain; ++ unsigned char phone_gain; ++ unsigned char xlr_breakout_cable; ++ unsigned char analog_extension_board; ++}; ++ ++#define SNDRV_HDSP_IOCTL_GET_CONFIG_INFO _IOR('H', 0x41, struct hdsp_config_info) ++ ++struct hdsp_firmware { ++ void *firmware_data; /* 24413 x 4 bytes */ ++}; ++ ++#define SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE _IOW('H', 0x42, struct hdsp_firmware) ++ ++struct hdsp_version { ++ enum HDSP_IO_Type io_type; ++ unsigned short firmware_rev; ++}; ++ ++#define SNDRV_HDSP_IOCTL_GET_VERSION _IOR('H', 0x43, struct hdsp_version) ++ ++struct hdsp_mixer { ++ unsigned short matrix[HDSP_MATRIX_MIXER_SIZE]; ++}; ++ ++#define SNDRV_HDSP_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdsp_mixer) ++ ++struct hdsp_9632_aeb { ++ int aebi; ++ int aebo; ++}; ++ ++#define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb) ++ ++/* typedefs for compatibility to user-space */ ++typedef enum HDSP_IO_Type HDSP_IO_Type; ++typedef struct hdsp_peak_rms hdsp_peak_rms_t; ++typedef struct hdsp_config_info hdsp_config_info_t; ++typedef struct hdsp_firmware hdsp_firmware_t; ++typedef struct hdsp_version hdsp_version_t; ++typedef struct hdsp_mixer hdsp_mixer_t; ++typedef struct hdsp_9632_aeb hdsp_9632_aeb_t; ++ ++#endif /* __SOUND_HDSP_H */ +diff --git a/include/sound/uapi/hdspm.h b/include/sound/uapi/hdspm.h +new file mode 100644 +index 00000000..2d91f90e +--- /dev/null ++++ b/include/sound/uapi/hdspm.h +@@ -0,0 +1,230 @@ ++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ ++#ifndef __SOUND_HDSPM_H ++#define __SOUND_HDSPM_H ++/* ++ * Copyright (C) 2003 Winfried Ritsch (IEM) ++ * based on hdsp.h from Thomas Charbonnel (thomas@undata.org) ++ * ++ * ++ * 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., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++/* Maximum channels is 64 even on 56Mode you have 64playbacks to matrix */ ++#define HDSPM_MAX_CHANNELS 64 ++ ++enum hdspm_io_type { ++ MADI, ++ MADIface, ++ AIO, ++ AES32, ++ RayDAT ++}; ++ ++enum hdspm_speed { ++ ss, ++ ds, ++ qs ++}; ++ ++/* -------------------- IOCTL Peak/RMS Meters -------------------- */ ++ ++struct hdspm_peak_rms { ++ __u32 input_peaks[64]; ++ __u32 playback_peaks[64]; ++ __u32 output_peaks[64]; ++ ++ __u64 input_rms[64]; ++ __u64 playback_rms[64]; ++ __u64 output_rms[64]; ++ ++ __u8 speed; /* enum {ss, ds, qs} */ ++ int status2; ++}; ++ ++#define SNDRV_HDSPM_IOCTL_GET_PEAK_RMS \ ++ _IOR('H', 0x42, struct hdspm_peak_rms) ++ ++/* ------------ CONFIG block IOCTL ---------------------- */ ++ ++struct hdspm_config { ++ unsigned char pref_sync_ref; ++ unsigned char wordclock_sync_check; ++ unsigned char madi_sync_check; ++ unsigned int system_sample_rate; ++ unsigned int autosync_sample_rate; ++ unsigned char system_clock_mode; ++ unsigned char clock_source; ++ unsigned char autosync_ref; ++ unsigned char line_out; ++ unsigned int passthru; ++ unsigned int analog_out; ++}; ++ ++#define SNDRV_HDSPM_IOCTL_GET_CONFIG \ ++ _IOR('H', 0x41, struct hdspm_config) ++ ++/* ++ * If there's a TCO (TimeCode Option) board installed, ++ * there are further options and status data available. ++ * The hdspm_ltc structure contains the current SMPTE ++ * timecode and some status information and can be ++ * obtained via SNDRV_HDSPM_IOCTL_GET_LTC or in the ++ * hdspm_status struct. ++ */ ++ ++enum hdspm_ltc_format { ++ format_invalid, ++ fps_24, ++ fps_25, ++ fps_2997, ++ fps_30 ++}; ++ ++enum hdspm_ltc_frame { ++ frame_invalid, ++ drop_frame, ++ full_frame ++}; ++ ++enum hdspm_ltc_input_format { ++ ntsc, ++ pal, ++ no_video ++}; ++ ++struct hdspm_ltc { ++ unsigned int ltc; ++ ++ enum hdspm_ltc_format format; ++ enum hdspm_ltc_frame frame; ++ enum hdspm_ltc_input_format input_format; ++}; ++ ++#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc) ++ ++/* ++ * The status data reflects the device's current state ++ * as determined by the card's configuration and ++ * connection status. ++ */ ++ ++enum hdspm_sync { ++ hdspm_sync_no_lock = 0, ++ hdspm_sync_lock = 1, ++ hdspm_sync_sync = 2 ++}; ++ ++enum hdspm_madi_input { ++ hdspm_input_optical = 0, ++ hdspm_input_coax = 1 ++}; ++ ++enum hdspm_madi_channel_format { ++ hdspm_format_ch_64 = 0, ++ hdspm_format_ch_56 = 1 ++}; ++ ++enum hdspm_madi_frame_format { ++ hdspm_frame_48 = 0, ++ hdspm_frame_96 = 1 ++}; ++ ++enum hdspm_syncsource { ++ syncsource_wc = 0, ++ syncsource_madi = 1, ++ syncsource_tco = 2, ++ syncsource_sync = 3, ++ syncsource_none = 4 ++}; ++ ++struct hdspm_status { ++ __u8 card_type; /* enum hdspm_io_type */ ++ enum hdspm_syncsource autosync_source; ++ ++ __u64 card_clock; ++ __u32 master_period; ++ ++ union { ++ struct { ++ __u8 sync_wc; /* enum hdspm_sync */ ++ __u8 sync_madi; /* enum hdspm_sync */ ++ __u8 sync_tco; /* enum hdspm_sync */ ++ __u8 sync_in; /* enum hdspm_sync */ ++ __u8 madi_input; /* enum hdspm_madi_input */ ++ __u8 channel_format; /* enum hdspm_madi_channel_format */ ++ __u8 frame_format; /* enum hdspm_madi_frame_format */ ++ } madi; ++ } card_specific; ++}; ++ ++#define SNDRV_HDSPM_IOCTL_GET_STATUS \ ++ _IOR('H', 0x47, struct hdspm_status) ++ ++/* ++ * Get information about the card and its add-ons. ++ */ ++ ++#define HDSPM_ADDON_TCO 1 ++ ++struct hdspm_version { ++ __u8 card_type; /* enum hdspm_io_type */ ++ char cardname[20]; ++ unsigned int serial; ++ unsigned short firmware_rev; ++ int addons; ++}; ++ ++#define SNDRV_HDSPM_IOCTL_GET_VERSION _IOR('H', 0x48, struct hdspm_version) ++ ++/* ------------- get Matrix Mixer IOCTL --------------- */ ++ ++/* MADI mixer: 64inputs+64playback in 64outputs = 8192 => *4Byte = ++ * 32768 Bytes ++ */ ++ ++/* organisation is 64 channelfader in a continuous memory block */ ++/* equivalent to hardware definition, maybe for future feature of mmap of ++ * them ++ */ ++/* each of 64 outputs has 64 infader and 64 outfader: ++ Ins to Outs mixer[out].in[in], Outstreams to Outs mixer[out].pb[pb] */ ++ ++#define HDSPM_MIXER_CHANNELS HDSPM_MAX_CHANNELS ++ ++struct hdspm_channelfader { ++ unsigned int in[HDSPM_MIXER_CHANNELS]; ++ unsigned int pb[HDSPM_MIXER_CHANNELS]; ++}; ++ ++struct hdspm_mixer { ++ struct hdspm_channelfader ch[HDSPM_MIXER_CHANNELS]; ++}; ++ ++struct hdspm_mixer_ioctl { ++ struct hdspm_mixer *mixer; ++}; ++ ++/* use indirect access due to the limit of ioctl bit size */ ++#define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl) ++ ++/* typedefs for compatibility to user-space */ ++typedef struct hdspm_peak_rms hdspm_peak_rms_t; ++typedef struct hdspm_config_info hdspm_config_info_t; ++typedef struct hdspm_version hdspm_version_t; ++typedef struct hdspm_channelfader snd_hdspm_channelfader_t; ++typedef struct hdspm_mixer hdspm_mixer_t; ++ ++ ++#endif +diff --git a/include/sound/uapi/sb16_csp.h b/include/sound/uapi/sb16_csp.h +new file mode 100644 +index 00000000..e6485148 +--- /dev/null ++++ b/include/sound/uapi/sb16_csp.h +@@ -0,0 +1,123 @@ ++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ ++/* ++ * Copyright (c) 1999 by Uros Bizjak <uros@kss-loka.si> ++ * Takashi Iwai <tiwai@suse.de> ++ * ++ * SB16ASP/AWE32 CSP control ++ * ++ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++#ifndef _UAPI__SOUND_SB16_CSP_H ++#define _UAPI__SOUND_SB16_CSP_H ++ ++ ++/* CSP modes */ ++#define SNDRV_SB_CSP_MODE_NONE 0x00 ++#define SNDRV_SB_CSP_MODE_DSP_READ 0x01 /* Record from DSP */ ++#define SNDRV_SB_CSP_MODE_DSP_WRITE 0x02 /* Play to DSP */ ++#define SNDRV_SB_CSP_MODE_QSOUND 0x04 /* QSound */ ++ ++/* CSP load flags */ ++#define SNDRV_SB_CSP_LOAD_FROMUSER 0x01 ++#define SNDRV_SB_CSP_LOAD_INITBLOCK 0x02 ++ ++/* CSP sample width */ ++#define SNDRV_SB_CSP_SAMPLE_8BIT 0x01 ++#define SNDRV_SB_CSP_SAMPLE_16BIT 0x02 ++ ++/* CSP channels */ ++#define SNDRV_SB_CSP_MONO 0x01 ++#define SNDRV_SB_CSP_STEREO 0x02 ++ ++/* CSP rates */ ++#define SNDRV_SB_CSP_RATE_8000 0x01 ++#define SNDRV_SB_CSP_RATE_11025 0x02 ++#define SNDRV_SB_CSP_RATE_22050 0x04 ++#define SNDRV_SB_CSP_RATE_44100 0x08 ++#define SNDRV_SB_CSP_RATE_ALL 0x0f ++ ++/* CSP running state */ ++#define SNDRV_SB_CSP_ST_IDLE 0x00 ++#define SNDRV_SB_CSP_ST_LOADED 0x01 ++#define SNDRV_SB_CSP_ST_RUNNING 0x02 ++#define SNDRV_SB_CSP_ST_PAUSED 0x04 ++#define SNDRV_SB_CSP_ST_AUTO 0x08 ++#define SNDRV_SB_CSP_ST_QSOUND 0x10 ++ ++/* maximum QSound value (180 degrees right) */ ++#define SNDRV_SB_CSP_QSOUND_MAX_RIGHT 0x20 ++ ++/* maximum microcode RIFF file size */ ++#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000 ++ ++/* microcode header */ ++struct snd_sb_csp_mc_header { ++ char codec_name[16]; /* id name of codec */ ++ unsigned short func_req; /* requested function */ ++}; ++ ++/* microcode to be loaded */ ++struct snd_sb_csp_microcode { ++ struct snd_sb_csp_mc_header info; ++ unsigned char data[SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE]; ++}; ++ ++/* start CSP with sample_width in mono/stereo */ ++struct snd_sb_csp_start { ++ int sample_width; /* sample width, look above */ ++ int channels; /* channels, look above */ ++}; ++ ++/* CSP information */ ++struct snd_sb_csp_info { ++ char codec_name[16]; /* id name of codec */ ++ unsigned short func_nr; /* function number */ ++ unsigned int acc_format; /* accepted PCM formats */ ++ unsigned short acc_channels; /* accepted channels */ ++ unsigned short acc_width; /* accepted sample width */ ++ unsigned short acc_rates; /* accepted sample rates */ ++ unsigned short csp_mode; /* CSP mode, see above */ ++ unsigned short run_channels; /* current channels */ ++ unsigned short run_width; /* current sample width */ ++ unsigned short version; /* version id: 0x10 - 0x1f */ ++ unsigned short state; /* state bits */ ++}; ++ ++/* HWDEP controls */ ++/* get CSP information */ ++#define SNDRV_SB_CSP_IOCTL_INFO _IOR('H', 0x10, struct snd_sb_csp_info) ++/* load microcode to CSP */ ++/* NOTE: struct snd_sb_csp_microcode overflows the max size (13 bits) ++ * defined for some architectures like MIPS, and it leads to build errors. ++ * (x86 and co have 14-bit size, thus it's valid, though.) ++ * As a workaround for skipping the size-limit check, here we don't use the ++ * normal _IOW() macro but _IOC() with the manual argument. ++ */ ++#define SNDRV_SB_CSP_IOCTL_LOAD_CODE \ ++ _IOC(_IOC_WRITE, 'H', 0x11, sizeof(struct snd_sb_csp_microcode)) ++/* unload microcode from CSP */ ++#define SNDRV_SB_CSP_IOCTL_UNLOAD_CODE _IO('H', 0x12) ++/* start CSP */ ++#define SNDRV_SB_CSP_IOCTL_START _IOW('H', 0x13, struct snd_sb_csp_start) ++/* stop CSP */ ++#define SNDRV_SB_CSP_IOCTL_STOP _IO('H', 0x14) ++/* pause CSP and DMA transfer */ ++#define SNDRV_SB_CSP_IOCTL_PAUSE _IO('H', 0x15) ++/* restart CSP and DMA transfer */ ++#define SNDRV_SB_CSP_IOCTL_RESTART _IO('H', 0x16) ++ ++ ++#endif /* _UAPI__SOUND_SB16_CSP_H */ +diff --git a/include/sound/uapi/sscape_ioctl.h b/include/sound/uapi/sscape_ioctl.h +new file mode 100644 +index 00000000..c6653ebf +--- /dev/null ++++ b/include/sound/uapi/sscape_ioctl.h +@@ -0,0 +1,21 @@ ++#ifndef SSCAPE_IOCTL_H ++#define SSCAPE_IOCTL_H ++ ++ ++struct sscape_bootblock ++{ ++ unsigned char code[256]; ++ unsigned version; ++}; ++ ++#define SSCAPE_MICROCODE_SIZE 65536 ++ ++struct sscape_microcode ++{ ++ unsigned char *code; ++}; ++ ++#define SND_SSCAPE_LOAD_BOOTB _IOWR('P', 100, struct sscape_bootblock) ++#define SND_SSCAPE_LOAD_MCODE _IOW ('P', 101, struct sscape_microcode) ++ ++#endif +diff --git a/include/sound/uapi/tlv.h b/include/sound/uapi/tlv.h +new file mode 100644 +index 00000000..7d6d65f6 +--- /dev/null ++++ b/include/sound/uapi/tlv.h +@@ -0,0 +1,117 @@ ++/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ ++/* ++ * 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. ++ */ ++ ++#ifndef __UAPI_SOUND_TLV_H ++#define __UAPI_SOUND_TLV_H ++ ++#define SNDRV_CTL_TLVT_CONTAINER 0 /* one level down - group of TLVs */ ++#define SNDRV_CTL_TLVT_DB_SCALE 1 /* dB scale */ ++#define SNDRV_CTL_TLVT_DB_LINEAR 2 /* linear volume */ ++#define SNDRV_CTL_TLVT_DB_RANGE 3 /* dB range container */ ++#define SNDRV_CTL_TLVT_DB_MINMAX 4 /* dB scale with min/max */ ++#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5 /* dB scale with min/max with mute */ ++ ++/* ++ * channel-mapping TLV items ++ * TLV length must match with num_channels ++ */ ++#define SNDRV_CTL_TLVT_CHMAP_FIXED 0x101 /* fixed channel position */ ++#define SNDRV_CTL_TLVT_CHMAP_VAR 0x102 /* channels freely swappable */ ++#define SNDRV_CTL_TLVT_CHMAP_PAIRED 0x103 /* pair-wise swappable */ ++ ++/* ++ * TLV structure is right behind the struct snd_ctl_tlv: ++ * unsigned int type - see SNDRV_CTL_TLVT_* ++ * unsigned int length ++ * .... data aligned to sizeof(unsigned int), use ++ * block_length = (length + (sizeof(unsigned int) - 1)) & ++ * ~(sizeof(unsigned int) - 1)) .... ++ */ ++#define SNDRV_CTL_TLVD_ITEM(type, ...) \ ++ (type), SNDRV_CTL_TLVD_LENGTH(__VA_ARGS__), __VA_ARGS__ ++#define SNDRV_CTL_TLVD_LENGTH(...) \ ++ ((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ })) ++ ++/* Accessor offsets for TLV data items */ ++#define SNDRV_CTL_TLVO_TYPE 0 ++#define SNDRV_CTL_TLVO_LEN 1 ++ ++#define SNDRV_CTL_TLVD_CONTAINER_ITEM(...) \ ++ SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__) ++#define SNDRV_CTL_TLVD_DECLARE_CONTAINER(name, ...) \ ++ unsigned int name[] = { \ ++ SNDRV_CTL_TLVD_CONTAINER_ITEM(__VA_ARGS__) \ ++ } ++ ++#define SNDRV_CTL_TLVD_DB_SCALE_MASK 0xffff ++#define SNDRV_CTL_TLVD_DB_SCALE_MUTE 0x10000 ++#define SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \ ++ SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_SCALE, \ ++ (min), \ ++ ((step) & SNDRV_CTL_TLVD_DB_SCALE_MASK) | \ ++ ((mute) ? SNDRV_CTL_TLVD_DB_SCALE_MUTE : 0)) ++#define SNDRV_CTL_TLVD_DECLARE_DB_SCALE(name, min, step, mute) \ ++ unsigned int name[] = { \ ++ SNDRV_CTL_TLVD_DB_SCALE_ITEM(min, step, mute) \ ++ } ++ ++/* Accessor offsets for min, mute and step items in dB scale type TLV */ ++#define SNDRV_CTL_TLVO_DB_SCALE_MIN 2 ++#define SNDRV_CTL_TLVO_DB_SCALE_MUTE_AND_STEP 3 ++ ++/* dB scale specified with min/max values instead of step */ ++#define SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \ ++ SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB)) ++#define SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \ ++ SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB)) ++#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX(name, min_dB, max_dB) \ ++ unsigned int name[] = { \ ++ SNDRV_CTL_TLVD_DB_MINMAX_ITEM(min_dB, max_dB) \ ++ } ++#define SNDRV_CTL_TLVD_DECLARE_DB_MINMAX_MUTE(name, min_dB, max_dB) \ ++ unsigned int name[] = { \ ++ SNDRV_CTL_TLVD_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) \ ++ } ++ ++/* Accessor offsets for min, max items in db-minmax types of TLV. */ ++#define SNDRV_CTL_TLVO_DB_MINMAX_MIN 2 ++#define SNDRV_CTL_TLVO_DB_MINMAX_MAX 3 ++ ++/* linear volume between min_dB and max_dB (.01dB unit) */ ++#define SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \ ++ SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB)) ++#define SNDRV_CTL_TLVD_DECLARE_DB_LINEAR(name, min_dB, max_dB) \ ++ unsigned int name[] = { \ ++ SNDRV_CTL_TLVD_DB_LINEAR_ITEM(min_dB, max_dB) \ ++ } ++ ++/* Accessor offsets for min, max items in db-linear type of TLV. */ ++#define SNDRV_CTL_TLVO_DB_LINEAR_MIN 2 ++#define SNDRV_CTL_TLVO_DB_LINEAR_MAX 3 ++ ++/* dB range container: ++ * Items in dB range container must be ordered by their values and by their ++ * dB values. This implies that larger values must correspond with larger ++ * dB values (which is also required for all other mixer controls). ++ */ ++/* Each item is: <min> <max> <TLV> */ ++#define SNDRV_CTL_TLVD_DB_RANGE_ITEM(...) \ ++ SNDRV_CTL_TLVD_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__) ++#define SNDRV_CTL_TLVD_DECLARE_DB_RANGE(name, ...) \ ++ unsigned int name[] = { \ ++ SNDRV_CTL_TLVD_DB_RANGE_ITEM(__VA_ARGS__) \ ++ } ++ ++#define SNDRV_CTL_TLVD_DB_GAIN_MUTE -9999999 ++ ++#endif +diff --git a/src/topology/tplg_local.h b/src/topology/tplg_local.h +index 11efce6d..101491a4 100644 +--- a/src/topology/tplg_local.h ++++ b/src/topology/tplg_local.h +@@ -18,8 +18,7 @@ + #include "list.h" + #include "topology.h" + +-#define __packed __attribute__((__packed__)) +- ++#include <sound/type_compat.h> + #include <sound/asound.h> + #include <sound/asoc.h> + #include <sound/tlv.h> +-- +2.20.1 + diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-configure.ac-remove-an-unnecessary-libtool-fix.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-configure.ac-remove-an-unnecessary-libtool-fix.patch new file mode 100644 index 00000000..4db4934f --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-configure.ac-remove-an-unnecessary-libtool-fix.patch @@ -0,0 +1,50 @@ +From 01cd8cb6d594d7a12c67d21d689ebe0e347469c0 Mon Sep 17 00:00:00 2001 +From: Tanu Kaskinen <tanuk@iki.fi> +Date: Fri, 20 Dec 2019 09:26:12 +0200 +Subject: [PATCH] configure.ac: remove an unnecessary libtool fix + +This code was added in commit 75d393a563efb578c79364a277087c6326267f52 +without explaining why. I assume it was a mistake, since it looks like +the libtool problem should have gone away a long time ago. The referenced +wiki page https://wiki.debian.org/RpathIssue says: + + Since libtool 1.5.2 (released 2004-01-25), on Linux libtool no + longer sets RPATH for any directories in the dynamic linker search + path, so this should no longer be an issue unless upstream used a + really old version of libtool when creating their distribution + tarball. + +This code caused problems in OpenEmbedded, where the libtool script is +named "x86_64-oe-linux-libtool" or similar rather than just "libtool", +so the sed command failed with a file not found error. Rather than +adapting the code to OpenEmbedded's peculiarities, it seems best to just +remove the unnecessary code altogether. + +Upstream-Status: Submitted [https://github.com/alsa-project/alsa-lib/pull/19] +Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> +--- + configure.ac | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 119ef600..22a4a885 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -764,14 +764,3 @@ test "$build_seq" = "yes" && echo "#include <alsa/seq.h>" >> include/asoundlib.h + test "$build_seq" = "yes" && echo "#include <alsa/seqmid.h>" >> include/asoundlib.h + test "$build_seq" = "yes" && echo "#include <alsa/seq_midi_event.h>" >> include/asoundlib.h + cat "$srcdir"/include/asoundlib-tail.h >> include/asoundlib.h +- +-dnl Taken from https://wiki.debian.org/RpathIssue +-case $host in +- *-*-linux-gnu) +- AC_MSG_RESULT([Fixing libtool for -rpath problems.]) +- sed < libtool > libtool-2 \ +- 's/^hardcode_libdir_flag_spec.*$'/'hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/' +- mv libtool-2 libtool +- chmod 755 libtool +- ;; +-esac +-- +2.20.1 + diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-uapi-Move-typedefs-from-uapi-to-sound.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-uapi-Move-typedefs-from-uapi-to-sound.patch new file mode 100644 index 00000000..c35a2c9d --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-uapi-Move-typedefs-from-uapi-to-sound.patch @@ -0,0 +1,137 @@ +From 59792f467b38d6a4c4dffdb30528f7fb03d23d96 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai <tiwai@suse.de> +Date: Fri, 20 Dec 2019 17:12:37 +0100 +Subject: [PATCH] uapi: Move typedefs from uapi to sound/* + +For keeping uapi/*.h cleaner. + +Signed-off-by: Takashi Iwai <tiwai@suse.de> + +Upstream-Status: Backport + +Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> +--- + include/sound/emu10k1.h | 9 +++++++++ + include/sound/hdsp.h | 10 ++++++++++ + include/sound/hdspm.h | 8 ++++++++ + include/sound/sb16_csp.h | 4 ++++ + include/sound/uapi/emu10k1.h | 10 ---------- + include/sound/uapi/hdsp.h | 9 --------- + include/sound/uapi/hdspm.h | 8 -------- + 7 files changed, 31 insertions(+), 27 deletions(-) + +diff --git a/include/sound/emu10k1.h b/include/sound/emu10k1.h +index f06ecee5..0832f95b 100644 +--- a/include/sound/emu10k1.h ++++ b/include/sound/emu10k1.h +@@ -1,2 +1,11 @@ + #include <alsa/sound/type_compat.h> + #include <alsa/sound/uapi/emu10k1.h> ++#ifndef __emu10k1_type_defined ++#define __emu10k1_type_defined ++typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t; ++typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t; ++typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t; ++typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t; ++typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t; ++typedef struct emu10k1_ctl_elem_id emu10k1_ctl_elem_id_t; ++#endif +diff --git a/include/sound/hdsp.h b/include/sound/hdsp.h +index 78fb745b..e8f93156 100644 +--- a/include/sound/hdsp.h ++++ b/include/sound/hdsp.h +@@ -1,2 +1,12 @@ + #include <alsa/sound/type_compat.h> + #include <alsa/sound/uapi/hdsp.h> ++#ifndef __hdsp_type_defined ++#define __hdsp_type_defined ++typedef enum HDSP_IO_Type HDSP_IO_Type; ++typedef struct hdsp_peak_rms hdsp_peak_rms_t; ++typedef struct hdsp_config_info hdsp_config_info_t; ++typedef struct hdsp_firmware hdsp_firmware_t; ++typedef struct hdsp_version hdsp_version_t; ++typedef struct hdsp_mixer hdsp_mixer_t; ++typedef struct hdsp_9632_aeb hdsp_9632_aeb_t; ++#endif +diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h +index af6d19ed..d9095d9f 100644 +--- a/include/sound/hdspm.h ++++ b/include/sound/hdspm.h +@@ -1,2 +1,10 @@ + #include <alsa/sound/type_compat.h> + #include <alsa/sound/uapi/hdspm.h> ++#ifndef __hdspm_type_defined ++#define __hdspm_type_defined ++typedef struct hdspm_peak_rms hdspm_peak_rms_t; ++typedef struct hdspm_config_info hdspm_config_info_t; ++typedef struct hdspm_version hdspm_version_t; ++typedef struct hdspm_channelfader snd_hdspm_channelfader_t; ++typedef struct hdspm_mixer hdspm_mixer_t; ++#endif +diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h +index 24121fcb..fd02bc56 100644 +--- a/include/sound/sb16_csp.h ++++ b/include/sound/sb16_csp.h +@@ -1 +1,5 @@ + #include <alsa/sound/uapi/sb16_csp.h> ++#ifndef __sb16_csp_type_defined ++#define __sb16_csp_type_defined ++typedef struct snd_sb_csp_microcode snd_sb_csp_microcode_t; ++#endif +diff --git a/include/sound/uapi/emu10k1.h b/include/sound/uapi/emu10k1.h +index c1150e4d..6bcd76f6 100644 +--- a/include/sound/uapi/emu10k1.h ++++ b/include/sound/uapi/emu10k1.h +@@ -382,14 +382,4 @@ struct snd_emu10k1_fx8010_pcm_rec { + #define SNDRV_EMU10K1_IOCTL_SINGLE_STEP _IOW ('H', 0x83, int) + #define SNDRV_EMU10K1_IOCTL_DBG_READ _IOR ('H', 0x84, int) + +-#ifndef __KERNEL__ +-/* typedefs for compatibility to user-space */ +-typedef struct snd_emu10k1_fx8010_info emu10k1_fx8010_info_t; +-typedef struct snd_emu10k1_fx8010_control_gpr emu10k1_fx8010_control_gpr_t; +-typedef struct snd_emu10k1_fx8010_code emu10k1_fx8010_code_t; +-typedef struct snd_emu10k1_fx8010_tram emu10k1_fx8010_tram_t; +-typedef struct snd_emu10k1_fx8010_pcm_rec emu10k1_fx8010_pcm_t; +-typedef struct emu10k1_ctl_elem_id emu10k1_ctl_elem_id_t; +-#endif +- + #endif /* _UAPI__SOUND_EMU10K1_H */ +diff --git a/include/sound/uapi/hdsp.h b/include/sound/uapi/hdsp.h +index 88c92a3f..7ac2d3f2 100644 +--- a/include/sound/uapi/hdsp.h ++++ b/include/sound/uapi/hdsp.h +@@ -97,13 +97,4 @@ struct hdsp_9632_aeb { + + #define SNDRV_HDSP_IOCTL_GET_9632_AEB _IOR('H', 0x45, struct hdsp_9632_aeb) + +-/* typedefs for compatibility to user-space */ +-typedef enum HDSP_IO_Type HDSP_IO_Type; +-typedef struct hdsp_peak_rms hdsp_peak_rms_t; +-typedef struct hdsp_config_info hdsp_config_info_t; +-typedef struct hdsp_firmware hdsp_firmware_t; +-typedef struct hdsp_version hdsp_version_t; +-typedef struct hdsp_mixer hdsp_mixer_t; +-typedef struct hdsp_9632_aeb hdsp_9632_aeb_t; +- + #endif /* __SOUND_HDSP_H */ +diff --git a/include/sound/uapi/hdspm.h b/include/sound/uapi/hdspm.h +index 2d91f90e..3fbfd9dc 100644 +--- a/include/sound/uapi/hdspm.h ++++ b/include/sound/uapi/hdspm.h +@@ -219,12 +219,4 @@ struct hdspm_mixer_ioctl { + /* use indirect access due to the limit of ioctl bit size */ + #define SNDRV_HDSPM_IOCTL_GET_MIXER _IOR('H', 0x44, struct hdspm_mixer_ioctl) + +-/* typedefs for compatibility to user-space */ +-typedef struct hdspm_peak_rms hdspm_peak_rms_t; +-typedef struct hdspm_config_info hdspm_config_info_t; +-typedef struct hdspm_version hdspm_version_t; +-typedef struct hdspm_channelfader snd_hdspm_channelfader_t; +-typedef struct hdspm_mixer hdspm_mixer_t; +- +- + #endif +-- +2.20.1 + diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-ucm-Use-strncmp-to-avoid-access-out-of-boundary.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-ucm-Use-strncmp-to-avoid-access-out-of-boundary.patch new file mode 100644 index 00000000..96dcd8ab --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0001-ucm-Use-strncmp-to-avoid-access-out-of-boundary.patch @@ -0,0 +1,41 @@ +From 4b6fe372c68d1ff50e7c161cffadeb298734f49c Mon Sep 17 00:00:00 2001 +From: paulhsia <paulhsia@chromium.org> +Date: Sat, 30 Nov 2019 03:35:30 +0800 +Subject: [PATCH 1/5] ucm: Use strncmp to avoid access-out-of-boundary + +If the length of the identifier is less than the length of the prefix, +access-out-of-boundary will occur in memcmp(). + +Signed-off-by: paulhsia <paulhsia@chromium.org> +Signed-off-by: Jaroslav Kysela <perex@perex.cz> + +Upstream-Status: Backport +Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> +--- + src/ucm/main.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/ucm/main.c b/src/ucm/main.c +index b0b6ffb3..252e50d9 100644 +--- a/src/ucm/main.c ++++ b/src/ucm/main.c +@@ -61,11 +61,13 @@ static int check_identifier(const char *identifier, const char *prefix) + { + int len; + +- if (strcmp(identifier, prefix) == 0) +- return 1; + len = strlen(prefix); +- if (memcmp(identifier, prefix, len) == 0 && identifier[len] == '/') ++ if (strncmp(identifier, prefix, len) != 0) ++ return 0; ++ ++ if (identifier[len] == 0 || identifier[len] == '/') + return 1; ++ + return 0; + } + +-- +2.20.1 + diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0002-ucm-return-always-at-least-NULL-if-no-list-is-availa.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0002-ucm-return-always-at-least-NULL-if-no-list-is-availa.patch new file mode 100644 index 00000000..42973fb6 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0002-ucm-return-always-at-least-NULL-if-no-list-is-availa.patch @@ -0,0 +1,45 @@ +From 58f9dc9bd12a51efa12dbc67e200f4d85cd3da07 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela <perex@perex.cz> +Date: Fri, 29 Nov 2019 22:28:26 +0100 +Subject: [PATCH 2/5] ucm: return always at least NULL if no list is available + in snd_use_case_get_list() + +Signed-off-by: Jaroslav Kysela <perex@perex.cz> + +Upstream-Status: Backport +Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> +--- + src/ucm/main.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/ucm/main.c b/src/ucm/main.c +index 252e50d9..b80db65f 100644 +--- a/src/ucm/main.c ++++ b/src/ucm/main.c +@@ -1160,8 +1160,10 @@ static int get_supcon_device_list(snd_use_case_mgr_t *uc_mgr, + + modifier = find_modifier(uc_mgr, verb, name, 0); + if (modifier) { +- if (modifier->dev_list.type != type) ++ if (modifier->dev_list.type != type) { ++ *list = NULL; + return 0; ++ } + return get_list(&modifier->dev_list.list, list, + struct dev_list_node, list, + name); +@@ -1169,8 +1171,10 @@ static int get_supcon_device_list(snd_use_case_mgr_t *uc_mgr, + + device = find_device(uc_mgr, verb, name, 0); + if (device) { +- if (device->dev_list.type != type) ++ if (device->dev_list.type != type) { ++ *list = NULL; + return 0; ++ } + return get_list(&device->dev_list.list, list, + struct dev_list_node, list, + name); +-- +2.20.1 + diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0003-namehint-correct-the-args-check.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0003-namehint-correct-the-args-check.patch new file mode 100644 index 00000000..82f8b2bd --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0003-namehint-correct-the-args-check.patch @@ -0,0 +1,34 @@ +From 10f3401ce356a675e2440993457ee7c8c7e9fcf8 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela <perex@perex.cz> +Date: Sun, 1 Dec 2019 14:26:40 +0100 +Subject: [PATCH 3/5] namehint: correct the @args check + +BugLink: https://github.com/alsa-project/alsa-plugins/issues/3 +Signed-off-by: Jaroslav Kysela <perex@perex.cz> + +Upstream-Status: Backport +Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> +--- + src/control/namehint.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/control/namehint.c b/src/control/namehint.c +index 808df6b5..4927ef97 100644 +--- a/src/control/namehint.c ++++ b/src/control/namehint.c +@@ -348,6 +348,12 @@ static int try_config(snd_config_t *config, + goto __cleanup; + if (snd_config_search(res, "@args", &cfg) >= 0) { + snd_config_for_each(i, next, cfg) { ++ /* skip the argument list */ ++ snd_config_get_id(snd_config_iterator_entry(i), &str); ++ while (*str && *str >= '0' && *str <= '9') str++; ++ if (*str == '\0') ++ continue; ++ /* the argument definition must have the default */ + if (snd_config_search(snd_config_iterator_entry(i), + "default", NULL) < 0) { + err = -EINVAL; +-- +2.20.1 + diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0004-namehint-improve-the-previous-patch-check-the-return.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0004-namehint-improve-the-previous-patch-check-the-return.patch new file mode 100644 index 00000000..98192f6e --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0004-namehint-improve-the-previous-patch-check-the-return.patch @@ -0,0 +1,31 @@ +From 1fa6664d5f0cc7d21edceba6695a4c28543c2cab Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela <perex@perex.cz> +Date: Sun, 1 Dec 2019 14:30:54 +0100 +Subject: [PATCH 4/5] namehint: improve the previous patch (check the returned + value) + +Signed-off-by: Jaroslav Kysela <perex@perex.cz> + +Upstream-Status: Backport +Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> +--- + src/control/namehint.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/control/namehint.c b/src/control/namehint.c +index 4927ef97..60c48ae3 100644 +--- a/src/control/namehint.c ++++ b/src/control/namehint.c +@@ -349,7 +349,8 @@ static int try_config(snd_config_t *config, + if (snd_config_search(res, "@args", &cfg) >= 0) { + snd_config_for_each(i, next, cfg) { + /* skip the argument list */ +- snd_config_get_id(snd_config_iterator_entry(i), &str); ++ if (snd_config_get_id(snd_config_iterator_entry(i), &str) < 0) ++ continue; + while (*str && *str >= '0' && *str <= '9') str++; + if (*str == '\0') + continue; +-- +2.20.1 + diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0005-ucm-Do-not-fail-to-parse-configs-on-cards-with-an-em.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0005-ucm-Do-not-fail-to-parse-configs-on-cards-with-an-em.patch new file mode 100644 index 00000000..cbc0a4ce --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-lib/0005-ucm-Do-not-fail-to-parse-configs-on-cards-with-an-em.patch @@ -0,0 +1,86 @@ +From 976f8f62238f0d837584adc7c31035bdb29b6d6f Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Tue, 3 Dec 2019 18:27:39 +0100 +Subject: [PATCH 5/5] ucm: Do not fail to parse configs on cards with an empty + CardComponents lists + +Since the UCM profiles for all Bay- and Cherry-Trail SST cards have been +moved over to UCM2, parsing them fails with: + +ALSA lib ucm_subs.c:220:(uc_mgr_get_substituted_value) variable '${CardComponents}' is not defined in this context! + +This completely breaks audio support on all Bay- and Cherry-Trail devices. + +This is caused by these non-SOF ASoC using cards having an empty +CardComponents list. Which in itself is fine, but is rejected by +the ucm_subs.c code. This commit changes the ucm_subs code to accept +an empty string as a valid value for CardComponents restoring audio +functionality on these boards. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +Signed-off-by: Jaroslav Kysela <perex@perex.cz> + +Upstream-Status: Backport +Signed-off-by: Tanu Kaskinen <tanuk@iki.fi> +--- + src/ucm/ucm_subs.c | 20 ++++++++++++-------- + 1 file changed, 12 insertions(+), 8 deletions(-) + +diff --git a/src/ucm/ucm_subs.c b/src/ucm/ucm_subs.c +index 00afa9e3..90e395f0 100644 +--- a/src/ucm/ucm_subs.c ++++ b/src/ucm/ucm_subs.c +@@ -25,6 +25,7 @@ + */ + + #include "ucm_local.h" ++#include <stdbool.h> + #include <sys/stat.h> + #include <limits.h> + +@@ -145,10 +146,11 @@ static char *rval_sysfs(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED, const char + return strdup(path); + } + +-#define MATCH_VARIABLE(name, id, fcn) \ ++#define MATCH_VARIABLE(name, id, fcn, empty_ok) \ + if (strncmp((name), (id), sizeof(id) - 1) == 0) { \ + rval = fcn(uc_mgr); \ + idsize = sizeof(id) - 1; \ ++ allow_empty = (empty_ok); \ + goto __rval; \ + } + +@@ -189,12 +191,14 @@ int uc_mgr_get_substituted_value(snd_use_case_mgr_t *uc_mgr, + + while (*value) { + if (*value == '$' && *(value+1) == '{') { +- MATCH_VARIABLE(value, "${ConfName}", rval_conf_name); +- MATCH_VARIABLE(value, "${CardId}", rval_card_id); +- MATCH_VARIABLE(value, "${CardDriver}", rval_card_driver); +- MATCH_VARIABLE(value, "${CardName}", rval_card_name); +- MATCH_VARIABLE(value, "${CardLongName}", rval_card_longname); +- MATCH_VARIABLE(value, "${CardComponents}", rval_card_components); ++ bool allow_empty = false; ++ ++ MATCH_VARIABLE(value, "${ConfName}", rval_conf_name, false); ++ MATCH_VARIABLE(value, "${CardId}", rval_card_id, false); ++ MATCH_VARIABLE(value, "${CardDriver}", rval_card_driver, false); ++ MATCH_VARIABLE(value, "${CardName}", rval_card_name, false); ++ MATCH_VARIABLE(value, "${CardLongName}", rval_card_longname, false); ++ MATCH_VARIABLE(value, "${CardComponents}", rval_card_components, true); + MATCH_VARIABLE2(value, "${env:", rval_env); + MATCH_VARIABLE2(value, "${sys:", rval_sysfs); + err = -EINVAL; +@@ -208,7 +212,7 @@ int uc_mgr_get_substituted_value(snd_use_case_mgr_t *uc_mgr, + } + goto __error; + __rval: +- if (rval == NULL || rval[0] == '\0') { ++ if (rval == NULL || (!allow_empty && rval[0] == '\0')) { + free(rval); + strncpy(r, value, idsize); + r[idsize] = '\0'; +-- +2.20.1 + diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.6.bb b/external/poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.6.bb deleted file mode 100644 index 25e7a3c6..00000000 --- a/external/poky/meta/recipes-multimedia/alsa/alsa-lib_1.1.6.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "ALSA sound library" -HOMEPAGE = "http://www.alsa-project.org" -BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" -SECTION = "libs/multimedia" -LICENSE = "LGPLv2.1 & GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ - file://src/socket.c;md5=dd1bc7f44872690224d89c1a9806e495;beginline=1;endline=26 \ - " - -SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/${BP}.tar.bz2" -SRC_URI[md5sum] = "2f981a8f7897c59ec2ddc44916d33788" -SRC_URI[sha256sum] = "5f2cd274b272cae0d0d111e8a9e363f08783329157e8dd68b3de0c096de6d724" - -inherit autotools pkgconfig - -EXTRA_OECONF += " \ - ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \ - --disable-python \ -" - -PACKAGES =+ "alsa-server alsa-conf alsa-doc" - -FILES_alsa-server = "${bindir}/*" -FILES_alsa-conf = "${datadir}/alsa/" - -RDEPENDS_${PN}_class-target = "alsa-conf" - -# upgrade path -RPROVIDES_${PN} = "libasound" -RREPLACES_${PN} = "libasound" -RCONFLICTS_${PN} = "libasound" - -RPROVIDES_${PN}-dev = "alsa-dev" -RREPLACES_${PN}-dev = "alsa-dev" -RCONFLICTS_${PN}-dev = "alsa-dev" - -RPROVIDES_alsa-conf = "alsa-conf-base" -RREPLACES_alsa-conf = "alsa-conf-base" -RCONFLICTS_alsa-conf = "alsa-conf-base" - -BBCLASSEXTEND = "native nativesdk" diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-lib_1.2.1.2.bb b/external/poky/meta/recipes-multimedia/alsa/alsa-lib_1.2.1.2.bb new file mode 100644 index 00000000..e2bc61fb --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-lib_1.2.1.2.bb @@ -0,0 +1,52 @@ +SUMMARY = "ALSA sound library" +HOMEPAGE = "http://www.alsa-project.org" +BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" +SECTION = "libs/multimedia" +LICENSE = "LGPLv2.1 & GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ + file://src/socket.c;md5=285675b45e83f571c6a957fe4ab79c93;beginline=9;endline=24 \ + " + +SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2 \ + file://0001-configure.ac-remove-an-unnecessary-libtool-fix.patch \ + file://0001-ucm-Use-strncmp-to-avoid-access-out-of-boundary.patch \ + file://0002-ucm-return-always-at-least-NULL-if-no-list-is-availa.patch \ + file://0003-namehint-correct-the-args-check.patch \ + file://0004-namehint-improve-the-previous-patch-check-the-return.patch \ + file://0005-ucm-Do-not-fail-to-parse-configs-on-cards-with-an-em.patch \ + file://0001-Fix-alsa-sound-.h-for-external-programs.patch \ + file://0001-uapi-Move-typedefs-from-uapi-to-sound.patch \ + " +SRC_URI[md5sum] = "82ddd3698469beec147e4f4a67134ea0" +SRC_URI[sha256sum] = "958e260e3673f1f6ff6b2d2c0df3fc2e469bea5b2957163ce96ce17f23e87943" + +inherit autotools pkgconfig + +EXTRA_OECONF += " \ + ${@bb.utils.contains('TARGET_FPU', 'soft', '--with-softfloat', '', d)} \ + --disable-python \ +" + +PACKAGES =+ "alsa-server alsa-conf libatopology" + +FILES_alsa-server = "${bindir}/*" +FILES_alsa-conf = "${datadir}/alsa/" +FILES_libatopology = "${libdir}/libatopology.so.*" + +RDEPENDS_${PN}_class-target = "alsa-conf alsa-ucm-conf" +RDEPENDS_libatopology_class-target = "alsa-topology-conf" + +# upgrade path +RPROVIDES_${PN} = "libasound" +RREPLACES_${PN} = "libasound" +RCONFLICTS_${PN} = "libasound" + +RPROVIDES_${PN}-dev = "alsa-dev" +RREPLACES_${PN}-dev = "alsa-dev" +RCONFLICTS_${PN}-dev = "alsa-dev" + +RPROVIDES_alsa-conf = "alsa-conf-base" +RREPLACES_alsa-conf = "alsa-conf-base" +RCONFLICTS_alsa-conf = "alsa-conf-base" + +BBCLASSEXTEND = "native nativesdk" diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.6.bb b/external/poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.6.bb deleted file mode 100644 index 17c1879f..00000000 --- a/external/poky/meta/recipes-multimedia/alsa/alsa-plugins_1.1.6.bb +++ /dev/null @@ -1,103 +0,0 @@ -SUMMARY = "ALSA Plugins" -HOMEPAGE = "http://alsa-project.org" -BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" -SECTION = "multimedia" - -# The primary license of alsa-plugins is LGPLv2.1. -# -# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the -# build system, and doesn't affect the licensing of the build result. -# -# The samplerate plugin source code is licensed under GPLv2+ to be consistent -# with the libsamplerate license. However, if the licensee has a commercial -# license for libsamplerate, the samplerate plugin may be used under the terms -# of LGPLv2.1 like the rest of the plugins. -LICENSE = "LGPLv2.1 & GPLv2+" -LIC_FILES_CHKSUM = "\ - file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ - file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \ - file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \ -" - -SRC_URI = "ftp://ftp.alsa-project.org/pub/plugins/${BP}.tar.bz2" -SRC_URI[md5sum] = "8387279e99feeb2ecffaac5f293223d7" -SRC_URI[sha256sum] = "6f1d31ebe3b1fa1cc8dade60b7bed1cb2583ac998167002d350dc0a5e3e40c13" - -DEPENDS += "alsa-lib" - -inherit autotools pkgconfig - -PACKAGECONFIG ??= "\ - samplerate \ - speexdsp \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ -" -PACKAGECONFIG[avcodec] = "--enable-avcodec,--disable-avcodec,libav" -PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" -PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin" -PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus" -PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" -PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0" -PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp" - -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}" - -PACKAGES_DYNAMIC = "^libasound-module-.*" - -# The alsa-plugins package doesn't itself contain anything, it just depends on -# all built plugins. -ALLOW_EMPTY_${PN} = "1" - -do_install_append() { - rm ${D}${libdir}/alsa-lib/*.la - - # We use the example as is, so just drop the .example suffix. - if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then - mv ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf - fi -} - -python populate_packages_prepend() { - plugindir = d.expand('${libdir}/alsa-lib/') - packages = " ".join(do_split_packages(d, plugindir, '^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) - d.setVar("RDEPENDS_alsa-plugins", packages) -} - -# The rate plugins create some symlinks. For example, the samplerate plugin -# creates these links to the main plugin file: -# -# libasound_module_rate_samplerate_best.so -# libasound_module_rate_samplerate_linear.so -# libasound_module_rate_samplerate_medium.so -# libasound_module_rate_samplerate_order.so -# -# The other rate plugins create similar links. We have to add the links to -# FILES manually, because do_split_packages() skips the links (which is good, -# because we wouldn't want do_split_packages() to create separate packages for -# the symlinks). -# -# The symlinks cause QA errors, because usually it's a bug if a non -# -dev/-dbg/-nativesdk package contains links to .so files, but in this case -# the errors are false positives, so we disable the QA checks. -FILES_${MLPREFIX}libasound-module-rate-lavcrate += "${libdir}/alsa-lib/*rate_lavcrate_*.so" -FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so" -FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so" -INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavcrate = "dev-so" -INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so" -INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so" - -# 50-pulseaudio.conf defines a device named "pulse" that applications can use -# if they explicitly want to use the PulseAudio plugin. -# 99-pulseaudio-default.conf configures the "default" device to use the -# PulseAudio plugin. -FILES_${PN}-pulseaudio-conf += "\ - ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \ - ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \ -" - -RDEPENDS_${PN}-pulseaudio-conf += "\ - libasound-module-conf-pulse \ - libasound-module-ctl-pulse \ - libasound-module-pcm-pulse \ -" diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-plugins_1.2.1.bb b/external/poky/meta/recipes-multimedia/alsa/alsa-plugins_1.2.1.bb new file mode 100644 index 00000000..9882e127 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-plugins_1.2.1.bb @@ -0,0 +1,173 @@ +SUMMARY = "ALSA Plugins" +HOMEPAGE = "http://alsa-project.org" +BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" +SECTION = "multimedia" + +# The primary license of alsa-plugins is LGPLv2.1. +# +# m4/attributes.m4 is licensed under GPLv2+. m4/attributes.m4 is part of the +# build system, and doesn't affect the licensing of the build result. +# +# The samplerate plugin source code is licensed under GPLv2+ to be consistent +# with the libsamplerate license. However, if the licensee has a commercial +# license for libsamplerate, the samplerate plugin may be used under the terms +# of LGPLv2.1 like the rest of the plugins. +LICENSE = "LGPLv2.1 & GPLv2+" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=a916467b91076e631dd8edb7424769c7 \ + file://COPYING.GPL;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://m4/attributes.m4;endline=33;md5=b25958da44c02231e3641f1bccef53eb \ + file://rate/rate_samplerate.c;endline=35;md5=fd77bce85f4a338c0e8ab18430b69fae \ +" + +SRC_URI = "https://www.alsa-project.org/files/pub/plugins/${BP}.tar.bz2" +SRC_URI[md5sum] = "5b11cd3ec92e5f9190ec378565b529e8" +SRC_URI[sha256sum] = "4d94de7ad41734b8604a652521200bb6554fcf0c2c00fdbd302b1710d76548da" + +DEPENDS += "alsa-lib" + +inherit autotools pkgconfig + +PACKAGECONFIG ??= "\ + samplerate \ + speexdsp \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ +" +PACKAGECONFIG[aaf] = "--enable-aaf,--disable-aaf,avtp" +PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" +PACKAGECONFIG[libav] = "--enable-libav,--disable-libav,libav" +PACKAGECONFIG[maemo-plugin] = "--enable-maemo-plugin,--disable-maemo-plugin" +PACKAGECONFIG[maemo-resource-manager] = "--enable-maemo-resource-manager,--disable-maemo-resource-manager,dbus" +PACKAGECONFIG[pulseaudio] = "--enable-pulseaudio,--disable-pulseaudio,pulseaudio" +PACKAGECONFIG[samplerate] = "--enable-samplerate,--disable-samplerate,libsamplerate0" +PACKAGECONFIG[speexdsp] = "--with-speex=lib,--with-speex=no,speexdsp" + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}" + +PACKAGES_DYNAMIC = "^libasound-module-.*" + +# The alsa-plugins package doesn't itself contain anything, it just depends on +# all built plugins. +FILES_${PN} = "" +ALLOW_EMPTY_${PN} = "1" + +do_install_append() { + rm ${D}${libdir}/alsa-lib/*.la + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'yes', 'no', d)}" = "yes" ]; then + # We use the example as is. Upstream installs the file under + # /etc, but we move it under /usr/share and add a symlink under + # /etc to be consistent with other installed configuration + # files. + mv ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf.example ${D}${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf + ln -s ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf ${D}${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf + fi +} + +python populate_packages_prepend() { + plugindir = d.expand('${libdir}/alsa-lib/') + packages = " ".join(do_split_packages(d, plugindir, r'^libasound_module_(.*)\.so$', 'libasound-module-%s', 'Alsa plugin for %s', extra_depends='')) + d.setVar("RDEPENDS_alsa-plugins", packages) +} + +# Many plugins have a configuration file (plus a symlink in /etc) associated +# with them. We put the plugin and it's configuration usually in the same +# package, but that's problematic when the configuration file is related to +# multiple plugins, as is the case with the pulse, oss and maemo plugins. In +# case of the pulse plugins, we have a separate alsa-plugins-pulseaudio-conf +# package that depends on all the pulse plugins, which ensures that all plugins +# that the configuration references are installed. The oss and maemo +# configuration files, on the other hand, are in the respective pcm plugin +# packages. Therefore it's possible to install the configuration file without +# the ctl plugin that the configuration file references. This is unlikely to +# cause big problems, but some kind of improvement to the packaging could +# probably be done here (at least it would be good to handle the different +# plugins in a consistent way). +FILES_${MLPREFIX}libasound-module-ctl-arcam-av += "\ + ${datadir}/alsa/alsa.conf.d/50-arcam-av-ctl.conf \ + ${sysconfdir}/alsa/conf.d/50-arcam-av-ctl.conf \ +" +FILES_${MLPREFIX}libasound-module-pcm-a52 += "\ + ${datadir}/alsa/alsa.conf.d/60-a52-encoder.conf \ + ${sysconfdir}/alsa/conf.d/60-a52-encoder.conf \ +" +FILES_${MLPREFIX}libasound-module-pcm-alsa-dsp += "\ + ${datadir}/alsa/alsa.conf.d/98-maemo.conf \ + ${sysconfdir}/alsa/conf.d/98-maemo.conf \ +" +FILES_${MLPREFIX}libasound-module-pcm-jack += "\ + ${datadir}/alsa/alsa.conf.d/50-jack.conf \ + ${sysconfdir}/alsa/conf.d/50-jack.conf \ +" +FILES_${MLPREFIX}libasound-module-pcm-oss += "\ + ${datadir}/alsa/alsa.conf.d/50-oss.conf \ + ${sysconfdir}/alsa/conf.d/50-oss.conf \ +" +FILES_${MLPREFIX}libasound-module-pcm-speex += "\ + ${datadir}/alsa/alsa.conf.d/60-speex.conf \ + ${sysconfdir}/alsa/conf.d/60-speex.conf \ +" +FILES_${MLPREFIX}libasound-module-pcm-upmix += "\ + ${datadir}/alsa/alsa.conf.d/60-upmix.conf \ + ${sysconfdir}/alsa/conf.d/60-upmix.conf \ +" +FILES_${MLPREFIX}libasound-module-pcm-usb-stream += "\ + ${datadir}/alsa/alsa.conf.d/98-usb-stream.conf \ + ${sysconfdir}/alsa/conf.d/98-usb-stream.conf \ +" +FILES_${MLPREFIX}libasound-module-pcm-vdownmix += "\ + ${datadir}/alsa/alsa.conf.d/60-vdownmix.conf \ + ${sysconfdir}/alsa/conf.d/60-vdownmix.conf \ +" +FILES_${MLPREFIX}libasound-module-rate-lavrate += "\ + ${datadir}/alsa/alsa.conf.d/10-rate-lav.conf \ + ${sysconfdir}/alsa/conf.d/10-rate-lav.conf \ +" +FILES_${MLPREFIX}libasound-module-rate-samplerate += "\ + ${datadir}/alsa/alsa.conf.d/10-samplerate.conf \ + ${sysconfdir}/alsa/conf.d/10-samplerate.conf \ +" +FILES_${MLPREFIX}libasound-module-rate-speexrate += "\ + ${datadir}/alsa/alsa.conf.d/10-speexrate.conf \ + ${sysconfdir}/alsa/conf.d/10-speexrate.conf \ +" + +# The rate plugins create some symlinks. For example, the samplerate plugin +# creates these links to the main plugin file: +# +# libasound_module_rate_samplerate_best.so +# libasound_module_rate_samplerate_linear.so +# libasound_module_rate_samplerate_medium.so +# libasound_module_rate_samplerate_order.so +# +# The other rate plugins create similar links. We have to add the links to +# FILES manually, because do_split_packages() skips the links (which is good, +# because we wouldn't want do_split_packages() to create separate packages for +# the symlinks). +# +# The symlinks cause QA errors, because usually it's a bug if a non +# -dev/-dbg/-nativesdk package contains links to .so files, but in this case +# the errors are false positives, so we disable the QA checks. +FILES_${MLPREFIX}libasound-module-rate-lavrate += "${libdir}/alsa-lib/*rate_lavrate_*.so" +FILES_${MLPREFIX}libasound-module-rate-samplerate += "${libdir}/alsa-lib/*rate_samplerate_*.so" +FILES_${MLPREFIX}libasound-module-rate-speexrate += "${libdir}/alsa-lib/*rate_speexrate_*.so" +INSANE_SKIP_${MLPREFIX}libasound-module-rate-lavrate = "dev-so" +INSANE_SKIP_${MLPREFIX}libasound-module-rate-samplerate = "dev-so" +INSANE_SKIP_${MLPREFIX}libasound-module-rate-speexrate = "dev-so" + +# 50-pulseaudio.conf defines a device named "pulse" that applications can use +# if they explicitly want to use the PulseAudio plugin. +# 99-pulseaudio-default.conf configures the "default" device to use the +# PulseAudio plugin. +FILES_${PN}-pulseaudio-conf += "\ + ${datadir}/alsa/alsa.conf.d/50-pulseaudio.conf \ + ${datadir}/alsa/alsa.conf.d/99-pulseaudio-default.conf \ + ${sysconfdir}/alsa/conf.d/50-pulseaudio.conf \ + ${sysconfdir}/alsa/conf.d/99-pulseaudio-default.conf \ +" + +RDEPENDS_${PN}-pulseaudio-conf += "\ + libasound-module-conf-pulse \ + libasound-module-ctl-pulse \ + libasound-module-pcm-pulse \ +" diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-tools/0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-tools/0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch deleted file mode 100644 index c137bc8a..00000000 --- a/external/poky/meta/recipes-multimedia/alsa/alsa-tools/0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch +++ /dev/null @@ -1,34 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Khem Raj <raj.khem@gmail.com> - -From a861bdabf02cd9bfb3ec7c0571c563c0fa14adfb Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 24 Apr 2018 12:24:32 -0700 -Subject: [PATCH] us428control: Fix clang -Wreserved-user-defined-literal - warnings - -| us428control.cc:66:18: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] -| printf("usage: "PROGNAME" [-v verbosity_level 0..2] [-c card] [-D device] [-u usb-device] [-m mode]\n"); -| ^ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Takashi Iwai <tiwai@suse.de> ---- - us428control/us428control.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/us428control/us428control.cc b/us428control/us428control.cc -index e839bf4..8cb3c42 100644 ---- a/us428control/us428control.cc -+++ b/us428control/us428control.cc -@@ -63,7 +63,7 @@ static void usage(void) - { - printf("Tascam US-428 Control\n"); - printf("version %s\n", VERSION); -- printf("usage: "PROGNAME" [-v verbosity_level 0..2] [-c card] [-D device] [-u usb-device] [-m mode]\n"); -+ printf("usage: " PROGNAME " [-v verbosity_level 0..2] [-c card] [-D device] [-u usb-device] [-m mode]\n"); - printf("mode is one of (us224, us428, mixxx)\n"); - } - /* --- -1.7.11.7 diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-tools/musl.patch b/external/poky/meta/recipes-multimedia/alsa/alsa-tools/musl.patch deleted file mode 100644 index 9eb129c3..00000000 --- a/external/poky/meta/recipes-multimedia/alsa/alsa-tools/musl.patch +++ /dev/null @@ -1,47 +0,0 @@ -Upstream-Status: Backport -Signed-off-by: Ross Burton <ross.burton@intel.com> - -From 235d9c5e8381518b0a8661786e7e0cbdd1bbcd01 Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Tue, 12 Jun 2018 13:24:34 +0100 -Subject: [PATCH] ld10k1: define _GNU_SOURCE and use sighandler_t - -__sighandler_t is a glibc internal type which doesn't exist in musl. By using -AC_USE_SYSTEM_EXTENSIONS to get _GNU_SOURCE defined, both glibc and musl -then expose sighandler_t. - -Signed-off-by: Ross Burton <ross.burton@intel.com> -Signed-off-by: Takashi Iwai <tiwai@suse.de> ---- - ld10k1/configure.ac | 1 + - ld10k1/src/ld10k1_fnc1.c | 2 +- - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/ld10k1/configure.ac b/ld10k1/configure.ac -index 276b24e..f48ca31 100644 ---- a/ld10k1/configure.ac -+++ b/ld10k1/configure.ac -@@ -4,6 +4,7 @@ AC_CONFIG_MACRO_DIR([m4]) - AM_MAINTAINER_MODE([enable]) - - AC_CONFIG_HEADERS(config.h) -+AC_USE_SYSTEM_EXTENSIONS - AC_PROG_CC - AC_PROG_LD - AC_PROG_INSTALL -diff --git a/ld10k1/src/ld10k1_fnc1.c b/ld10k1/src/ld10k1_fnc1.c -index 343584c..ddc43c6 100644 ---- a/ld10k1/src/ld10k1_fnc1.c -+++ b/ld10k1/src/ld10k1_fnc1.c -@@ -179,7 +179,7 @@ int main_loop(comm_param *param, int audigy, const char *card_id, int tram_size, - { - fd_set active_fd_set/*, read_fd_set*/; - int i, j, res = 0; -- __sighandler_t old_sig_pipe; -+ sighandler_t old_sig_pipe; - - int main_sock = 0; - int data_sock = 0; --- -2.11.0 - diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb b/external/poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb index 90e54dbb..c1f4acdb 100644 --- a/external/poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.6.bb +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-tools_1.1.7.bb @@ -9,13 +9,10 @@ LIC_FILES_CHKSUM = "file://hdsploader/COPYING;md5=59530bdf33659b29e73d4adb9f9f65 file://ld10k1/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7 \ " -SRC_URI = "ftp://ftp.alsa-project.org/pub/tools/${BP}.tar.bz2 \ - file://0002-Fix-clang-Wreserved-user-defined-literal-warnings.patch \ - file://musl.patch \ - " +SRC_URI = "https://www.alsa-project.org/files/pub/tools/${BP}.tar.bz2" -SRC_URI[md5sum] = "5ca8c9437ae779997cd62fb2815fef19" -SRC_URI[sha256sum] = "d69c4dc2fb641a974d9903e9eb78c94cb0c7ac6c45bae664f0c9d6c0a1593227" +SRC_URI[md5sum] = "475bdf6457bcf55c8c895d653ee56a54" +SRC_URI[sha256sum] = "a0243328a8f6f691a3055c484fd8d3326393096325e93743b246029d327c4ef6" inherit autotools-brokensep pkgconfig # brokensep as as10k1 (and probably more) fail out of tree @@ -25,7 +22,6 @@ CLEANBROKEN = "1" # Remember on upgrades to check that no new tools have been added. PACKAGECONFIG ??= "as10k1 hdajacksensetest hda-verb hdsploader ld10k1 mixartloader pcxhrloader \ sb16_csp seq--sbiload sscape_ctl us428control usx2yloader vxloader \ - ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK2DISTROFEATURES}', 'echomixer envy24control rmedigicontrol', '', d)} \ ${@bb.utils.contains_any('DISTRO_FEATURES', '${GTK3DISTROFEATURES}', 'hdajackretask', '', d)} \ " @@ -38,7 +34,6 @@ PACKAGECONFIG[hdajacksensetest] = ",,glib-2.0" PACKAGECONFIG[hdspconf] = ",,fltk" PACKAGECONFIG[hdsploader] = "" PACKAGECONFIG[hdspmixer] = ",,fltk" -PACKAGECONFIG[hwmixvolume] = ",,,python-core python-pygtk" PACKAGECONFIG[ld10k1] = "" PACKAGECONFIG[mixartloader] = "" PACKAGECONFIG[pcxhrloader] = "" @@ -51,6 +46,10 @@ PACKAGECONFIG[us428control] = "" PACKAGECONFIG[usx2yloader] = "" PACKAGECONFIG[vxloader] = "" +# At the time of writing pyalsa is not packaged for OE, so this is not expected +# to work. +PACKAGECONFIG[hwmixvolume] = ",,,python-core python-pygobject pyalsa" + python do_configure() { for subdir in d.getVar("PACKAGECONFIG").split(): subdir = subdir.replace("--", "/") diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.1.bb b/external/poky/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.1.bb new file mode 100644 index 00000000..add1f309 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-topology-conf_1.2.1.bb @@ -0,0 +1,22 @@ +SUMMARY = "ALSA topology configuration files" +HOMEPAGE = "https://alsa-project.org" +BUGTRACKER = "https://alsa-project.org/wiki/Bug_Tracking" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4" + +# The tarball doesn't have any toplevel directory. The subdir option tells +# Bitbake to unpack the archive to the correct place. +SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2;subdir=${BP}" +SRC_URI[md5sum] = "7fdf5fff3f1e0603456e719f6033e922" +SRC_URI[sha256sum] = "354a43f4031c98bef1349ac722d83b2603ef439f81a1ab1eba8814c28243a9b2" + +inherit allarch + +do_install() { + install -d ${D}/usr/share/alsa + cp -r ${S}/topology ${D}/usr/share/alsa +} + +PACKAGES = "${PN}" + +FILES_${PN} = "*" diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.1.2.bb b/external/poky/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.1.2.bb new file mode 100644 index 00000000..469d1f7a --- /dev/null +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-ucm-conf_1.2.1.2.bb @@ -0,0 +1,23 @@ +SUMMARY = "ALSA Use Case Manager configuration" +HOMEPAGE = "https://alsa-project.org" +BUGTRACKER = "https://alsa-project.org/wiki/Bug_Tracking" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=20d74d74db9741697903372ad001d3b4" + +# The tarball doesn't have any toplevel directory. The subdir option tells +# Bitbake to unpack the archive to the correct place. +SRC_URI = "https://www.alsa-project.org/files/pub/lib/${BP}.tar.bz2;subdir=${BP}" +SRC_URI[md5sum] = "b7fa43cfd79df978184a6333766d2a50" +SRC_URI[sha256sum] = "ea8a86875f4cf430d49a662a04a6d6c606c5c9d67e54cb944c4d77b24554062f" + +inherit allarch + +do_install() { + install -d ${D}/usr/share/alsa + cp -r ${S}/ucm ${D}/usr/share/alsa + cp -r ${S}/ucm2 ${D}/usr/share/alsa +} + +PACKAGES = "${PN}" + +FILES_${PN} = "*" diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.6.bb b/external/poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.1.bb index fef79d9c..fef79d9c 100644 --- a/external/poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.1.6.bb +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-utils-scripts_1.2.1.bb diff --git a/external/poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.6.bb b/external/poky/meta/recipes-multimedia/alsa/alsa-utils_1.2.1.bb index b8ba0cb2..9144af62 100644 --- a/external/poky/meta/recipes-multimedia/alsa/alsa-utils_1.1.6.bb +++ b/external/poky/meta/recipes-multimedia/alsa/alsa-utils_1.2.1.bb @@ -4,7 +4,7 @@ BUGTRACKER = "http://alsa-project.org/main/index.php/Bug_Tracking" SECTION = "console/utils" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ - file://alsactl/utils.c;beginline=1;endline=20;md5=2ce7f7b6739487fb72c689d46521f958" + file://alsactl/utils.c;beginline=3;endline=18;md5=96cc06a4cebe5eb7975688ffb0e65642" DEPENDS = "alsa-lib ncurses libsamplerate0" PACKAGECONFIG ??= "udev" @@ -19,11 +19,10 @@ PACKAGECONFIG[bat] = "--enable-bat,--disable-bat,fftwf" PACKAGECONFIG[udev] = "--with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d,--with-udev-rules-dir=/unwanted/rules.d,udev" PACKAGECONFIG[manpages] = "--enable-xmlto, --disable-xmlto, xmlto-native docbook-xml-dtd4-native docbook-xsl-stylesheets-native" -SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ - " - -SRC_URI[md5sum] = "50ae75567459646b843bed78d916b002" -SRC_URI[sha256sum] = "155caecc40b2220f686f34ba3655a53e3bdbc0586adb1056733949feaaf7d36e" +# alsa-utils specified in SRC_URI due to alsa-utils-scripts recipe +SRC_URI = "https://www.alsa-project.org/files/pub/utils/alsa-utils-${PV}.tar.bz2" +SRC_URI[md5sum] = "c4628bae7632937eac2de4cf2a3de82e" +SRC_URI[sha256sum] = "0b110ba71ef41d3009db1bc4dcae0cf79efb99cb5426fa19d0312470560a2c0d" # On build machines with python-docutils (not python3-docutils !!) installed # rst2man (not rst2man.py) is detected and compile fails with @@ -57,9 +56,10 @@ PACKAGES += "${ALSA_UTILS_PKGS}" RDEPENDS_${PN} += "${ALSA_UTILS_PKGS}" FILES_${PN} = "" +ALLOW_EMPTY_alsa-utils = "1" FILES_alsa-utils-alsabat = "${bindir}/alsabat" FILES_alsa-utils-alsatplg = "${bindir}/alsatplg" -FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord" +FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord ${bindir}/axfer" FILES_alsa-utils-amixer = "${bindir}/amixer" FILES_alsa-utils-alsamixer = "${bindir}/alsamixer" FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/speaker-test/" @@ -67,10 +67,10 @@ FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bind FILES_alsa-utils-aconnect = "${bindir}/aconnect" FILES_alsa-utils-aseqnet = "${bindir}/aseqnet" FILES_alsa-utils-iecset = "${bindir}/iecset" -FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d */*/udev/rules.d ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" +FILES_alsa-utils-alsactl = "${sbindir}/alsactl */udev/rules.d/90-alsa-restore.rules */*/udev/rules.d/90-alsa-restore.rules ${systemd_unitdir} ${localstatedir}/lib/alsa ${datadir}/alsa/init/" FILES_alsa-utils-aseqdump = "${bindir}/aseqdump" FILES_alsa-utils-alsaloop = "${bindir}/alsaloop" -FILES_alsa-utils-alsaucm = "${bindir}/alsaucm" +FILES_alsa-utils-alsaucm = "${bindir}/alsaucm */udev/rules.d/89-alsa-ucm.rules */*/udev/rules.d/89-alsa-ucm.rules" SUMMARY_alsa-utils-alsabat = "Command-line sound tester for ALSA sound card driver" SUMMARY_alsa-utils-alsatplg = "Converts topology text files into binary format for kernel" @@ -89,8 +89,6 @@ SUMMARY_alsa-utils-alsaucm = "ALSA Use Case Manager" RRECOMMENDS_alsa-utils-alsactl = "alsa-states" -ALLOW_EMPTY_alsa-utils = "1" - do_install() { autotools_do_install diff --git a/external/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2018-15822.patch b/external/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2018-15822.patch deleted file mode 100644 index 7d5868a7..00000000 --- a/external/poky/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2018-15822.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 6b67d7f05918f7a1ee8fc6ff21355d7e8736aa10 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer <michael@niedermayer.cc> -Date: Sat, 28 Jul 2018 15:03:50 +0200 -Subject: [PATCH] avformat/flvenc: Check audio packet size - -Fixes: Assertion failure -Fixes: assert_flvenc.c:941_1.swf - -Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/6b67d7f05918f7a1ee8fc6ff21355d7e8736aa10] -CVE: CVE-2018-15822 - -Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg> -Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> -Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> ---- - libavformat/flvenc.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c -index 1c552a3e6b..e4863f1fc7 100644 ---- a/libavformat/flvenc.c -+++ b/libavformat/flvenc.c -@@ -883,6 +883,11 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) - int flags = -1, flags_size, ret; - int64_t cur_offset = avio_tell(pb); - -+ if (par->codec_type == AVMEDIA_TYPE_AUDIO && !pkt->size) { -+ av_log(s, AV_LOG_WARNING, "Empty audio Packet\n"); -+ return AVERROR(EINVAL); -+ } -+ - if (par->codec_id == AV_CODEC_ID_VP6F || par->codec_id == AV_CODEC_ID_VP6A || - par->codec_id == AV_CODEC_ID_VP6 || par->codec_id == AV_CODEC_ID_AAC) - flags_size = 2; --- -2.17.1 - diff --git a/external/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.0.2.bb b/external/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.2.bb index 7d1af040..d7b06410 100644 --- a/external/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.0.2.bb +++ b/external/poky/meta/recipes-multimedia/ffmpeg/ffmpeg_4.2.2.bb @@ -25,10 +25,9 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ file://mips64_cpu_detection.patch \ - file://CVE-2018-15822.patch \ " -SRC_URI[md5sum] = "ae0bfdf809306a212b4f0e6eb8d1c75e" -SRC_URI[sha256sum] = "a95c0cc9eb990e94031d2183f2e6e444cc61c99f6f182d1575c433d62afb2f97" +SRC_URI[md5sum] = "348956fc2faa57a2f79bbb84ded9fbc3" +SRC_URI[sha256sum] = "cb754255ab0ee2ea5f66f8850e1bd6ad5cac1cd855d0a2f4990fb8c668b0d29c" # Build fails when thumb is enabled: https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717 ARM_INSTRUCTION_SET_armv4 = "arm" @@ -39,13 +38,13 @@ ARM_INSTRUCTION_SET_armv6 = "arm" # libpostproc was previously packaged from a separate recipe PROVIDES = "libav libpostproc" -DEPENDS = "alsa-lib zlib libogg nasm-native" +DEPENDS = "nasm-native" inherit autotools pkgconfig -PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc \ - bzlib gpl lzma theora x264 \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv', '', d)}" +PACKAGECONFIG ??= "avdevice avfilter avcodec avformat swresample swscale postproc avresample \ + alsa bzlib gpl lzma theora x264 zlib \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xv xcb', '', d)}" # libraries to build in addition to avutil PACKAGECONFIG[avdevice] = "--enable-avdevice,--disable-avdevice" @@ -58,22 +57,28 @@ PACKAGECONFIG[postproc] = "--enable-postproc,--disable-postproc" PACKAGECONFIG[avresample] = "--enable-avresample,--disable-avresample" # features to support +PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" PACKAGECONFIG[bzlib] = "--enable-bzlib,--disable-bzlib,bzip2" +PACKAGECONFIG[fdk-aac] = "--enable-libfdk-aac --enable-nonfree,--disable-libfdk-aac,fdk-aac" PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl" PACKAGECONFIG[gsm] = "--enable-libgsm,--disable-libgsm,libgsm" PACKAGECONFIG[jack] = "--enable-indev=jack,--disable-indev=jack,jack" PACKAGECONFIG[libvorbis] = "--enable-libvorbis,--disable-libvorbis,libvorbis" PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz" +PACKAGECONFIG[mfx] = "--enable-libmfx,--disable-libmfx,intel-mediasdk" PACKAGECONFIG[mp3lame] = "--enable-libmp3lame,--disable-libmp3lame,lame" PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl" PACKAGECONFIG[sdl2] = "--enable-sdl2,--disable-sdl2,virtual/libsdl2" PACKAGECONFIG[speex] = "--enable-libspeex,--disable-libspeex,speex" -PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora" +PACKAGECONFIG[theora] = "--enable-libtheora,--disable-libtheora,libtheora libogg" PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" PACKAGECONFIG[vpx] = "--enable-libvpx,--disable-libvpx,libvpx" PACKAGECONFIG[x264] = "--enable-libx264,--disable-libx264,x264" +PACKAGECONFIG[x265] = "--enable-libx265,--disable-libx265,x265" +PACKAGECONFIG[xcb] = "--enable-libxcb,--disable-libxcb,libxcb" PACKAGECONFIG[xv] = "--enable-outdev=xv,--disable-outdev=xv,libxv" +PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" # Check codecs that require --enable-nonfree USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', '', d)}" @@ -89,10 +94,6 @@ EXTRA_OECONF = " \ --enable-pic \ --enable-shared \ --enable-pthreads \ - --disable-libxcb \ - --disable-libxcb-shm \ - --disable-libxcb-xfixes \ - --disable-libxcb-shape \ ${@bb.utils.contains('USE_NONFREE', 'yes', '--enable-nonfree', '', d)} \ \ --cross-prefix=${TARGET_PREFIX} \ @@ -103,10 +104,9 @@ EXTRA_OECONF = " \ --arch=${TARGET_ARCH} \ --target-os="linux" \ --enable-cross-compile \ - --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ - --extra-ldflags="${TARGET_LDFLAGS}" \ + --extra-cflags="${CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ + --extra-ldflags="${LDFLAGS}" \ --sysroot="${STAGING_DIR_TARGET}" \ - --enable-hardcoded-tables \ ${EXTRA_FFCONF} \ --libdir=${libdir} \ --shlibdir=${libdir} \ @@ -122,6 +122,8 @@ EXTRA_OECONF_append_linux-gnux32 = " --disable-asm" LDFLAGS_append_x86 = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" +EXTRA_OEMAKE = "V=1" + do_configure() { ${S}/configure ${EXTRA_OECONF} } diff --git a/external/poky/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch b/external/poky/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch deleted file mode 100644 index f0179168..00000000 --- a/external/poky/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 43ecb6431077ff54e9df27f71737e6e96d6c039f Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Tue, 21 Aug 2018 14:46:43 +0800 -Subject: [PATCH] From 5f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon Sep 17 - 00:00:00 2001 From: Erik de Castro Lopo <erikd@mega-nerd.com> Date: Sat, 8 - Apr 2017 18:34:49 +1000 Subject: [PATCH] stream_decoder.c: Fix a memory leak - -Leak reported by Secunia Research. - -Upstream-Status: Backport[https://git.xiph.org/?p=flac.git;a=commit; - h=4f47b63e9c971e6391590caf00a0f2a5ed612e67] - -Update patch to version 1.3.2 -CVE: CVE-2017-6888 - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - src/libFLAC/stream_decoder.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c -index d364b0c..ebf93da 100644 ---- a/src/libFLAC/stream_decoder.c -+++ b/src/libFLAC/stream_decoder.c -@@ -1759,6 +1759,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre - } - memset (obj->comments[i].entry, 0, obj->comments[i].length) ; - if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) { -+ /* Current i-th entry is bad, so we delete it. */\ -+ free (obj->comments[i].entry) ; -+ obj->comments[i].entry = NULL ; - obj->num_comments = i; - goto skip; - } --- -2.7.4 - diff --git a/external/poky/meta/recipes-multimedia/flac/flac_1.3.2.bb b/external/poky/meta/recipes-multimedia/flac/flac_1.3.3.bb index 92ef8973..cb6692ae 100644 --- a/external/poky/meta/recipes-multimedia/flac/flac_1.3.2.bb +++ b/external/poky/meta/recipes-multimedia/flac/flac_1.3.3.bb @@ -15,13 +15,12 @@ LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \ DEPENDS = "libogg" SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \ - file://CVE-2017-6888.patch " +" +SRC_URI[md5sum] = "26703ed2858c1fc9ffc05136d13daa69" +SRC_URI[sha256sum] = "213e82bd716c9de6db2f98bcadbc4c24c7e2efe8c75939a1a84e28539c4e1748" -SRC_URI[md5sum] = "454f1bfa3f93cc708098d7890d0499bd" -SRC_URI[sha256sum] = "91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f" - -CVE_PRODUCT = "libflac" +CVE_PRODUCT = "libflac flac" inherit autotools gettext @@ -34,6 +33,7 @@ EXTRA_OECONF = "--disable-oggtest \ " EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "altivec", " --enable-altivec", " --disable-altivec", d)}" +EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "vsx", " --enable-vsx", " --disable-vsx", d)}" EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "core2", " --enable-sse", "", d)}" EXTRA_OECONF += "${@bb.utils.contains("TUNE_FEATURES", "corei7", " --enable-sse", "", d)}" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch b/external/poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch deleted file mode 100644 index 1b7f1150..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/files/0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 2b0436f9a07773fae8c74df902d7024e8bfc3512 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 24 Nov 2015 16:46:27 +0200 -Subject: [PATCH] introspection.m4: prefix pkgconfig paths with - PKG_CONFIG_SYSROOT_DIR - -We can't use our tweaked introspection.m4 from gobject-introspection tarball -because gstreamer also defines INTROSPECTION_INIT in its introspection.m4, which -is later supplied to g-ir-scanner. - -Upstream-Status: Pending [review on oe-core list] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - common/m4/introspection.m4 | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/common/m4/introspection.m4 b/common/m4/introspection.m4 -index 162be57..933f979 100644 ---- a/common/m4/introspection.m4 -+++ b/common/m4/introspection.m4 -@@ -54,14 +54,14 @@ m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], - INTROSPECTION_GIRDIR= - INTROSPECTION_TYPELIBDIR= - if test "x$found_introspection" = "xyes"; then -- INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` -- INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` -- INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` -+ INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` -+ INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` -+ INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` - INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` - INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" - INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` - INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` -- INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection -+ INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection - INTROSPECTION_INIT="extern void gst_init(gint*,gchar**); gst_init(NULL,NULL);" - fi - AC_SUBST(INTROSPECTION_SCANNER) diff --git a/external/poky/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch b/external/poky/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch deleted file mode 100644 index d02d8694..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/files/add-a-target-to-compile-tests.patch +++ /dev/null @@ -1,69 +0,0 @@ -From d61414bc17cf2df019510c2908048c4cabf5cf09 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal <anuj.mittal@intel.com> -Date: Tue, 27 Feb 2018 09:27:01 +0800 -Subject: [PATCH] add targets for test installation - -Targets to make sure tests can be installed and then run on -the target. - -Upstream-Status: Inappropriate [specific to oe setup] - -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> - ---- - tests/check/Makefile.am | 27 ++++++++++++++++++++------- - 1 file changed, 20 insertions(+), 7 deletions(-) - -diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am -index 13b916d..a66786d 100644 ---- a/tests/check/Makefile.am -+++ b/tests/check/Makefile.am -@@ -8,11 +8,7 @@ REGISTRY_ENVIRONMENT = \ - GST_REGISTRY=$(CHECK_REGISTRY) - - AM_TESTS_ENVIRONMENT += \ -- GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)" \ -- $(REGISTRY_ENVIRONMENT) \ -- GST_PLUGIN_SCANNER_1_0=$(top_builddir)/libs/gst/helpers/gst-plugin-scanner \ -- GST_PLUGIN_SYSTEM_PATH_1_0= \ -- GST_PLUGIN_PATH_1_0=$(top_builddir)/plugins -+ GST_STATE_IGNORE_ELEMENTS="$(STATE_IGNORE_ELEMENTS)" - - plugindir = $(libdir)/gstreamer-@GST_API_VERSION@ - -@@ -178,6 +174,23 @@ noinst_PROGRAMS = - - TESTS = $(check_PROGRAMS) - -+install-ptest: $(TESTS) -+ @$(INSTALL) -d $(DESTDIR) -+ @for dir in `find -maxdepth 1 -type d`; do \ -+ if [ -x $$dir/.libs ]; then \ -+ $(INSTALL) -d $(DESTDIR)/$$dir; \ -+ $(INSTALL_PROGRAM) $$dir/.libs/* $(DESTDIR)/$$dir/; \ -+ fi \ -+ done -+ -+runtests: -+ @for b in $(TESTS); do \ -+ if [ -x $$b ]; then \ -+ $(AM_TESTS_ENVIRONMENT) $(SHELL) test-driver --test-name "$$b" \ -+ --log-file $$b.log --trs-file $$b.trs $$b; \ -+ fi \ -+ done -+ - noinst_HEADERS = \ - gst/capslist.h \ - gst/struct_arm.h \ -@@ -221,9 +234,9 @@ gst_gstprintf_LDADD = \ - $(LDADD) - - elements_fdsrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \ -- -DTESTFILE=\"$(top_srcdir)/configure.ac\" -+ -DTESTFILE=\"Makefile\" - elements_filesrc_CFLAGS=$(GST_OBJ_CFLAGS) $(AM_CFLAGS) \ -- -DTESTFILE=\"$(top_srcdir)/configure.ac\" -+ -DTESTFILE=\"Makefile\" - - libs_controller_LDADD = \ - $(top_builddir)/libs/gst/controller/libgstcontroller-@GST_API_VERSION@.la \ diff --git a/external/poky/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch b/external/poky/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch deleted file mode 100644 index d86c78d7..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/files/gtk-doc-tweaks.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 7018ca1c4bf26c8317e7fcd2e7e4e648195f42ca Mon Sep 17 00:00:00 2001 -From: Ross Burton <ross.burton@intel.com> -Date: Wed, 20 Dec 2017 13:03:03 +0000 -Subject: [PATCH] gstreamer: use a patch instead of sed to fix gtk-doc - -Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient -binaries instead of libtool wrapper or running them directly. - -Also substitute a bogus plugin scanner, as trying to run the real one is causing -issues during build on x86_64. - -Upstream-Status: Inappropriate -Signed-off-by: Ross Burton <ross.burton@intel.com> - ---- - common/gtk-doc.mak | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/common/gtk-doc.mak b/common/gtk-doc.mak -index 3f83491..e5cb0d1 100644 ---- a/common/gtk-doc.mak -+++ b/common/gtk-doc.mak -@@ -6,11 +6,11 @@ - if GTK_DOC_USE_LIBTOOL - GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) --GTKDOC_RUN = $(LIBTOOL) --mode=execute -+GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper - else - GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) - GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) --GTKDOC_RUN = -+GTKDOC_RUN = $(top_builddir)/gtkdoc-qemuwrapper - endif - - # We set GPATH here; this gives us semantics for GNU make -@@ -101,6 +101,7 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - GST_PLUGIN_PATH_1_0= \ - GST_REGISTRY_1_0=doc-registry.xml \ - $(GTKDOC_EXTRA_ENVIRONMENT) \ -+ GST_PLUGIN_SCANNER_1_0="$(top_builddir)/libs/gst/helpers/gst-plugin-scanner-dummy" \ - CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" \ - CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" \ - LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \ --- -2.15.1 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/files/run-ptest b/external/poky/meta/recipes-multimedia/gstreamer/files/run-ptest deleted file mode 100644 index 473d0b67..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/files/run-ptest +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -make -k runtests diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb b/external/poky/meta/recipes-multimedia/gstreamer/gst-examples_1.16.0.bb index 1d87f24f..cc7a7e78 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/gst-examples_git.bb +++ b/external/poky/meta/recipes-multimedia/gstreamer/gst-examples_1.16.0.bb @@ -4,17 +4,16 @@ LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20 DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 glib-2.0-native" -SRC_URI = "git://anongit.freedesktop.org/gstreamer/gst-examples \ +SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gst-examples.git;protocol=https \ file://0001-Make-player-examples-installable.patch \ - file://gst-player.desktop" + file://gst-player.desktop \ + " -SRCREV = "48247c6ab6807d6ae179cf653cbdc64714d3313c" -PV = "0.0.1+git${SRCPV}" -UPSTREAM_CHECK_COMMITS = "1" +SRCREV = "d953c127c1146b50d5676618299933950685dcd7" S = "${WORKDIR}/git" -inherit meson pkgconfig distro_features_check +inherit meson pkgconfig features_check ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc b/external/poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc deleted file mode 100644 index 3fdb10e4..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gst-plugins-package.inc +++ /dev/null @@ -1,56 +0,0 @@ -PACKAGESPLITFUNCS_prepend = " split_gstreamer10_packages " -PACKAGESPLITFUNCS_append = " set_metapkg_rdepends " - -python split_gstreamer10_packages () { - gst_libdir = d.expand('${libdir}/gstreamer-${LIBV}') - postinst = d.getVar('plugin_postinst') - glibdir = d.getVar('libdir') - - do_split_packages(d, glibdir, '^lib(.*)\.so\.*', 'lib%s', 'gstreamer %s library', extra_depends='', allow_links=True) - do_split_packages(d, gst_libdir, 'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer plugin for %s', postinst=postinst, extra_depends='') - do_split_packages(d, glibdir+'/girepository-1.0', 'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer typelib file for %s', postinst=postinst, extra_depends='') - do_split_packages(d, gst_libdir, 'libgst(.*)\.la$', d.expand('${PN}-%s-dev'), 'GStreamer plugin for %s (development files)', extra_depends='${PN}-dev') - do_split_packages(d, gst_libdir, 'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer plugin for %s (static development files)', extra_depends='${PN}-staticdev') -} - -python set_metapkg_rdepends () { - import os - - pn = d.getVar('PN') - metapkg = pn + '-meta' - d.setVar('ALLOW_EMPTY_' + metapkg, "1") - d.setVar('FILES_' + metapkg, "") - blacklist = [ pn, pn + '-locale', pn + '-dev', pn + '-dbg', pn + '-doc', pn + '-meta' ] - metapkg_rdepends = [] - packages = d.getVar('PACKAGES').split() - pkgdest = d.getVar('PKGDEST') - for pkg in packages[1:]: - if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.count('locale') and not pkg.count('-staticdev'): - # See if the package is empty by looking at the contents of its PKGDEST subdirectory. - # If this subdirectory is empty, then the package is. - # Empty packages do not get added to the meta package's RDEPENDS - pkgdir = os.path.join(pkgdest, pkg) - if os.path.exists(pkgdir): - dir_contents = os.listdir(pkgdir) or [] - else: - dir_contents = [] - is_empty = len(dir_contents) == 0 - if not is_empty: - metapkg_rdepends.append(pkg) - d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) - d.setVar('DESCRIPTION_' + metapkg, pn + ' meta package') -} - -# each plugin-dev depends on PN-dev, plugin-staticdev on PN-staticdev -# so we need them even when empty (like in gst-plugins-good case) -ALLOW_EMPTY_${PN} = "1" -ALLOW_EMPTY_${PN}-dev = "1" -ALLOW_EMPTY_${PN}-staticdev = "1" - -PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib" - -FILES_${PN} = "" -FILES_${PN}-apps = "${bindir}" -FILES_${PN}-glib = "${datadir}/glib-2.0" - -RRECOMMENDS_${PN} += "${PN}-meta" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch b/external/poky/meta/recipes-multimedia/gstreamer/gst-validate/0001-connect-has-a-different-signature-on-musl.patch index a0d215c5..a0d215c5 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/files/0001-connect-has-a-different-signature-on-musl.patch +++ b/external/poky/meta/recipes-multimedia/gstreamer/gst-validate/0001-connect-has-a-different-signature-on-musl.patch diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gst-validate_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gst-validate_1.16.2.bb index a4b3b465..35492fe8 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/gst-validate_1.14.4.bb +++ b/external/poky/meta/recipes-multimedia/gstreamer/gst-validate_1.16.2.bb @@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343" SRC_URI = "https://gstreamer.freedesktop.org/src/${BPN}/${BP}.tar.xz \ file://0001-connect-has-a-different-signature-on-musl.patch \ " -SRC_URI[md5sum] = "1f4fc5308695adfdc11d13046aa4888c" -SRC_URI[sha256sum] = "18dccca94bdc0bab3cddb07817bd280df7ab4abbec9a83b92620367a22d955c7" +SRC_URI[md5sum] = "688f42c52d62e8c5e506df911553fb2c" +SRC_URI[sha256sum] = "4861ccb9326200e74d98007e316b387d48dd49f072e0b78cb9d3303fdecfeeca" DEPENDS = "json-glib glib-2.0 glib-2.0-native gstreamer1.0 gstreamer1.0-plugins-base" RRECOMMENDS_${PN} = "git" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch deleted file mode 100644 index 1d99ad12..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-Disable-yasm-for-libav-when-disable-yasm.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 54bba228ea52d01fd84941d97be23c03f9862b64 Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani <dv@pseudoterminal.org> -Date: Sat, 6 Apr 2013 01:22:22 +0200 -Subject: [PATCH] Disable yasm for libav when --disable-yasm - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Shane Wang <shane.wang@intel.com> -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> ---- - configure.ac | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 22ede88..ef3c050 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -305,6 +305,12 @@ else - emblibav_configure_args="$emblibav_configure_args --enable-gpl" - fi - -+ AC_ARG_ENABLE(yasm, -+ [AC_HELP_STRING([--disable-yasm], [disable use of yasm assembler])]) -+ if test "x$enable_yasm" = "xno"; then -+ emblibav_configure_args="$emblibav_configure_args --disable-yasm" -+ fi -+ - # if we are cross-compiling, tell libav so - case $host in - *android*) --- -1.8.2 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch deleted file mode 100644 index b80d0739..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-configure-check-for-armv7ve-variant.patch +++ /dev/null @@ -1,35 +0,0 @@ -From aac5902d3c9cb35c771e760d0e487622aa2e116a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 20 Apr 2017 10:38:18 -0700 -Subject: [PATCH] configure: check for armv7ve variant - -OE passes -mcpu and -march via cmdline and if -package tries to detect one of it own then it -should be compatible otherwise, newer gcc7+ will -error out - -Check for relevant preprocessor macro to determine -armv7ve architecture - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - gst-libs/ext/libav/configure | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/gst-libs/ext/libav/configure b/gst-libs/ext/libav/configure -index 4a5e477..727818e 100755 ---- a/gst-libs/ext/libav/configure -+++ b/gst-libs/ext/libav/configure -@@ -4295,6 +4295,7 @@ elif enabled arm; then - elif check_arm_arch 6Z; then echo armv6z - elif check_arm_arch 6ZK; then echo armv6zk - elif check_arm_arch 6T2; then echo armv6t2 -+ elif check_arm_arch EXT_IDIV; then echo armv7ve - elif check_arm_arch 7; then echo armv7 - elif check_arm_arch 7A 7_A; then echo armv7-a - elif check_arm_arch 7S; then echo armv7-a --- -2.12.2 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch deleted file mode 100644 index 120c0798..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/0001-fix-host-contamination.patch +++ /dev/null @@ -1,36 +0,0 @@ -From c1700f867f876ee33c130a8e28b688e2b1d89663 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal <anuj.mittal@intel.com> -Date: Wed, 11 Apr 2018 17:14:55 +0800 -Subject: [PATCH] Prevent host contamination - -Remove reference to host $(libdir) from .la files. - -Upstream-Status: Inappropriate [cross-compile specific] - -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - gst-libs/ext/Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gst-libs/ext/Makefile.am b/gst-libs/ext/Makefile.am -index 6cdc048..a19d255 100644 ---- a/gst-libs/ext/Makefile.am -+++ b/gst-libs/ext/Makefile.am -@@ -49,7 +49,7 @@ echo " GEN $1.la" && \ - echo "library_names=''" && \ - echo "old_library='$1.a'" && \ - echo "inherited_linker_flags=''" && \ -- echo "dependency_libs=' -L$(libdir) $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \ -+ echo "dependency_libs=' -L $(if $2,$(foreach dep,$2,$(abs_builddir)/$(dep).la)) $(call find_library_la,$3 $(LIBM),$(LDFLAGS)) '" && \ - echo "weak_library_names=''" && \ - echo "current=" && \ - echo "age=" && \ -@@ -58,7 +58,7 @@ echo " GEN $1.la" && \ - echo "shouldnotlink=no" && \ - echo "dlopen=''" && \ - echo "dlpreopen=''" && \ -- echo "libdir='$(libdir)'") > $1.la -+ echo "libdir=''") > $1.la - endef - - libavutil.la: diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch deleted file mode 100644 index 7a0b4488..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/mips64_cpu_detection.patch +++ /dev/null @@ -1,32 +0,0 @@ -It will add -mips64r6 and -mips64r2 to cmdline which will -cause conflicts - -in OE we user mips32r2 and mips64r2 for mips arch versions -so there is no benefit of detecting it automatically by -poking at tools especially in cross env - -Fixes errors like - -linking -mnan=2008 module with previous -mnan=legacy modules -failed to merge target specific data of file - --Khem -Upstream-Status: Inappropriate [OE-Specific] - -Index: gst-libav-1.10.1/gst-libs/ext/libav/configure -=================================================================== ---- gst-libav-1.10.1.orig/gst-libs/ext/libav/configure -+++ gst-libav-1.10.1/gst-libs/ext/libav/configure -@@ -5269,12 +5269,9 @@ elif enabled mips; then - - # Enable minimum ISA based on selected options - if enabled mips64; then -- enabled mips64r6 && check_inline_asm_flags mips64r6 '"dlsa $0, $0, $0, 1"' '-mips64r6' - enabled mips64r2 && check_inline_asm_flags mips64r2 '"dext $0, $0, 0, 1"' '-mips64r2' - disabled mips64r6 && disabled mips64r2 && check_inline_asm_flags mips64r1 '"daddi $0, $0, 0"' '-mips64' - else -- enabled mips32r6 && check_inline_asm_flags mips32r6 '"aui $0, $0, 0"' '-mips32r6' -- enabled mips32r5 && check_inline_asm_flags mips32r5 '"eretnc"' '-mips32r5' - enabled mips32r2 && check_inline_asm_flags mips32r2 '"ext $0, $0, 0, 1"' '-mips32r2' - disabled mips32r6 && disabled mips32r5 && disabled mips32r2 && check_inline_asm_flags mips32r1 '"addi $0, $0, 0"' '-mips32' - fi diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch deleted file mode 100644 index 36abf860..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav/workaround-to-build-gst-libav-for-i586-with-gcc.patch +++ /dev/null @@ -1,26 +0,0 @@ -Description: Workaround to build libav for i586 with gcc 4.9.2 by avoiding memset -Author: Bernhard Übelacker <bernhardu@vr-web.de> - ---- -Bug-Debian: https://bugs.debian.org/783082 -Last-Update: 2015-04-28 - -Upstream-Status: Backport [debian] - -Signed-off-by: Robert Yang <liezhi.yang@windriver.com> - ---- gst-libav-1.4.5.orig/gst-libs/ext/libav/libavcodec/h264_cabac.c -+++ gst-libav-1.4.5/gst-libs/ext/libav/libavcodec/h264_cabac.c -@@ -2020,7 +2020,11 @@ decode_intra_mb: - // In deblocking, the quantizer is 0 - h->cur_pic.qscale_table[mb_xy] = 0; - // All coeffs are present -- memset(h->non_zero_count[mb_xy], 16, 48); -+ /*memset(h->non_zero_count[mb_xy], 16, 48);*/ -+ /* avoiding this memset because it leads at least with gcc4.9.2 to error: 'asm' operand has impossible constraints */ -+ for (size_t i = 0; i < 48; i++) { -+ ( (unsigned char*)(h->non_zero_count[mb_xy]) ) [i] = 16; -+ } - h->cur_pic.mb_type[mb_xy] = mb_type; - sl->last_qscale_diff = 0; - return 0; diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.4.bb deleted file mode 100644 index 5c9c372f..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.14.4.bb +++ /dev/null @@ -1,70 +0,0 @@ -SUMMARY = "Libav-based GStreamer 1.x plugin" -HOMEPAGE = "http://gstreamer.freedesktop.org/" -SECTION = "multimedia" - -LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )" -LICENSE_FLAGS = "commercial" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c \ - file://gst-libs/ext/libav/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://gst-libs/ext/libav/COPYING.GPLv3;md5=d32239bcb673463ab874e80d47fae504 \ - file://gst-libs/ext/libav/COPYING.LGPLv2.1;md5=bd7a443320af8c812e4c18d1b79df004 \ - file://gst-libs/ext/libav/COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" - -SRC_URI = "http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \ - file://0001-Disable-yasm-for-libav-when-disable-yasm.patch \ - file://workaround-to-build-gst-libav-for-i586-with-gcc.patch \ - file://mips64_cpu_detection.patch \ - file://0001-configure-check-for-armv7ve-variant.patch \ - file://0001-fix-host-contamination.patch \ - " -SRC_URI[md5sum] = "58342db11dbb201a66a62577dcf7bab5" -SRC_URI[sha256sum] = "dfd78591901df7853eab7e56a86c34a1b03635da0d3d56b89aa577f1897865da" - -S = "${WORKDIR}/gst-libav-${PV}" - -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base zlib bzip2 xz" - -inherit autotools pkgconfig upstream-version-is-even gtk-doc - -# CAUTION: Using the system libav is not recommended. Since the libav API is changing all the time, -# compilation errors (and other, more subtle bugs) can happen. It is usually better to rely on the -# libav copy included in the gst-libav package. -PACKAGECONFIG ??= "orc yasm" - -PACKAGECONFIG[gpl] = "--enable-gpl,--disable-gpl," -PACKAGECONFIG[libav] = "--with-system-libav,,libav" -PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc" -PACKAGECONFIG[yasm] = "--enable-yasm,--disable-yasm,nasm-native" -PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind" - -GSTREAMER_1_0_DEBUG ?= "--disable-debug" - -LIBAV_EXTRA_CONFIGURE = "--with-libav-extra-configure" - -LIBAV_EXTRA_CONFIGURE_COMMON_ARG = "--target-os=linux \ - --cc='${CC}' --as='${CC}' --ld='${CC}' --nm='${NM}' --ar='${AR}' \ - --ranlib='${RANLIB}' \ - ${GSTREAMER_1_0_DEBUG} \ - --cross-prefix='${HOST_PREFIX}'" - -# Disable assembly optimizations for X32, as this libav lacks the support -PACKAGECONFIG_remove_linux-gnux32 = "yasm" -LIBAV_EXTRA_CONFIGURE_COMMON_ARG_append_linux-gnux32 = " --disable-asm" - -LIBAV_EXTRA_CONFIGURE_COMMON = \ -'${LIBAV_EXTRA_CONFIGURE}="${LIBAV_EXTRA_CONFIGURE_COMMON_ARG}"' - -EXTRA_OECONF = "${LIBAV_EXTRA_CONFIGURE_COMMON}" - -FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" -FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" - -# http://errors.yoctoproject.org/Errors/Details/20493/ -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" - -# ffmpeg/libav disables PIC on some platforms (e.g. x86-32) -INSANE_SKIP_${PN} = "textrel" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.2.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.2.bb new file mode 100644 index 00000000..2fdefc92 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-libav_1.16.2.bb @@ -0,0 +1,35 @@ +SUMMARY = "Libav-based GStreamer 1.x plugin" +HOMEPAGE = "http://gstreamer.freedesktop.org/" +SECTION = "multimedia" + +LICENSE = "GPLv2+ & LGPLv2+ & ( (GPLv2+ & LGPLv2.1+) | (GPLv3+ & LGPLv3+) )" +LICENSE_FLAGS = "commercial" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ + file://ext/libav/gstav.h;beginline=1;endline=18;md5=a752c35267d8276fd9ca3db6994fca9c" + +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${PV}.tar.xz \ + " +SRC_URI[md5sum] = "eacebd0136ede3a9bd3672eeb338806b" +SRC_URI[sha256sum] = "c724f612700c15a933c7356fbeabb0bb9571fb5538f8b1b54d4d2d94188deef2" + +S = "${WORKDIR}/gst-libav-${PV}" + +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base ffmpeg" + +inherit meson pkgconfig upstream-version-is-even + +FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" +FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" + +delete_unused_libav_copy() { + # When building with meson, the internal libav copy is not used. + # It is only present for legacy autotools based builds. In future + # GStreamer versions, the autotools scripts will be gone, and so + # will this internal copy. Until then, it will be present. In order + # to make sure this copy is not included in the -src package, just + # manually delete the copy. + rm -rf "${S}/gst-libs/ext/libav/" +} + +do_unpack[postfuncs] += " delete_unused_libav_copy" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.2.bb index 39ca1e38..f1bdbd23 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.14.4.bb +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-omx_1.16.2.bb @@ -7,23 +7,21 @@ LICENSE_FLAGS = "commercial" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ file://omx/gstomx.h;beginline=1;endline=21;md5=5c8e1fca32704488e76d2ba9ddfa935f" -SRC_URI = "http://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" +SRC_URI = "https://gstreamer.freedesktop.org/src/gst-omx/gst-omx-${PV}.tar.xz" -SRC_URI[md5sum] = "81e67ea03be607b7c548ce911598d754" -SRC_URI[sha256sum] = "969870e75c1f75c96f8783530e2c2932fc3afbfd976eb0c466f51dae268ea3d4" +SRC_URI[md5sum] = "6362786d2b6cce34de08c86b7847f782" +SRC_URI[sha256sum] = "11ed411a2eba75610d72331eeb14ff05e2df28f4fd05cb69225a88bec6d27439" S = "${WORKDIR}/gst-omx-${PV}" -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad virtual/libomxil" -inherit autotools pkgconfig gettext gtk-doc upstream-version-is-even - -acpaths = "-I ${S}/common/m4 -I ${S}/m4" +inherit meson pkgconfig upstream-version-is-even GSTREAMER_1_0_OMX_TARGET ?= "bellagio" GSTREAMER_1_0_OMX_CORE_NAME ?= "${libdir}/libomxil-bellagio.so.0" -EXTRA_OECONF += "--disable-valgrind --with-omx-target=${GSTREAMER_1_0_OMX_TARGET}" +EXTRA_OEMESON += "-Dtarget=${GSTREAMER_1_0_OMX_TARGET}" python __anonymous () { omx_target = d.getVar("GSTREAMER_1_0_OMX_TARGET") @@ -37,21 +35,13 @@ python __anonymous () { d.setVar("PACKAGE_ARCH", d.getVar("MACHINE_ARCH")) } -delete_pkg_m4_file() { - # Delete m4 files which we provide patched versions of but will be ignored - # if these exist - rm -f "${S}/common/m4/pkg.m4" - rm -f "${S}/common/m4/gtk-doc.m4" -} -do_configure[prefuncs] += "delete_pkg_m4_file" - set_omx_core_name() { sed -i -e "s;^core-name=.*;core-name=${GSTREAMER_1_0_OMX_CORE_NAME};" "${D}${sysconfdir}/xdg/gstomx.conf" } do_install[postfuncs] += " set_omx_core_name " FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la" FILES_${PN}-staticdev += "${libdir}/gstreamer-1.0/*.a" -RDEPENDS_${PN} = "libomxil" +VIRTUAL-RUNTIME_libomxil ?= "libomxil" +RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_libomxil}" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch deleted file mode 100644 index 05b991a8..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 7d8e8b8bcce34d01fc7ad7285b4eb17ad8949399 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal <anuj.mittal@intel.com> -Date: Wed, 11 Apr 2018 11:06:39 +0800 -Subject: [PATCH] Makefile.am: don't hardcode libtool name when running - introspection tools - -Upstream-Status: Pending [review on oe-core list] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> -Signed-off-by: Maxin B. John <maxin.john@intel.com> ---- - gst-libs/gst/insertbin/Makefile.am | 2 +- - gst-libs/gst/mpegts/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am -index 1f8ea30..4b98ef6 100644 ---- a/gst-libs/gst/insertbin/Makefile.am -+++ b/gst-libs/gst/insertbin/Makefile.am -@@ -45,7 +45,7 @@ GstInsertBin-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstinsertbin-@GS - --library=libgstinsertbin-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-insertbin-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am -index f264e33..9934a4d 100644 ---- a/gst-libs/gst/mpegts/Makefile.am -+++ b/gst-libs/gst/mpegts/Makefile.am -@@ -82,7 +82,7 @@ GstMpegts-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstmpegts-@GST_API_ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-video-@GST_API_VERSION@` \ - --library=libgstmpegts-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-video-@GST_API_VERSION@ \ - --pkg-export gstreamer-mpegts-@GST_API_VERSION@ \ --- -2.7.4 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 00000000..13218520 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch @@ -0,0 +1,36 @@ +From 97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> +Date: Fri, 18 Oct 2019 00:39:12 +0100 +Subject: [PATCH 1/2] meson: build gir even when cross-compiling if + introspection was enabled explicitly + +This can be made to work in certain circumstances when +cross-compiling, so default to not building g-i stuff +when cross-compiling, but allow it if introspection was +enabled explicitly via -Dintrospection=enabled. + +See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. + +Upstream-Status: Backport [97a4d0cd7de8cfbf983acc7e37ba2f8fb73c3e19] + +Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 67aeeb4d0..7b3314bd9 100644 +--- a/meson.build ++++ b/meson.build +@@ -411,7 +411,7 @@ python3 = import('python').find_installation() + + gir = find_program('g-ir-scanner', required : get_option('introspection')) + gnome = import('gnome') +-build_gir = gir.found() and not meson.is_cross_build() ++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ + 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ + 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \ +-- +2.17.1 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch index 357fd780..32261279 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/avoid-including-sys-poll.h-directly.patch @@ -16,7 +16,7 @@ diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index b93255f..49f145a 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c -@@ -93,7 +93,7 @@ +@@ -97,7 +97,7 @@ #include <gst/gst.h> #include <gst/glib-compat-private.h> #include <sys/ioctl.h> diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch deleted file mode 100644 index ad863298..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/configure-allow-to-disable-libssh2.patch +++ /dev/null @@ -1,61 +0,0 @@ -From f59c5269f92d59a5296cbfeeb682d42095cd88ad Mon Sep 17 00:00:00 2001 -From: Wenzong Fan <wenzong.fan@windriver.com> -Date: Thu, 18 Sep 2014 02:24:07 -0400 -Subject: [PATCH] gstreamer1.0-plugins-bad: allow to disable libssh2 - -libssh2 is automatically linked to if present, this undetermined -dependency may cause build errors like: - - .../x86_64-poky-linux/4.9.0/ld: cannot find -lssh2 - -libssh2 isn't an oe-core recipe, so allow to disable it from -configure. - -Upstream-Status: Pending - -Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> ---- - configure.ac | 23 +++++++++++++++++------ - 1 file changed, 17 insertions(+), 6 deletions(-) - -Index: gst-plugins-bad-1.12.3/configure.ac -=================================================================== ---- gst-plugins-bad-1.12.3.orig/configure.ac -+++ gst-plugins-bad-1.12.3/configure.ac -@@ -2139,6 +2139,15 @@ AG_GST_CHECK_FEATURE(CHROMAPRINT, [chrom - ]) - - dnl *** Curl *** -+AC_ARG_ENABLE([libssh2], -+ [ --enable-libssh2 enable LIBSSH2 support @<:@default=auto@:>@], -+ [case "${enableval}" in -+ yes) NEED_SSH2=yes ;; -+ no) NEED_SSH2=no ;; -+ auto) NEED_SSH2=auto ;; -+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-libssh2]) ;; -+ esac],[NEED_SSH2=auto]) -+ - translit(dnm, m, l) AM_CONDITIONAL(USE_CURL, true) - AG_GST_CHECK_FEATURE(CURL, [Curl plugin], curl, [ - PKG_CHECK_MODULES(CURL, libcurl >= 7.35.0, [ -@@ -2161,12 +2170,14 @@ AG_GST_CHECK_FEATURE(CURL, [Curl plugin] - ]) - AC_SUBST(CURL_CFLAGS) - AC_SUBST(CURL_LIBS) -- PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ -- HAVE_SSH2="yes" -- AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) -- ], [ -- HAVE_SSH2="no" -- ]) -+ if test "x$NEED_SSH2" != "xno"; then -+ PKG_CHECK_MODULES(SSH2, libssh2 >= 1.4.3, [ -+ HAVE_SSH2="yes" -+ AC_DEFINE(HAVE_SSH2, 1, [Define if libssh2 is available]) -+ ], [ -+ HAVE_SSH2="no" -+ ]) -+ fi - AM_CONDITIONAL(USE_SSH2, test "x$HAVE_SSH2" = "xyes") - AC_SUBST(SSH2_CFLAGS) - AC_SUBST(SSH2_LIBS) diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch index 20c9ffcd..2d5389d9 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/ensure-valid-sentinels-for-gst_structure_get-etc.patch @@ -27,7 +27,7 @@ Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp =================================================================== --- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklink.cpp +++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp -@@ -476,7 +476,7 @@ gst_decklink_mode_get_structure (GstDeck +@@ -617,7 +617,7 @@ gst_decklink_mode_get_structure (GstDeck "pixel-aspect-ratio", GST_TYPE_FRACTION, mode->par_n, mode->par_d, "interlace-mode", G_TYPE_STRING, mode->interlaced ? "interleaved" : "progressive", @@ -36,7 +36,7 @@ Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklink.cpp if (input && mode->interlaced) { if (mode->tff) -@@ -489,16 +489,16 @@ gst_decklink_mode_get_structure (GstDeck +@@ -632,16 +632,16 @@ gst_decklink_mode_get_structure (GstDeck case bmdFormat8BitYUV: /* '2vuy' */ gst_structure_set (s, "format", G_TYPE_STRING, "UYVY", "colorimetry", G_TYPE_STRING, mode->colorimetry, @@ -61,7 +61,7 @@ Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp =================================================================== --- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkaudiosrc.cpp +++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkaudiosrc.cpp -@@ -322,7 +322,7 @@ gst_decklink_audio_src_set_caps (GstBase +@@ -387,7 +387,7 @@ gst_decklink_audio_src_set_caps (GstBase g_mutex_unlock (&self->input->lock); if (videosrc) { @@ -74,7 +74,7 @@ Index: gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp =================================================================== --- gst-plugins-bad-1.10.2.orig/sys/decklink/gstdecklinkvideosink.cpp +++ gst-plugins-bad-1.10.2/sys/decklink/gstdecklinkvideosink.cpp -@@ -163,7 +163,7 @@ reset_framerate (GstCapsFeatures * featu +@@ -285,7 +285,7 @@ reset_framerate (GstCapsFeatures * featu gpointer user_data) { gst_structure_set (structure, "framerate", GST_TYPE_FRACTION_RANGE, 0, 1, diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch index 5ce57714..73681f10 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch @@ -14,7 +14,7 @@ diff --git a/gst-libs/gst/codecparsers/gstvc1parser.c b/gst-libs/gst/codecparser index fd16ee0..ddb890c 100644 --- a/gst-libs/gst/codecparsers/gstvc1parser.c +++ b/gst-libs/gst/codecparsers/gstvc1parser.c -@@ -1729,7 +1729,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size, +@@ -1730,7 +1730,7 @@ gst_vc1_parse_sequence_layer (const guint8 * data, gsize size, GstVC1SeqLayer * seqlayer) { guint32 tmp; diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch new file mode 100644 index 00000000..4b6591c0 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch @@ -0,0 +1,49 @@ +From f41caae14b618ab815ede3c408e7482b00316e3e Mon Sep 17 00:00:00 2001 +From: Andrey Zhizhikin <andrey.z@gmail.com> +Date: Mon, 27 Jan 2020 10:22:35 +0000 +Subject: [PATCH] opencv: resolve missing opencv data dir in yocto build + +When Yocto build is performed, opencv searches for data dir using simple +'test' command, this fails because pkg-config provides an absolute +path on the target which needs to be prepended by PKG_CONFIG_SYSROOT_DIR +in order for the 'test' utility to pick up the absolute path. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Andrey Zhizhikin <andrey.z@gmail.com> +--- + ext/opencv/meson.build | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/ext/opencv/meson.build b/ext/opencv/meson.build +index f38b55dfe..a26403482 100644 +--- a/ext/opencv/meson.build ++++ b/ext/opencv/meson.build +@@ -78,20 +78,21 @@ else + endif + + if opencv_found ++ pkgconf_sysroot = run_command(python3, '-c', 'import os; print(os.environ.get("PKG_CONFIG_SYSROOT_DIR"))').stdout().strip() + opencv_prefix = opencv_dep.get_pkgconfig_variable('prefix') + gstopencv_cargs += ['-DOPENCV_PREFIX="' + opencv_prefix + '"'] + + # Check the data dir used by opencv for its xml data files + # Use prefix from pkg-config to be compatible with cross-compilation +- r = run_command('test', '-d', opencv_prefix + '/share/opencv') ++ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv') + if r.returncode() == 0 + gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv"' + else +- r = run_command('test', '-d', opencv_prefix + '/share/OpenCV') ++ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/OpenCV') + if r.returncode() == 0 + gstopencv_cargs += '-DOPENCV_PATH_NAME="OpenCV"' + else +- r = run_command('test', '-d', opencv_prefix + '/share/opencv4') ++ r = run_command('test', '-d', pkgconf_sysroot + opencv_prefix + '/share/opencv4') + if r.returncode() == 0 + gstopencv_cargs += '-DOPENCV_PATH_NAME="opencv4"' + else +-- +2.17.1 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.4.bb deleted file mode 100644 index 8c7c235f..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.14.4.bb +++ /dev/null @@ -1,148 +0,0 @@ -require gstreamer1.0-plugins.inc - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ - file://configure-allow-to-disable-libssh2.patch \ - file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \ - file://avoid-including-sys-poll.h-directly.patch \ - file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ - file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \ -" -SRC_URI[md5sum] = "5d20a91d027708abcf924f6c1279dd25" -SRC_URI[sha256sum] = "910b4e0e2e897e8b6d06767af1779d70057c309f67292f485ff988d087aa0de5" - -S = "${WORKDIR}/gst-plugins-bad-${PV}" - -LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ - file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 " - -DEPENDS += "gstreamer1.0-plugins-base jpeg" - -inherit gettext bluetooth - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ - bz2 curl dash dtls hls rsvg sbc smoothstreaming sndfile ttml uvch264 webp \ -" - -# the gl packageconfig enables OpenGL elements that haven't been ported -# to -base yet. They depend on the gstgl library in -base, so we do -# not add GL dependencies here, since these are taken care of in -base. - -PACKAGECONFIG[assrender] = "--enable-assrender,--disable-assrender,libass" -PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}" -PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2" -PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl" -PACKAGECONFIG[dash] = "--enable-dash,--disable-dash,libxml2" -PACKAGECONFIG[dc1394] = "--enable-dc1394,--disable-dc1394,libdc1394" -PACKAGECONFIG[directfb] = "--enable-directfb,--disable-directfb,directfb" -PACKAGECONFIG[dtls] = "--enable-dtls,--disable-dtls,openssl" -PACKAGECONFIG[faac] = "--enable-faac,--disable-faac,faac" -PACKAGECONFIG[faad] = "--enable-faad,--disable-faad,faad2" -PACKAGECONFIG[flite] = "--enable-flite,--disable-flite,flite-alsa" -PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth" -PACKAGECONFIG[hls] = "--enable-hls --with-hls-crypto=nettle,--disable-hls,nettle" -PACKAGECONFIG[gl] = "--enable-gl,--disable-gl," -PACKAGECONFIG[kms] = "--enable-kms,--disable-kms,libdrm" -PACKAGECONFIG[libde265] = "--enable-libde265,--disable-libde265,libde265" -PACKAGECONFIG[libmms] = "--enable-libmms,--disable-libmms,libmms" -PACKAGECONFIG[libssh2] = "--enable-libssh2,--disable-libssh2,libssh2" -PACKAGECONFIG[lcms2] = "--enable-lcms2,--disable-lcms2,lcms" -PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug" -PACKAGECONFIG[msdk] = "--enable-msdk,--disable-msdk,intel-mediasdk" -PACKAGECONFIG[neon] = "--enable-neon,--disable-neon,neon" -PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft" -PACKAGECONFIG[opencv] = "--enable-opencv,--disable-opencv,opencv" -PACKAGECONFIG[openh264] = "--enable-openh264,--disable-openh264,openh264" -PACKAGECONFIG[openjpeg] = "--enable-openjpeg,--disable-openjpeg,openjpeg" -PACKAGECONFIG[openmpt] = "--enable-openmpt,--disable-openmpt,libopenmpt" -# the opus encoder/decoder elements are now in the -base package, -# but the opus parser remains in -bad -PACKAGECONFIG[opusparse] = "--enable-opus,--disable-opus,libopus" -PACKAGECONFIG[resindvd] = "--enable-resindvd,--disable-resindvd,libdvdread libdvdnav" -PACKAGECONFIG[rsvg] = "--enable-rsvg,--disable-rsvg,librsvg" -PACKAGECONFIG[rtmp] = "--enable-rtmp,--disable-rtmp,rtmpdump" -PACKAGECONFIG[sbc] = "--enable-sbc,--disable-sbc,sbc" -PACKAGECONFIG[smoothstreaming] = "--enable-smoothstreaming,--disable-smoothstreaming,libxml2" -PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1" -PACKAGECONFIG[srtp] = "--enable-srtp,--disable-srtp,libsrtp" -PACKAGECONFIG[tinyalsa] = "--enable-tinyalsa,--disable-tinyalsa,tinyalsa" -PACKAGECONFIG[ttml] = "--enable-ttml,--disable-ttml,libxml2 pango cairo" -PACKAGECONFIG[uvch264] = "--enable-uvch264,--disable-uvch264,libusb1 libgudev" -PACKAGECONFIG[voaacenc] = "--enable-voaacenc,--disable-voaacenc,vo-aacenc" -PACKAGECONFIG[voamrwbenc] = "--enable-voamrwbenc,--disable-voamrwbenc,vo-amrwbenc" -PACKAGECONFIG[vulkan] = "--enable-vulkan,--disable-vulkan,vulkan" -PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm" -PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp" -PACKAGECONFIG[webrtc] = "--enable-webrtc,--disable-webrtc,libnice" -PACKAGECONFIG[webrtcdsp] = "--enable-webrtcdsp,--disable-webrtcdsp,webrtc-audio-processing" - -# these plugins have no corresponding library in OE-core or meta-openembedded: -# openni2 winks direct3d directsound winscreencap acm apple_media iqa -# android_media avc bs2b chromaprint daala dts fdkaac gme gsm kate ladspa -# lv2 mpeg2enc mplex musepack nvenc ofa opensles soundtouch -# spandsp spc teletextdec vdpau wasapi x265 zbar - -EXTRA_OECONF += " \ - --enable-decklink \ - --enable-dvb \ - --enable-fbdev \ - --enable-ipcpipeline \ - --enable-netsim \ - --enable-shm \ - --enable-vcd \ - --disable-acm \ - --disable-android_media \ - --disable-aom \ - --disable-apple_media \ - --disable-avc \ - --disable-bs2b \ - --disable-chromaprint \ - --disable-daala \ - --disable-direct3d \ - --disable-directsound \ - --disable-dts \ - --disable-fdk_aac \ - --disable-gme \ - --disable-gsm \ - --disable-iqa \ - --disable-kate \ - --disable-ladspa \ - --disable-lv2 \ - --disable-mpeg2enc \ - --disable-mplex \ - --disable-musepack \ - --disable-nvenc \ - --disable-ofa \ - --disable-openexr \ - --disable-openni2 \ - --disable-opensles \ - --disable-soundtouch \ - --disable-spandsp \ - --disable-spc \ - --disable-srt \ - --disable-teletextdec \ - --disable-vdpau \ - --disable-wasapi \ - --disable-wildmidi \ - --disable-winks \ - --disable-winscreencap \ - --disable-x265 \ - --disable-zbar \ - ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--disable-yadif", "", d)} \ -" - -export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" - -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" - -FILES_${PN}-freeverb += "${datadir}/gstreamer-${LIBV}/presets/GstFreeverb.prs" -FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/${LIBV}/opencv*" -FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-${LIBV}/presets/GstVoAmrwbEnc.prs" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bb new file mode 100644 index 00000000..99176b25 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.16.2.bb @@ -0,0 +1,147 @@ +require gstreamer1.0-plugins-common.inc + +SRC_URI = " \ + https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \ + file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ + file://fix-maybe-uninitialized-warnings-when-compiling-with-Os.patch \ + file://avoid-including-sys-poll.h-directly.patch \ + file://ensure-valid-sentinels-for-gst_structure_get-etc.patch \ + file://opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \ +" +SRC_URI[md5sum] = "ccc7404230afddec723bbdb63c89feec" +SRC_URI[sha256sum] = "f1cb7aa2389569a5343661aae473f0a940a90b872001824bc47fa8072a041e74" + +S = "${WORKDIR}/gst-plugins-bad-${PV}" + +LICENSE = "GPLv2+ & LGPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=73a5855a8119deb017f5f13cf327095d \ + file://COPYING.LIB;md5=21682e4e8fea52413fd26c60acb907e5 " + +DEPENDS += "gstreamer1.0-plugins-base" + +inherit gobject-introspection + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ + bz2 closedcaption curl dash dtls hls rsvg sbc smoothstreaming sndfile \ + ttml uvch264 webp \ +" + +PACKAGECONFIG[assrender] = "-Dassrender=enabled,-Dassrender=disabled,libass" +PACKAGECONFIG[bluez] = "-Dbluez=enabled,-Dbluez=disabled,bluez5" +PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2" +PACKAGECONFIG[closedcaption] = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo" +PACKAGECONFIG[curl] = "-Dcurl=enabled,-Dcurl=disabled,curl" +PACKAGECONFIG[dash] = "-Ddash=enabled,-Ddash=disabled,libxml2" +PACKAGECONFIG[dc1394] = "-Ddc1394=enabled,-Ddc1394=disabled,libdc1394" +PACKAGECONFIG[directfb] = "-Ddirectfb=enabled,-Ddirectfb=disabled,directfb" +PACKAGECONFIG[dtls] = "-Ddtls=enabled,-Ddtls=disabled,openssl" +PACKAGECONFIG[faac] = "-Dfaac=enabled,-Dfaac=disabled,faac" +PACKAGECONFIG[faad] = "-Dfaad=enabled,-Dfaad=disabled,faad2" +PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" +PACKAGECONFIG[hls] = "-Dhls=enabled -Dhls-crypto=nettle,-Dhls=disabled,nettle" +# the gl packageconfig enables OpenGL elements that haven't been ported +# to -base yet. They depend on the gstgl library in -base, so we do +# not add GL dependencies here, since these are taken care of in -base. +PACKAGECONFIG[gl] = "-Dgl=enabled,-Dgl=disabled," +PACKAGECONFIG[kms] = "-Dkms=enabled,-Dkms=disabled,libdrm" +PACKAGECONFIG[libde265] = "-Dlibde265=enabled,-Dlibde265=disabled,libde265" +PACKAGECONFIG[libmms] = "-Dlibmms=enabled,-Dlibmms=disabled,libmms" +PACKAGECONFIG[libssh2] = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2" +PACKAGECONFIG[lcms2] = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms" +PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" +PACKAGECONFIG[msdk] = "-Dmsdk=enabled,-Dmsdk=disabled,intel-mediasdk" +PACKAGECONFIG[neon] = "-Dneon=enabled,-Dneon=disabled,neon" +PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" +PACKAGECONFIG[opencv] = "-Dopencv=enabled,-Dopencv=disabled,opencv" +PACKAGECONFIG[openh264] = "-Dopenh264=enabled,-Dopenh264=disabled,openh264" +PACKAGECONFIG[openjpeg] = "-Dopenjpeg=enabled,-Dopenjpeg=disabled,openjpeg" +PACKAGECONFIG[openmpt] = "-Dopenmpt=enabled,-Dopenmpt=disabled,libopenmpt" +# the opus encoder/decoder elements are now in the -base package, +# but the opus parser remains in -bad +PACKAGECONFIG[opusparse] = "-Dopus=enabled,-Dopus=disabled,libopus" +PACKAGECONFIG[resindvd] = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav" +PACKAGECONFIG[rsvg] = "-Drsvg=enabled,-Drsvg=disabled,librsvg" +PACKAGECONFIG[rtmp] = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump" +PACKAGECONFIG[sbc] = "-Dsbc=enabled,-Dsbc=disabled,sbc" +PACKAGECONFIG[sctp] = "-Dsctp=enabled,-Dsctp=disabled,usrsctp" +PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2" +PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" +PACKAGECONFIG[srtp] = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp" +PACKAGECONFIG[tinyalsa] = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa" +PACKAGECONFIG[ttml] = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo" +PACKAGECONFIG[uvch264] = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev" +PACKAGECONFIG[vdpau] = "-Dvdpau=enabled,-Dvdpau=disabled,libvdpau" +PACKAGECONFIG[voaacenc] = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc" +PACKAGECONFIG[voamrwbenc] = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc" +PACKAGECONFIG[vulkan] = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader" +PACKAGECONFIG[wayland] = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm" +PACKAGECONFIG[webp] = "-Dwebp=enabled,-Dwebp=disabled,libwebp" +PACKAGECONFIG[webrtc] = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice" +PACKAGECONFIG[webrtcdsp] = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing" +PACKAGECONFIG[zbar] = "-Dzbar=enabled,-Dzbar=disabled,zbar" + +# these plugins currently have no corresponding library in OE-core or meta-openembedded: +# aom androidmedia applemedia bs2b chromaprint d3dvideosink +# directsound dts fdkaac gme gsm iq kate ladspa lv2 mpeg2enc +# mplex musepack nvdec nvenc ofa openexr openni2 opensles +# soundtouch spandsp srt teletext wasapi wildmidi winks +# winscreencap wpe x265 + +EXTRA_OEMESON += " \ + -Ddecklink=enabled \ + -Ddvb=enabled \ + -Dfbdev=enabled \ + -Dipcpipeline=enabled \ + -Dnetsim=enabled \ + -Dshm=enabled \ + -Daom=disabled \ + -Dandroidmedia=disabled \ + -Dapplemedia=disabled \ + -Dbs2b=disabled \ + -Dchromaprint=disabled \ + -Dd3dvideosink=disabled \ + -Ddirectsound=disabled \ + -Ddts=disabled \ + -Dfdkaac=disabled \ + -Dflite=disabled \ + -Dgme=disabled \ + -Dgsm=disabled \ + -Diqa=disabled \ + -Dkate=disabled \ + -Dladspa=disabled \ + -Dlv2=disabled \ + -Dmpeg2enc=disabled \ + -Dmplex=disabled \ + -Dmusepack=disabled \ + -Dnvdec=disabled \ + -Dnvenc=disabled \ + -Dofa=disabled \ + -Dopenexr=disabled \ + -Dopenni2=disabled \ + -Dopensles=disabled \ + -Dsoundtouch=disabled \ + -Dspandsp=disabled \ + -Dsrt=disabled \ + -Dteletext=disabled \ + -Dwasapi=disabled \ + -Dwildmidi=disabled \ + -Dwinks=disabled \ + -Dwinscreencap=disabled \ + -Dwpe=disabled \ + -Dx265=disabled \ + ${@bb.utils.contains("TUNE_FEATURES", "mx32", "-Dyadif=disabled", "", d)} \ +" + +export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}" + +ARM_INSTRUCTION_SET_armv4 = "arm" +ARM_INSTRUCTION_SET_armv5 = "arm" + +FILES_${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs" +FILES_${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*" +FILES_${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch deleted file mode 100644 index bcada34c..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch +++ /dev/null @@ -1,167 +0,0 @@ -From 7022b87353a37b78bae7cf0106a4e47913bb5c97 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 5 Apr 2018 10:15:08 +0800 -Subject: [PATCH] Makefile.am: don't hardcode libtool name when running - introspection tools - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> - ---- - gst-libs/gst/allocators/Makefile.am | 2 +- - gst-libs/gst/app/Makefile.am | 2 +- - gst-libs/gst/audio/Makefile.am | 2 +- - gst-libs/gst/gl/Makefile.am | 2 +- - gst-libs/gst/pbutils/Makefile.am | 2 +- - gst-libs/gst/riff/Makefile.am | 2 +- - gst-libs/gst/rtp/Makefile.am | 2 +- - gst-libs/gst/rtsp/Makefile.am | 2 +- - gst-libs/gst/sdp/Makefile.am | 2 +- - gst-libs/gst/tag/Makefile.am | 2 +- - gst-libs/gst/video/Makefile.am | 2 +- - 11 files changed, 11 insertions(+), 11 deletions(-) - -diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am -index 1957d28..1ecc950 100644 ---- a/gst-libs/gst/allocators/Makefile.am -+++ b/gst-libs/gst/allocators/Makefile.am -@@ -42,7 +42,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@ - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstallocators-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg-export gstreamer-allocators-@GST_API_VERSION@ \ - --output $@ \ -diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am -index 52f6ad3..5bfd606 100644 ---- a/gst-libs/gst/app/Makefile.am -+++ b/gst-libs/gst/app/Makefile.am -@@ -56,7 +56,7 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO - --library=libgstapp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-app-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am -index 2922245..7fb65f2 100644 ---- a/gst-libs/gst/audio/Makefile.am -+++ b/gst-libs/gst/audio/Makefile.am -@@ -184,7 +184,7 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ - --include=GstTag-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-audio-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am -index 4e77e8c..3276d7f 100644 ---- a/gst-libs/gst/gl/Makefile.am -+++ b/gst-libs/gst/gl/Makefile.am -@@ -193,7 +193,7 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ - --include=GstVideo-@GST_API_VERSION@ \ -- --libtool="${LIBTOOL}" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg gstreamer-video-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am -index ae51993..35a6e44 100644 ---- a/gst-libs/gst/pbutils/Makefile.am -+++ b/gst-libs/gst/pbutils/Makefile.am -@@ -103,7 +103,7 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP - --include=GstTag-@GST_API_VERSION@ \ - --include=GstVideo-@GST_API_VERSION@ \ - --include=GstAudio-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-tag-@GST_API_VERSION@ \ - --pkg gstreamer-video-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am -index fb53f06..e66ef4f 100644 ---- a/gst-libs/gst/riff/Makefile.am -+++ b/gst-libs/gst/riff/Makefile.am -@@ -49,7 +49,7 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --include=GstAudio-@GST_API_VERSION@ \ - # --include=GstTag-@GST_API_VERSION@ \ - # --include=Gst-@GST_API_VERSION@ \ --# --libtool="$(top_builddir)/libtool" \ -+# --libtool="$(LIBTOOL)" \ - # --pkg gstreamer-@GST_API_VERSION@ \ - # --pkg gstreamer-tag-@GST_API_VERSION@ \ - # --pkg gstreamer-audio-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am -index a6f971d..77ebeeb 100644 ---- a/gst-libs/gst/rtp/Makefile.am -+++ b/gst-libs/gst/rtp/Makefile.am -@@ -69,7 +69,7 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO - --library=libgstrtp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-rtp-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am -index ceb07f4..db9d0fd 100644 ---- a/gst-libs/gst/rtsp/Makefile.am -+++ b/gst-libs/gst/rtsp/Makefile.am -@@ -76,7 +76,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS - --include=Gio-2.0 \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstSdp-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gio-2.0 \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-sdp-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am -index e197e9b..6e05cc7 100644 ---- a/gst-libs/gst/sdp/Makefile.am -+++ b/gst-libs/gst/sdp/Makefile.am -@@ -34,7 +34,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO - --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstsdp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg-export gstreamer-sdp-@GST_API_VERSION@ \ - --output $@ \ -diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am -index 0247c33..c86515b 100644 ---- a/gst-libs/gst/tag/Makefile.am -+++ b/gst-libs/gst/tag/Makefile.am -@@ -66,7 +66,7 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO - --library=libgsttag-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-tag-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am -index 9fc1ccf..0f8455f 100644 ---- a/gst-libs/gst/video/Makefile.am -+++ b/gst-libs/gst/video/Makefile.am -@@ -124,7 +124,7 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE - --library=libgstvideo-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-base-@GST_API_VERSION@ \ - --pkg-export gstreamer-video-@GST_API_VERSION@ \ diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch deleted file mode 100644 index 251dc172..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 61a672e79c8cb1aeeeda4c968997c577ac73a8f3 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Fri, 12 May 2017 16:47:12 +0300 -Subject: [PATCH] gstreamer-gl.pc.in: don't append GL_CFLAGS to CFLAGS - -Dependencies' include directories should not be added in this way; -it causes problems when cross-compiling in sysroot environments. - -Upstream-Status: Pending - -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> -Signed-off-by: Maxin B. John <maxin.john@intel.com> ---- - pkgconfig/gstreamer-gl.pc.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/pkgconfig/gstreamer-gl.pc.in b/pkgconfig/gstreamer-gl.pc.in -index dc672a9..8c290ba 100644 ---- a/pkgconfig/gstreamer-gl.pc.in -+++ b/pkgconfig/gstreamer-gl.pc.in -@@ -13,4 +13,4 @@ Version: @VERSION@ - Requires: gstreamer-video-@GST_API_VERSION@ gstreamer-base-@GST_API_VERSION@ gstreamer-@GST_API_VERSION@ - - Libs: -L${libdir} -lgstgl-@GST_API_VERSION@ --Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include @GL_CFLAGS@ -+Cflags: -I${includedir} -I${libdir}/gstreamer-@GST_API_VERSION@/include --- -2.7.4 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 00000000..49ab4714 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch @@ -0,0 +1,36 @@ +From 30672ba7d134553e59935ddc875104adba26f25c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> +Date: Thu, 17 Oct 2019 20:06:24 +0100 +Subject: [PATCH] meson: build gir even when cross-compiling if introspection + was enabled explicitly + +This can be made to work in certain circumstances when +cross-compiling, so default to not building g-i stuff +when cross-compiling, but allow it if introspection was +enabled explicitly via -Dintrospection=enabled. + +See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. + +Upstream-Status: Backport [30672ba7d134553e59935ddc875104adba26f25c] + +Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 264d84c9e..c8147c224 100644 +--- a/meson.build ++++ b/meson.build +@@ -372,7 +372,7 @@ endif + + gir = find_program('g-ir-scanner', required : get_option('introspection')) + gnome = import('gnome') +-build_gir = gir.found() and not meson.is_cross_build() ++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ + 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \ + 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ +-- +2.17.1 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch deleted file mode 100644 index 2e1190ba..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch +++ /dev/null @@ -1,302 +0,0 @@ -From 9601fc0cd6751a1affdc8717217b95931db31d7f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Thu, 5 Apr 2018 10:26:25 +0800 -Subject: [PATCH] Makefile.am: prefix calls to pkg-config with - PKG_CONFIG_SYSROOT_DIR - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> - ---- - gst-libs/gst/allocators/Makefile.am | 4 ++-- - gst-libs/gst/app/Makefile.am | 4 ++-- - gst-libs/gst/audio/Makefile.am | 12 ++++++------ - gst-libs/gst/gl/Makefile.am | 8 ++++---- - gst-libs/gst/pbutils/Makefile.am | 12 ++++++------ - gst-libs/gst/riff/Makefile.am | 8 ++++---- - gst-libs/gst/rtp/Makefile.am | 8 ++++---- - gst-libs/gst/rtsp/Makefile.am | 4 ++-- - gst-libs/gst/sdp/Makefile.am | 4 ++-- - gst-libs/gst/tag/Makefile.am | 8 ++++---- - gst-libs/gst/video/Makefile.am | 8 ++++---- - 11 files changed, 40 insertions(+), 40 deletions(-) - -diff --git a/gst-libs/gst/allocators/Makefile.am b/gst-libs/gst/allocators/Makefile.am -index 1ecc950..d6417ac 100644 ---- a/gst-libs/gst/allocators/Makefile.am -+++ b/gst-libs/gst/allocators/Makefile.am -@@ -39,7 +39,7 @@ GstAllocators-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstallocators-@ - --c-include "gst/allocators/allocators.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstallocators-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --libtool="$(LIBTOOL)" \ -@@ -63,7 +63,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/app/Makefile.am b/gst-libs/gst/app/Makefile.am -index 5bfd606..6441674 100644 ---- a/gst-libs/gst/app/Makefile.am -+++ b/gst-libs/gst/app/Makefile.am -@@ -51,8 +51,8 @@ GstApp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstapp-@GST_API_VERSIO - --c-include "gst/app/app.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstapp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am -index 7fb65f2..5379f79 100644 ---- a/gst-libs/gst/audio/Makefile.am -+++ b/gst-libs/gst/audio/Makefile.am -@@ -174,12 +174,12 @@ GstAudio-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstaudio-@GST_API_VE - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ - --c-include "gst/audio/audio.h" \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --add-include-path="$(top_builddir)/gst-libs/gst/tag/" \ - --library=libgstaudio-@GST_API_VERSION@.la \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ - --library-path="$(top_builddir)/gst-libs/gst/tag/" \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -208,8 +208,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - --includedir=$(srcdir) \ - --includedir=$(builddir) \ - --includedir="$(top_builddir)/gst-libs/gst/tag/" \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/gl/Makefile.am b/gst-libs/gst/gl/Makefile.am -index 3276d7f..0cdfe26 100644 ---- a/gst-libs/gst/gl/Makefile.am -+++ b/gst-libs/gst/gl/Makefile.am -@@ -186,9 +186,9 @@ GstGL-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstgl-@GST_API_VERSION@ - $(GST_PLUGINS_BASE_CFLAGS) \ - $(GL_CFLAGS) \ - --add-include-path="$(top_builddir)/gst-libs/gst/video/" \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library-path="$(top_builddir)/gst-libs/gst/video/" \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstgl-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -218,8 +218,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - --includedir=$(srcdir) \ - --includedir=$(builddir) \ - --includedir="$(top_builddir)/gst-libs/gst/video/" \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/pbutils/Makefile.am b/gst-libs/gst/pbutils/Makefile.am -index 35a6e44..49d6894 100644 ---- a/gst-libs/gst/pbutils/Makefile.am -+++ b/gst-libs/gst/pbutils/Makefile.am -@@ -88,14 +88,14 @@ GstPbutils-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstpbutils-@GST_AP - --c-include "gst/pbutils/pbutils.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --add-include-path="$(top_builddir)/gst-libs/gst/tag/" \ - --add-include-path="$(top_builddir)/gst-libs/gst/video/" \ - --add-include-path="$(top_builddir)/gst-libs/gst/audio/" \ - --library=libgstpbutils-@GST_API_VERSION@.la \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -- --library-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-@GST_API_VERSION@` \ -+ --library-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=libdir gstreamer-base-@GST_API_VERSION@` \ - --library-path="$(top_builddir)/gst-libs/gst/tag/" \ - --library-path="$(top_builddir)/gst-libs/gst/video/" \ - --library-path="$(top_builddir)/gst-libs/gst/audio/" \ -@@ -128,8 +128,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --includedir="$(top_builddir)/gst-libs/gst/tag/" \ - --includedir="$(top_builddir)/gst-libs/gst/video/" \ - --includedir="$(top_builddir)/gst-libs/gst/audio/" \ -diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am -index e66ef4f..c8c588a 100644 ---- a/gst-libs/gst/riff/Makefile.am -+++ b/gst-libs/gst/riff/Makefile.am -@@ -43,8 +43,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --c-include "gst/riff/riff.h" \ - # --add-include-path=$(builddir)/../tag \ - # --add-include-path=$(builddir)/../audio \ --# --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ --# --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+# --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+# --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - # --library=libgstriff-@GST_API_VERSION@.la \ - # --include=GstAudio-@GST_API_VERSION@ \ - # --include=GstTag-@GST_API_VERSION@ \ -@@ -75,8 +75,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --includedir=$(builddir) \ - # --includedir=$(builddir)/../tag \ - # --includedir=$(builddir)/../audio \ --# --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ --# --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+# --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+# --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - # $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - # - #CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/rtp/Makefile.am b/gst-libs/gst/rtp/Makefile.am -index 77ebeeb..9aee788 100644 ---- a/gst-libs/gst/rtp/Makefile.am -+++ b/gst-libs/gst/rtp/Makefile.am -@@ -64,8 +64,8 @@ GstRtp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtp-@GST_API_VERSIO - --c-include "gst/rtp/rtp.h" \ - -I$(top_builddir)/gst-libs \ - -I$(top_srcdir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstrtp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -92,8 +92,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am -index db9d0fd..79027cb 100644 ---- a/gst-libs/gst/rtsp/Makefile.am -+++ b/gst-libs/gst/rtsp/Makefile.am -@@ -71,7 +71,7 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS - -I$(top_builddir)/gst-libs \ - -I$(top_srcdir)/gst-libs \ - --add-include-path=$(builddir)/../sdp \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstrtsp-@GST_API_VERSION@.la \ - --include=Gio-2.0 \ - --include=Gst-@GST_API_VERSION@ \ -@@ -101,7 +101,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - --includedir=$(srcdir) \ - --includedir=$(builddir) \ - --includedir=$(builddir)/../sdp \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/sdp/Makefile.am b/gst-libs/gst/sdp/Makefile.am -index 6e05cc7..c7cf514 100644 ---- a/gst-libs/gst/sdp/Makefile.am -+++ b/gst-libs/gst/sdp/Makefile.am -@@ -31,7 +31,7 @@ GstSdp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstsdp-@GST_API_VERSIO - --warn-all \ - --c-include "gst/sdp/sdp.h" \ - -I$(top_srcdir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - --library=libgstsdp-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --libtool="$(LIBTOOL)" \ -@@ -55,7 +55,7 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES = $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/tag/Makefile.am b/gst-libs/gst/tag/Makefile.am -index c86515b..363e6d2 100644 ---- a/gst-libs/gst/tag/Makefile.am -+++ b/gst-libs/gst/tag/Makefile.am -@@ -61,8 +61,8 @@ GstTag-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgsttag-@GST_API_VERSIO - --c-include "gst/tag/tag.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgsttag-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -89,8 +89,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) -diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am -index 0f8455f..8c9955c 100644 ---- a/gst-libs/gst/video/Makefile.am -+++ b/gst-libs/gst/video/Makefile.am -@@ -119,8 +119,8 @@ GstVideo-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstvideo-@GST_API_VE - --c-include "gst/video/video.h" \ - -I$(top_srcdir)/gst-libs \ - -I$(top_builddir)/gst-libs \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --add-include-path=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - --library=libgstvideo-@GST_API_VERSION@.la \ - --include=Gst-@GST_API_VERSION@ \ - --include=GstBase-@GST_API_VERSION@ \ -@@ -147,8 +147,8 @@ typelibs_DATA = $(BUILT_GIRSOURCES:.gir=.typelib) - $(INTROSPECTION_COMPILER) \ - --includedir=$(srcdir) \ - --includedir=$(builddir) \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -- --includedir=`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ -+ --includedir=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-base-@GST_API_VERSION@` \ - $(INTROSPECTION_COMPILER_OPTS) $< -o $(@F) - - CLEANFILES += $(BUILT_GIRSOURCES) $(typelibs_DATA) diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch new file mode 100644 index 00000000..ca85744c --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-meson-Add-variables-for-gir-files.patch @@ -0,0 +1,235 @@ +From 685731e989dc074a4b0d48b6c8062e2738f09719 Mon Sep 17 00:00:00 2001 +From: Thibault Saunier <tsaunier@igalia.com> +Date: Mon, 22 Oct 2018 11:44:37 +0200 +Subject: [PATCH] meson: Add variables for gir files + +And flatten list of sources for dependencies + +Upstream-Status: Backport [685731e989dc074a4b0d48b6c8062e2738f09719] + +Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> +--- + gst-libs/gst/allocators/meson.build | 5 +++-- + gst-libs/gst/app/meson.build | 6 ++++-- + gst-libs/gst/audio/meson.build | 5 +++-- + gst-libs/gst/pbutils/meson.build | 5 +++-- + gst-libs/gst/rtp/meson.build | 6 ++++-- + gst-libs/gst/rtsp/meson.build | 5 +++-- + gst-libs/gst/sdp/meson.build | 6 ++++-- + gst-libs/gst/tag/meson.build | 5 +++-- + gst-libs/gst/video/meson.build | 5 +++-- + 9 files changed, 30 insertions(+), 18 deletions(-) + +diff --git a/gst-libs/gst/allocators/meson.build b/gst-libs/gst/allocators/meson.build +index 364baeebf..56f156dc3 100644 +--- a/gst-libs/gst/allocators/meson.build ++++ b/gst-libs/gst/allocators/meson.build +@@ -22,7 +22,7 @@ gstallocators = library('gstallocators-@0@'.format(api_version), + allocators_gen_sources = [] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/allocators/allocators.h' ] +- allocators_gen_sources += [gnome.generate_gir(gstallocators, ++ allocators_gir = gnome.generate_gir(gstallocators, + sources : gst_allocators_sources + gst_allocators_headers, + namespace : 'GstAllocators', + nsversion : api_version, +@@ -33,7 +33,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : [gst_dep] +- )] ++ ) ++ allocators_gen_sources += allocators_gir + endif + + allocators_dep = declare_dependency(link_with: gstallocators, +diff --git a/gst-libs/gst/app/meson.build b/gst-libs/gst/app/meson.build +index 81dd0f42c..7a90f5e10 100644 +--- a/gst-libs/gst/app/meson.build ++++ b/gst-libs/gst/app/meson.build +@@ -32,7 +32,7 @@ gstapp = library('gstapp-@0@'.format(api_version), + + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/app/app.h' ] +- app_gen_sources += [gnome.generate_gir(gstapp, ++ app_gir = gnome.generate_gir(gstapp, + sources : app_sources + app_headers + [gstapp_c] + [gstapp_h], + namespace : 'GstApp', + nsversion : api_version, +@@ -43,7 +43,9 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : [gst_dep, gst_base_dep] +- )] ++ ) ++ ++ app_gen_sources += app_gir + endif + + app_dep = declare_dependency(link_with: gstapp, +diff --git a/gst-libs/gst/audio/meson.build b/gst-libs/gst/audio/meson.build +index 0e4efab2e..2a449d4bf 100644 +--- a/gst-libs/gst/audio/meson.build ++++ b/gst-libs/gst/audio/meson.build +@@ -153,7 +153,7 @@ gstaudio = library('gstaudio-@0@'.format(api_version), + + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/audio/audio.h' ] +- audio_gen_sources += [gnome.generate_gir(gstaudio, ++ audio_gir = gnome.generate_gir(gstaudio, + sources : audio_src + audio_headers + [gstaudio_c] + [gstaudio_h], + namespace : 'GstAudio', + nsversion : api_version, +@@ -164,7 +164,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstaudio_deps +- )] ++ ) ++ audio_gen_sources += [audio_gir] + endif + + audio_dep = declare_dependency(link_with : gstaudio, +diff --git a/gst-libs/gst/pbutils/meson.build b/gst-libs/gst/pbutils/meson.build +index 2faf62622..0e96722fd 100644 +--- a/gst-libs/gst/pbutils/meson.build ++++ b/gst-libs/gst/pbutils/meson.build +@@ -63,7 +63,7 @@ pbutils = library('gstpbutils-@0@'.format(api_version), + pbutils_gen_sources = [gstpbutils_h, gst_pbutils_version_h] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/pbutils/pbutils.h' ] +- pbutils_gen_sources += [gnome.generate_gir(pbutils, ++ pbutils_gir = gnome.generate_gir(pbutils, + sources : pbutils_sources + pbutils_headers + [gstpbutils_h, gst_pbutils_version_h], + namespace : 'GstPbutils', + nsversion : api_version, +@@ -74,7 +74,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstpbutils_deps +- )] ++ ) ++ pbutils_gen_sources += [pbutils_gir] + endif + + pbutils_dep = declare_dependency(link_with : pbutils, +diff --git a/gst-libs/gst/rtp/meson.build b/gst-libs/gst/rtp/meson.build +index f47ec6592..7ea6658d5 100644 +--- a/gst-libs/gst/rtp/meson.build ++++ b/gst-libs/gst/rtp/meson.build +@@ -49,7 +49,7 @@ gst_rtp = library('gstrtp-@0@'.format(api_version), + rtp_gen_sources = [gstrtp_enum_h] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtp/rtp.h' ] +- rtp_gen_sources += [gnome.generate_gir(gst_rtp, ++ rtp_gir = gnome.generate_gir(gst_rtp, + sources : rtp_sources + rtp_headers + [gstrtp_enum_c] + [gstrtp_enum_h], + namespace : 'GstRtp', + nsversion : api_version, +@@ -60,7 +60,9 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstrtp_deps +- )] ++ ) ++ ++ rtp_gen_sources += [rtp_gir] + endif + + +diff --git a/gst-libs/gst/rtsp/meson.build b/gst-libs/gst/rtsp/meson.build +index 27e309d5a..3632adceb 100644 +--- a/gst-libs/gst/rtsp/meson.build ++++ b/gst-libs/gst/rtsp/meson.build +@@ -54,7 +54,7 @@ gst_rtsp = library('gstrtsp-@0@'.format(api_version), + rtsp_gen_sources = [gstrtsp_h] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/rtsp/rtsp.h' ] +- rtsp_gen_sources += [gnome.generate_gir(gst_rtsp, ++ rtsp_gir = gnome.generate_gir(gst_rtsp, + sources : rtsp_sources + rtsp_headers + [gstrtsp_c] + [gstrtsp_h], + namespace : 'GstRtsp', + nsversion : api_version, +@@ -65,7 +65,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstrtsp_deps + [sdp_dep] +- )] ++ ) ++ rtsp_gen_sources += [rtsp_gir] + endif + + rtsp_dep = declare_dependency(link_with : gst_rtsp, +diff --git a/gst-libs/gst/sdp/meson.build b/gst-libs/gst/sdp/meson.build +index 62c18b732..24cdb5293 100644 +--- a/gst-libs/gst/sdp/meson.build ++++ b/gst-libs/gst/sdp/meson.build +@@ -23,7 +23,7 @@ gstsdp = library('gstsdp-@0@'.format(api_version), + sdp_gen_sources = [] + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/sdp/sdp.h' ] +- sdp_gen_sources += [gnome.generate_gir(gstsdp, ++ sdp_gir = gnome.generate_gir(gstsdp, + sources : gst_sdp_sources + gst_sdp_headers, + namespace : 'GstSdp', + nsversion : api_version, +@@ -34,7 +34,9 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : rtsp_deps +- )] ++ ) ++ ++ sdp_gen_sources += [sdp_gir] + endif + + sdp_dep = declare_dependency(link_with: gstsdp, +diff --git a/gst-libs/gst/tag/meson.build b/gst-libs/gst/tag/meson.build +index 27e66fd63..5ec37392a 100644 +--- a/gst-libs/gst/tag/meson.build ++++ b/gst-libs/gst/tag/meson.build +@@ -93,7 +93,7 @@ gsttag = library('gsttag-@0@'.format(api_version), + + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/tag/tag.h' ] +- tag_gen_sources += [gnome.generate_gir(gsttag, ++ tag_gir = gnome.generate_gir(gsttag, + sources : tag_sources + tag_headers + [gsttag_h] + [gsttag_c], + namespace : 'GstTag', + nsversion : api_version, +@@ -104,7 +104,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : tag_deps +- )] ++ ) ++ tag_gen_sources += [tag_gir] + endif + + tag_dep = declare_dependency(link_with: gsttag, +diff --git a/gst-libs/gst/video/meson.build b/gst-libs/gst/video/meson.build +index 5b35e1943..bf77aa157 100644 +--- a/gst-libs/gst/video/meson.build ++++ b/gst-libs/gst/video/meson.build +@@ -138,7 +138,7 @@ gstvideo = library('gstvideo-@0@'.format(api_version), + + if build_gir + gst_gir_extra_args = gir_init_section + [ '--c-include=gst/video/video.h' ] +- video_gen_sources += [gnome.generate_gir(gstvideo, ++ video_gir = gnome.generate_gir(gstvideo, + sources : video_sources + video_headers + [gstvideo_c] + [gstvideo_h], + namespace : 'GstVideo', + nsversion : api_version, +@@ -149,7 +149,8 @@ if build_gir + install : true, + extra_args : gst_gir_extra_args, + dependencies : gstvideo_deps +- )] ++ ) ++ video_gen_sources += [video_gir] + endif + + video_dep = declare_dependency(link_with : gstvideo, +-- +2.17.1 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch deleted file mode 100644 index 98ffdb1c..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-riff-add-missing-include-directories-when-calling-in.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b9765efb1696e3e2e79f2955f759be199fe34882 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Mon, 26 Oct 2015 17:29:37 +0200 -Subject: [PATCH] riff: add missing include directories when calling - introspection scanner - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - gst-libs/gst/riff/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/gst-libs/gst/riff/Makefile.am b/gst-libs/gst/riff/Makefile.am -index c8c588a..c096453 100644 ---- a/gst-libs/gst/riff/Makefile.am -+++ b/gst-libs/gst/riff/Makefile.am -@@ -41,6 +41,8 @@ libgstriff_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) - # --strip-prefix=Gst \ - # --warn-all \ - # --c-include "gst/riff/riff.h" \ -+# -I$(top_srcdir)/gst-libs \ -+# -I$(top_builddir)/gst-libs \ - # --add-include-path=$(builddir)/../tag \ - # --add-include-path=$(builddir)/../audio \ - # --add-include-path=$(PKG_CONFIG_SYSROOT_DIR)`PKG_CONFIG_PATH="$(GST_PKG_CONFIG_PATH)" $(PKG_CONFIG) --variable=girdir gstreamer-@GST_API_VERSION@` \ diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch deleted file mode 100644 index aaeb611f..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 53b5868491cf99ee797192395dbfeb69df23edd2 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Mon, 26 Oct 2015 17:30:14 +0200 -Subject: [PATCH] rtsp: drop incorrect reference to gstreamer-sdp in - Makefile.am - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> - ---- - gst-libs/gst/rtsp/Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/gst-libs/gst/rtsp/Makefile.am b/gst-libs/gst/rtsp/Makefile.am -index 79027cb..2987e23 100644 ---- a/gst-libs/gst/rtsp/Makefile.am -+++ b/gst-libs/gst/rtsp/Makefile.am -@@ -79,7 +79,6 @@ GstRtsp-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtsp-@GST_API_VERS - --libtool="$(LIBTOOL)" \ - --pkg gio-2.0 \ - --pkg gstreamer-@GST_API_VERSION@ \ -- --pkg gstreamer-sdp-@GST_API_VERSION@ \ - --pkg-export gstreamer-rtsp-@GST_API_VERSION@ \ - --add-init-section="$(INTROSPECTION_INIT)" \ - --output $@ \ diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch new file mode 100644 index 00000000..6e53d2e8 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0005-viv-fb-Make-sure-config.h-is-included.patch @@ -0,0 +1,32 @@ +From bec38a0c2e2958927c42b2f9ae939969b7c4a326 Mon Sep 17 00:00:00 2001 +From: Carlos Rafael Giani <crg7475@mailbox.org> +Date: Tue, 21 May 2019 14:01:11 +0200 +Subject: [PATCH] viv-fb: Make sure config.h is included + +This prevents build errors due to missing GST_API_* symbols + +Upstream-Status: Pending + +Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> +--- + gst-libs/gst/gl/gl-prelude.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gst-libs/gst/gl/gl-prelude.h b/gst-libs/gst/gl/gl-prelude.h +index 05e1f6229..96ce5e685 100644 +--- a/gst-libs/gst/gl/gl-prelude.h ++++ b/gst-libs/gst/gl/gl-prelude.h +@@ -22,6 +22,10 @@ + #ifndef __GST_GL_PRELUDE_H__ + #define __GST_GL_PRELUDE_H__ + ++#ifdef HAVE_CONFIG_H ++#include "config.h" ++#endif ++ + #include <gst/gst.h> + + #ifdef BUILDING_GST_GL +-- +2.17.1 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch index c81fb0f6..e8094f45 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0009-glimagesink-Downrank-to-marginal.patch @@ -18,7 +18,7 @@ diff --git a/ext/gl/gstopengl.c b/ext/gl/gstopengl.c index a4b2540..0ccaacd 100644 --- a/ext/gl/gstopengl.c +++ b/ext/gl/gstopengl.c -@@ -118,7 +118,7 @@ plugin_init (GstPlugin * plugin) +@@ -127,7 +127,7 @@ plugin_init (GstPlugin * plugin) #endif if (!gst_element_register (plugin, "glimagesink", diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch deleted file mode 100644 index 45ba5075..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch +++ /dev/null @@ -1,70 +0,0 @@ -From a1b59ca6b1781442f37ffc1b697635db126b3a22 Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani <dv@pseudoterminal.org> -Date: Thu, 19 Jul 2018 10:30:54 +0200 -Subject: [PATCH] gl: Add switch for explicitely enabling/disabling GBM support - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=796833] - -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> ---- - m4/gst-gl.m4 | 30 ++++++++++++++++++++++++++++-- - 1 file changed, 28 insertions(+), 2 deletions(-) - -diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4 -index 1e9724094..aca5295cc 100644 ---- a/m4/gst-gl.m4 -+++ b/m4/gst-gl.m4 -@@ -117,6 +117,15 @@ AC_ARG_ENABLE([dispmanx], - *) AC_MSG_ERROR([bad value ${enableval} for --enable-dispmanx]) ;; - esac],[NEED_DISPMANX=auto]) - -+AC_ARG_ENABLE([gbm], -+ [ --enable-gbm Enable Mesa3D GBM support (requires EGL) @<:@default=auto@:>@], -+ [case "${enableval}" in -+ yes) NEED_GBM=yes ;; -+ no) NEED_GBM=no ;; -+ auto) NEED_GBM=auto ;; -+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;; -+ esac],[NEED_GBM=auto]) -+ - AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb) - save_CPPFLAGS="$CPPFLAGS" - save_LIBS="$LIBS" -@@ -172,15 +181,32 @@ case $host in - AC_CHECK_LIB([EGL], [fbGetDisplay], [HAVE_VIV_FB_EGL=yes]) - fi - -- if test "x$HAVE_EGL" = "xyes"; then -+ if test "x$NEED_GBM" != "xno"; then -+ if test "x$HAVE_EGL" = "xyes"; then - PKG_CHECK_MODULES(DRM, libdrm >= 2.4.55, HAVE_DRM=yes, HAVE_DRM=no) - AC_SUBST(DRM_CFLAGS) - AC_SUBST(DRM_LIBS) -+ if test "x$NEED_GBM" = "xyes"; then -+ if test "x$HAVE_DRM" = "xno"; then -+ AC_MSG_ERROR([GBM support requested but libdrm is not available]) -+ fi -+ if test "x$HAVE_GUDEV" = "xno"; then -+ AC_MSG_ERROR([GBM support requested but gudev is not available]) -+ fi -+ fi - if test "x$HAVE_DRM" = "xyes" -a "x$HAVE_GUDEV" = "xyes"; then - PKG_CHECK_MODULES(GBM, gbm, HAVE_GBM_EGL=yes, HAVE_GBM_EGL=no) -+ if test "x$HAVE_GBM_EGL" = "xno" -a "x$NEED_GBM" = "xyes"; then -+ AC_MSG_ERROR([GBM support requested but gbm library is not available]) -+ fi - AC_SUBST(GBM_CFLAGS) - AC_SUBST(GBM_LIBS) -- fi -+ fi -+ elif test "x$NEED_GBM" = "xyes"; then -+ AC_MSG_ERROR([GBM support requested but EGL is not available]) -+ else -+ AC_MSG_NOTICE([GBM support requested but EGL is not available; not enabling GBM support]) -+ fi - fi - - dnl FIXME: Mali EGL depends on GLESv1 or GLESv2 --- -2.17.1 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch deleted file mode 100644 index 65d191a3..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 092aadfc1df69c46d920b0cd39f98d363d6988b3 Mon Sep 17 00:00:00 2001 -From: Carlos Rafael Giani <dv@pseudoterminal.org> -Date: Thu, 19 Jul 2018 11:16:05 +0200 -Subject: [PATCH] gl: Add switches for explicitely enabling/disabling PNG and - JPEG support - -Upstream-Status: Submitted [https://bugzilla.gnome.org/show_bug.cgi?id=796833] - -Signed-off-by: Carlos Rafael Giani <dv@pseudoterminal.org> ---- - m4/gst-gl.m4 | 66 ++++++++++++++++++++++++++++++++++++---------------- - 1 file changed, 46 insertions(+), 20 deletions(-) - -diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4 -index 20b2233de..f8809981c 100644 ---- a/m4/gst-gl.m4 -+++ b/m4/gst-gl.m4 -@@ -126,6 +126,24 @@ AC_ARG_ENABLE([gbm], - *) AC_MSG_ERROR([bad value ${enableval} for --enable-gbm]) ;; - esac],[NEED_GBM=auto]) - -+AC_ARG_ENABLE([png], -+ [ --enable-png Enable libpng support @<:@default=auto@:>@], -+ [case "${enableval}" in -+ yes) NEED_PNG=yes ;; -+ no) NEED_PNG=no ;; -+ auto) NEED_PNG=auto ;; -+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-png]) ;; -+ esac],[NEED_PNG=auto]) -+ -+AC_ARG_ENABLE([jpeg], -+ [ --enable-jpeg Enable libjpeg support @<:@default=auto@:>@], -+ [case "${enableval}" in -+ yes) NEED_JPEG=yes ;; -+ no) NEED_JPEG=no ;; -+ auto) NEED_JPEG=auto ;; -+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-jpeg]) ;; -+ esac],[NEED_JPEG=auto]) -+ - AG_GST_PKG_CHECK_MODULES(X11_XCB, x11-xcb) - save_CPPFLAGS="$CPPFLAGS" - save_LIBS="$LIBS" -@@ -1043,9 +1061,13 @@ dnl Needed by plugins that use g_module_*() API - PKG_CHECK_MODULES(GMODULE_NO_EXPORT, gmodule-no-export-2.0) - - dnl libpng is optional --PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no) --if test "x$HAVE_PNG" = "xyes"; then -- AC_DEFINE(HAVE_PNG, [1] , [Use libpng]) -+if test "x$NEED_PNG" != "xno"; then -+ PKG_CHECK_MODULES(LIBPNG, libpng >= 1.0, HAVE_PNG=yes, HAVE_PNG=no) -+ if test "x$HAVE_PNG" = "xyes"; then -+ AC_DEFINE(HAVE_PNG, [1] , [Use libpng]) -+ elif test "x$NEED_PNG" = "xyes"; then -+ AC_MSG_ERROR([libpng support requested but libpng is not available]) -+ fi - fi - AC_SUBST(HAVE_PNG) - AC_SUBST(LIBPNG_LIBS) -@@ -1053,25 +1075,29 @@ AC_SUBST(LIBPNG_CFLAGS) - - dnl libjpeg is optional - AC_ARG_WITH(jpeg-mmx, [ --with-jpeg-mmx, path to MMX'ified JPEG library]) --OLD_LIBS="$LIBS" --if test x$with_jpeg_mmx != x; then -- LIBS="$LIBS -L$with_jpeg_mmx" --fi --AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no") --JPEG_LIBS="$LIBS -ljpeg-mmx" --LIBS="$OLD_LIBS" --if test x$HAVE_JPEG != xyes; then -- JPEG_LIBS="-ljpeg" -- AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no") --fi -+if test "x$NEED_JPEG" != "xno"; then -+ OLD_LIBS="$LIBS" -+ if test x$with_jpeg_mmx != x; then -+ LIBS="$LIBS -L$with_jpeg_mmx" -+ fi -+ AC_CHECK_LIB(jpeg-mmx, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no") -+ JPEG_LIBS="$LIBS -ljpeg-mmx" -+ LIBS="$OLD_LIBS" -+ if test x$HAVE_JPEG != xyes; then -+ JPEG_LIBS="-ljpeg" -+ AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no") -+ fi - --if test x$HAVE_JPEG = xyes; then -- AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg]) --else -- JPEG_LIBS= -+ if test x$HAVE_JPEG = xyes; then -+ AC_DEFINE(HAVE_JPEG, [1], [Use libjpeg]) -+ elif test "x$NEED_JPEG" = "xyes"; then -+ AC_MSG_ERROR([libjpeg support requested but libjpeg is not available]) -+ else -+ JPEG_LIBS= -+ fi -+ AC_SUBST(JPEG_LIBS) -+ AC_SUBST(HAVE_JPEG) - fi --AC_SUBST(JPEG_LIBS) --AC_SUBST(HAVE_JPEG) - ]) - - dnl -------------------------------------------------------------------------- --- -2.17.1 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/CVE-2019-9928.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/CVE-2019-9928.patch deleted file mode 100644 index 0ad7245c..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/CVE-2019-9928.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f672277509705c4034bc92a141eefee4524d15aa Mon Sep 17 00:00:00 2001 -From: Tobias Ronge <tobiasr@axis.com> -Date: Thu, 14 Mar 2019 10:12:27 +0100 -Subject: [PATCH] gstrtspconnection: Security loophole making heap overflow - -The former code allowed an attacker to create a heap overflow by -sending a longer than allowed session id in a response and including a -semicolon to change the maximum length. With this change, the parser -will never go beyond 512 bytes. - -Upstream-Status: Backport -CVE: CVE-2019-9928 -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - gst-libs/gst/rtsp/gstrtspconnection.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gst-libs/gst/rtsp/gstrtspconnection.c b/gst-libs/gst/rtsp/gstrtspconnection.c -index a6755bedd..c0429064a 100644 ---- a/gst-libs/gst/rtsp/gstrtspconnection.c -+++ b/gst-libs/gst/rtsp/gstrtspconnection.c -@@ -2461,7 +2461,7 @@ build_next (GstRTSPBuilder * builder, GstRTSPMessage * message, - maxlen = sizeof (conn->session_id) - 1; - /* the sessionid can have attributes marked with ; - * Make sure we strip them */ -- for (i = 0; session_id[i] != '\0'; i++) { -+ for (i = 0; i < maxlen && session_id[i] != '\0'; i++) { - if (session_id[i] == ';') { - maxlen = i; - /* parse timeout */ --- -2.21.0 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/link-with-libvchostif.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/link-with-libvchostif.patch deleted file mode 100644 index d5a7f6bd..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/link-with-libvchostif.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 9866f51e5e0913f1e453eb574618bf7432f38cb6 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 11 Apr 2018 10:46:33 +0800 -Subject: [PATCH] Add -lvchostif to link when using -lEGL on rpi - -This is required because libEGL from userland uses sybols -from this library. - -lib/libEGL.so.1.0.0 121: 00000000 0 FUNC GLOBAL DEFAULT UND vc_dispmanx_element_add - 1552: 00000000 0 FUNC GLOBAL DEFAULT UND vc_dispmanx_element_add - -These symbols are provided by libvchostif as seen below - -lib/libvchostif.so - 252: 0000b161 192 FUNC GLOBAL DEFAULT 9 vc_dispmanx_element_add - 809: 0000b161 192 FUNC GLOBAL DEFAULT 9 vc_dispmanx_element_add - -With this explicit link, plugins fail during runtime - -(gst-plugin-scanner:571): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-1.0/libgstomx.so': Error relocating /usr/lib/libgstgl-1.0.so.0: vc_dispmanx_element_add: symbol not found -(gst-plugin-scanner:571): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-1.0/libgstopengl.so': Error relocating /usr/lib/libgstgl-1.0.so.0: vc_dispmanx_element_add: symbol not found - -Upstream-Status: Pending -Signed-off-by: Khem Raj <raj.khem@gmail.com> -Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> ---- - m4/gst-gl.m4 | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/m4/gst-gl.m4 b/m4/gst-gl.m4 -index 1e97240..ab7774c 100644 ---- a/m4/gst-gl.m4 -+++ b/m4/gst-gl.m4 -@@ -231,7 +231,7 @@ case $host in - HAVE_EGL=yes - HAVE_GLES2=yes - HAVE_EGL_RPI=yes -- EGL_LIBS="-lbcm_host -lvcos -lvchiq_arm" -+ EGL_LIBS="-lbcm_host -lvchostif -lvcos -lvchiq_arm" - EGL_CFLAGS="" - AC_DEFINE(USE_EGL_RPI, [1], [Use RPi platform]) - ]) --- -2.7.4 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch deleted file mode 100644 index 23950b67..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/make-gio_unix_2_0-dependency-configurable.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 7ffa6e3d00e1d8a060f3f4c2bb9a72691af05d79 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Wed, 20 Jan 2016 13:00:00 -0800 -Subject: [PATCH] make gio_unix_2_0 dependency configurable - -Prior to 1.7.1, gst-plugins-base accepted a configure option to -disable gio_unix_2_0, however it was implemented incorrectly using -AG_GST_CHECK_FEATURE. That was fixed in 1.7.1 by making the -dependency unconditional. - - http://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=aadefefba88afe4acbe64454650f24e7ce7c8d70 - -To make builds deterministic, re-instate support for ---disable-gio_unix_2_0, but implement it using the AC_ARG_ENABLE -instead of AG_GST_CHECK_FEATURE. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> - ---- - configure.ac | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/configure.ac b/configure.ac -index 12807bc..35a0bf3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -806,9 +806,16 @@ AM_CONDITIONAL(HAVE_PNG, test "x$HAVE_PNG" = "xyes") - AM_CONDITIONAL(HAVE_JPEG, test "x$HAVE_JPEG" = "xyes") - - dnl *** gio-unix-2.0 for tests/check/pipelines/tcp.c *** -+AC_ARG_ENABLE([gio_unix_2_0], -+ [AS_HELP_STRING([--disable-gio_unix_2_0],[disable use of gio_unix_2_0])], -+ [], -+ [enable_gio_unix_2_0=yes]) -+ -+if test "x${enable_gio_unix_2_0}" != "xno"; then - PKG_CHECK_MODULES(GIO_UNIX_2_0, gio-unix-2.0 >= 2.24, - HAVE_GIO_UNIX_2_0="yes", - HAVE_GIO_UNIX_2_0="no") -+fi - AM_CONDITIONAL(USE_GIO_UNIX_2_0, test "x$HAVE_GIO_UNIX_2_0" = "xyes") - - dnl *** finalize CFLAGS, LDFLAGS, LIBS diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.4.bb deleted file mode 100644 index 0d8b033f..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.14.4.bb +++ /dev/null @@ -1,77 +0,0 @@ -require gstreamer1.0-plugins.inc - -LICENSE = "GPLv2+ & LGPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ - file://COPYING.LIB;md5=6762ed442b3822387a51c92d928ead0d \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ - file://get-caps-from-src-pad-when-query-caps.patch \ - file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ - file://make-gio_unix_2_0-dependency-configurable.patch \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ - file://0001-Makefile.am-don-t-hardcode-libtool-name-when-running.patch \ - file://0002-Makefile.am-prefix-calls-to-pkg-config-with-PKG_CONF.patch \ - file://0003-riff-add-missing-include-directories-when-calling-in.patch \ - file://0004-rtsp-drop-incorrect-reference-to-gstreamer-sdp-in-Ma.patch \ - file://0009-glimagesink-Downrank-to-marginal.patch \ - file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \ - file://0010-gl-Add-switch-for-explicitely-enabling-disabling-GBM.patch \ - file://0011-gl-Add-switches-for-explicitely-enabling-disabling-P.patch \ - file://link-with-libvchostif.patch \ - file://CVE-2019-9928.patch \ - " -SRC_URI[md5sum] = "4dbe20c1bf44191c2b8833234df5cb2a" -SRC_URI[sha256sum] = "ca6139490e48863e7706d870ff4e8ac9f417b56f3b9e4b3ce490c13b09a77461" - -S = "${WORKDIR}/gst-plugins-base-${PV}" - -DEPENDS += "iso-codes util-linux" - -inherit gettext - -PACKAGES_DYNAMIC =+ "^libgst.*" - -# opengl packageconfig factored out to make it easy for distros -# and BSP layers to pick either (desktop) opengl, gles2, or no GL -PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${PACKAGECONFIG_GL} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \ - gio-unix-2.0 jpeg ogg pango png theora vorbis zlib \ - ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ -" - -X11DEPENDS = "virtual/libx11 libsm libxrender libxv" -X11ENABLEOPTS = "--enable-x --enable-xvideo --enable-xshm" -X11DISABLEOPTS = "--disable-x --disable-xvideo --disable-xshm" - -PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" -PACKAGECONFIG[cdparanoia] = "--enable-cdparanoia,--disable-cdparanoia,cdparanoia" -PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl" -PACKAGECONFIG[gbm] = "--enable-gbm,--disable-gbm,virtual/libgbm libgudev libdrm" -PACKAGECONFIG[gio-unix-2.0] = "--enable-gio_unix_2_0,--disable-gio_unix_2_0,glib-2.0" -PACKAGECONFIG[gles2] = "--enable-gles2,--disable-gles2,virtual/libgles2" -PACKAGECONFIG[ivorbis] = "--enable-ivorbis,--disable-ivorbis,tremor" -PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg" -PACKAGECONFIG[ogg] = "--enable-ogg,--disable-ogg,libogg" -PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl,virtual/libgl libglu" -PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus" -PACKAGECONFIG[pango] = "--enable-pango,--disable-pango,pango" -PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng" -PACKAGECONFIG[theora] = "--enable-theora,--disable-theora,libtheora" -PACKAGECONFIG[visual] = "--enable-libvisual,--disable-libvisual,libvisual" -PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis" -PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" -PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland-native wayland wayland-protocols libdrm" -PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" - -FILES_${PN}-dev += "${libdir}/gstreamer-${LIBV}/include/gst/gl/gstglconfig.h" -FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" - -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/gst-libs/gst/tag/.libs:${B}/gst-libs/gst/video/.libs:${B}/gst-libs/gst/audio/.libs:${B}/gst-libs/gst/rtp/.libs:${B}/gst-libs/gst/allocators/.libs" -} diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.bb new file mode 100644 index 00000000..6563b6f7 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.16.2.bb @@ -0,0 +1,99 @@ +require gstreamer1.0-plugins-common.inc + +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ + file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607" + +SRC_URI = " \ + https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ + file://get-caps-from-src-pad-when-query-caps.patch \ + file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ + file://0002-meson-Add-variables-for-gir-files.patch \ + file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \ + file://0005-viv-fb-Make-sure-config.h-is-included.patch \ + file://0009-glimagesink-Downrank-to-marginal.patch \ + " +SRC_URI[md5sum] = "3fdb32823535799a748c1fc14f978e2c" +SRC_URI[sha256sum] = "b13e73e2fe74a4166552f9577c3dcb24bed077021b9c7fa600d910ec6987816a" + +S = "${WORKDIR}/gst-plugins-base-${PV}" + +DEPENDS += "iso-codes util-linux zlib" + +inherit gobject-introspection gtk-doc + +PACKAGES_DYNAMIC =+ "^libgst.*" + +# opengl packageconfig factored out to make it easy for distros +# and BSP layers to choose OpenGL APIs/platforms/window systems +PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + ${PACKAGECONFIG_GL} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \ + jpeg ogg pango png theora vorbis \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ +" + +OPENGL_APIS = 'opengl gles2' +OPENGL_PLATFORMS = 'egl' + +X11DEPENDS = "virtual/libx11 libsm libxrender libxv" +X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled" +X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled" + +PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" +PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia" +PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg" +PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg" +PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus" +PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango" +PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng" +PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora" +PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor" +PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual" +PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis" +PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" + +# OpenGL API packageconfigs +PACKAGECONFIG[opengl] = ",,virtual/libgl libglu" +PACKAGECONFIG[gles2] = ",,virtual/libgles2" + +# OpenGL platform packageconfigs +PACKAGECONFIG[egl] = ",,virtual/egl" + +# OpenGL window systems (except for X11) +PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm" +PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm" +PACKAGECONFIG[dispmanx] = ",,virtual/libomxil" + +OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', ' x11', '', d)}" +OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gbm', ' gbm', '', d)}" +OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', ' wayland', '', d)}" +OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'dispmanx', ' dispmanx', '', d)}" + +EXTRA_OEMESON += " \ + -Dgl-graphene=disabled \ + ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \ + ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \ + ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \ +" + +GTKDOC_MESON_OPTION = "gtk_doc" +GTKDOC_MESON_ENABLE_FLAG = "enabled" +GTKDOC_MESON_DISABLE_FLAG = "disabled" + +FILES_${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h" +FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" + +def get_opengl_cmdline_list(switch_name, options, d): + selected_options = [] + if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): + for option in options.split(): + if bb.utils.contains('PACKAGECONFIG', option, True, False, d): + selected_options += [option] + if selected_options: + return '-D' + switch_name + '=' + ','.join(selected_options) + else: + return '' diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc new file mode 100644 index 00000000..dba96e0f --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc @@ -0,0 +1,50 @@ +# This .inc file contains the common setup for the gstreamer1.0-plugins-* +# plugin set recipes. + +# SUMMARY is set in the actual .bb recipes +HOMEPAGE = "https://gstreamer.freedesktop.org/" +BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" +SECTION = "multimedia" + +DEPENDS = "gstreamer1.0 glib-2.0-native" + +inherit gettext meson pkgconfig upstream-version-is-even + +require gstreamer1.0-plugins-packaging.inc + +# Orc enables runtime JIT compilation of data processing routines from Orc +# bytecode to SIMD instructions for various architectures (currently SSE, MMX, +# MIPS, Altivec and NEON are supported). +# This value is used in the PACKAGECONFIG values for each plugin set recipe. +# By modifying it, Orc can be enabled/disabled in all of these recipes at once. +GSTREAMER_ORC ?= "orc" +# workaround to disable orc on mips to fix the build failure +# {standard input}: Assembler messages: +# {standard input}:46587: Error: branch out of range +GSTREAMER_ORC_mips = "" +PACKAGECONFIG[orc] = "-Dorc=enabled,-Dorc=disabled,orc orc-native" + +# TODO: put this in a gettext.bbclass patch (with variables to allow for +# configuring the option name and the enabled/disabled values). +def gettext_oemeson(d): + if d.getVar('USE_NLS') == 'no': + return '-Dnls=disabled' + # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set + if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'): + return '-Dnls=disabled' + return '-Dnls=enabled' + +# Not all plugin sets contain examples, so the -Dexamples +# option needs to be added conditionally. +GST_PLUGIN_SET_HAS_EXAMPLES ?= "1" + +EXTRA_OEMESON += " \ + ${@bb.utils.contains('GST_PLUGIN_SET_HAS_EXAMPLES', '1', '-Dexamples=disabled', '', d)} \ + ${@gettext_oemeson(d)} \ +" + +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" + +# Dynamically generate packages for all enabled plugins +PACKAGES_DYNAMIC = "^${PN}-.*" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch deleted file mode 100644 index a2cbb70f..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch +++ /dev/null @@ -1,62 +0,0 @@ -From c782a30482908a4b4dd9cd4abff9f9bc4016698f Mon Sep 17 00:00:00 2001 -From: Song Bing <b06498@freescale.com> -Date: Tue, 5 Aug 2014 14:40:46 +0800 -Subject: [PATCH] gstrtpmp4gpay: set dafault value for MPEG4 without codec - data in caps. - -https://bugzilla.gnome.org/show_bug.cgi?id=734263 - -Upstream-Status: Submitted - -Signed-off-by: Song Bing <b06498@freescale.com> ---- - gst/rtp/gstrtpmp4gpay.c | 19 ++++++++++++++++++- - 1 file changed, 18 insertions(+), 1 deletion(-) - -diff --git a/gst/rtp/gstrtpmp4gpay.c b/gst/rtp/gstrtpmp4gpay.c -index 7913d9a..1749d39 100644 ---- a/gst/rtp/gstrtpmp4gpay.c -+++ b/gst/rtp/gstrtpmp4gpay.c -@@ -391,6 +391,7 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) - const GValue *codec_data; - const gchar *media_type = NULL; - gboolean res; -+ const gchar *name; - - rtpmp4gpay = GST_RTP_MP4G_PAY (payload); - -@@ -401,7 +402,6 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) - GST_LOG_OBJECT (rtpmp4gpay, "got codec_data"); - if (G_VALUE_TYPE (codec_data) == GST_TYPE_BUFFER) { - GstBuffer *buffer; -- const gchar *name; - - buffer = gst_value_get_buffer (codec_data); - GST_LOG_OBJECT (rtpmp4gpay, "configuring codec_data"); -@@ -427,6 +427,23 @@ gst_rtp_mp4g_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) - - rtpmp4gpay->config = gst_buffer_copy (buffer); - } -+ } else { -+ name = gst_structure_get_name (structure); -+ -+ if (!strcmp (name, "video/mpeg")) { -+ rtpmp4gpay->profile = g_strdup ("1"); -+ -+ /* fixed rate */ -+ rtpmp4gpay->rate = 90000; -+ /* video stream type */ -+ rtpmp4gpay->streamtype = "4"; -+ /* no params for video */ -+ rtpmp4gpay->params = NULL; -+ /* mode */ -+ rtpmp4gpay->mode = "generic"; -+ -+ media_type = "video"; -+ } - } - if (media_type == NULL) - goto config_failed; --- -1.7.9.5 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlgl-ensure-Qt-defines-GLsync-to-fix-compile-on-som.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlgl-ensure-Qt-defines-GLsync-to-fix-compile-on-som.patch new file mode 100644 index 00000000..13684876 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qmlgl-ensure-Qt-defines-GLsync-to-fix-compile-on-som.patch @@ -0,0 +1,70 @@ +From 3e0d5577444b32579bdf5b69d720a322322ff7bc Mon Sep 17 00:00:00 2001 +From: Milian Wolff <milian.wolff@kdab.com> +Date: Tue, 26 Nov 2019 15:08:20 +0100 +Subject: [PATCH] qmlgl: ensure Qt defines GLsync to fix compile on some platforms +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +By explictly including QtGui/qopengl.h we force the code path that +defines GLsync in the Qt-specific way. Without that, some platforms +failed to compile the qmlgl plugin, since neither Qt nor gstreamer +defined GLsync then, leading to e.g.: + +``` +make[4]: Entering directory '/.../gst-plugins-good-1.16.1/ext/qt' + CXX libgstqmlgl_la-qtitem.lo +In file included from gstqtgl.h:32, + from qtitem.h:27, + from qtitem.cc:28: +/.../usr/include/gstreamer-1.0/ +gst/gl/gstglfuncs.h:93:17: error: expected identifier before ‘*’ token + ret (GSTGLAPI *name) args; + ^ +/.../usr/include/gstreamer-1.0/ +gst/gl/glprototypes/sync.h:27:1: note: in expansion of macro +‘GST_GL_EXT_FUNCTION’ + GST_GL_EXT_FUNCTION (GLsync, FenceSync, + ^~~~~~~~~~~~~~~~~~~ +``` +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/commit/3e0d5577444b32579bdf5b69d720a322322ff7bc] +--- + ext/qt/gstqtgl.h | 18 +++++++++++------- + 1 file changed, 11 insertions(+), 7 deletions(-) + +--- a/ext/qt/gstqtgl.h ++++ b/ext/qt/gstqtgl.h +@@ -22,14 +22,7 @@ + #include <QtGui/qtgui-config.h> + #endif + +-/* qt uses the same trick as us to typedef GLsync on GLES2 but to a different +- * type which confuses the preprocessor. Instead of trying to reconcile the +- * two, we instead use the GLsync definition from Qt from above, and ensure +- * that we don't typedef GLsync in gstglfuncs.h */ + #include <gst/gl/gstglconfig.h> +-#undef GST_GL_HAVE_GLSYNC +-#define GST_GL_HAVE_GLSYNC 1 +-#include <gst/gl/gstglfuncs.h> + + /* The glext.h guard was renamed in 2018, but some software which + * includes their own copy of the GL headers (such as qt) might have +@@ -46,6 +39,17 @@ + #endif + #endif + ++/* pulls in GLsync, see below */ ++#include <QtGui/qopengl.h> ++ ++/* qt uses the same trick as us to typedef GLsync on GLES2 but to a different ++ * type which confuses the preprocessor. Instead of trying to reconcile the ++ * two, we instead use the GLsync definition from Qt from above, and ensure ++ * that we don't typedef GLsync in gstglfuncs.h */ ++#undef GST_GL_HAVE_GLSYNC ++#define GST_GL_HAVE_GLSYNC 1 ++#include <gst/gl/gstglfuncs.h> ++ + #if defined(QT_OPENGL_ES_2) + #include <QtGui/QOpenGLContext> + #include <QtGui/QOpenGLFunctions> diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch new file mode 100644 index 00000000..3d423154 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch @@ -0,0 +1,56 @@ +From d08234a659bec1fd5c984fedefbeb8192af07839 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 31 Mar 2020 21:23:28 -0700 +Subject: [PATCH] qt: include ext/qt/gstqtgl.h instead of gst/gl/gstglfuncs.h + +gst/gl/gstglfuncs.h is included via ext/qt/gstqtgl.h which has logic to +prefer qt headers definitions for GLsync + +This helps in fixing build errors like below + +/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/QtGui/qopengles2ext.h:24:26: error: conflicting declaration 'typedef struct __GLsync* GLsync' + 24 | typedef struct __GLsync *GLsync; + | ^~~~~~ +In file included from /mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/gstglfuncs.h:84, + from ../gst-plugins-good-1.16.2/ext/qt/gstqsgtexture.cc:30: +/mnt/b/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/gstreamer1.0-plugins-good/1.16.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: note: previous declaration as 'typedef void* GLsync +' + 40 | typedef gpointer GLsync; + | ^~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + ext/qt/gstqsgtexture.cc | 2 +- + ext/qt/qtwindow.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc +index 2b314e0..12b15dd 100644 +--- a/ext/qt/gstqsgtexture.cc ++++ b/ext/qt/gstqsgtexture.cc +@@ -27,7 +27,7 @@ + + #include <gst/video/video.h> + #include <gst/gl/gl.h> +-#include <gst/gl/gstglfuncs.h> ++#include <ext/qt/gstqtgl.h> + #include "gstqsgtexture.h" + + #define GST_CAT_DEFAULT gst_qsg_texture_debug +diff --git a/ext/qt/qtwindow.cc b/ext/qt/qtwindow.cc +index 62d26b6..bf68ebb 100644 +--- a/ext/qt/qtwindow.cc ++++ b/ext/qt/qtwindow.cc +@@ -25,7 +25,7 @@ + #include <stdio.h> + + #include <gst/video/video.h> +-#include <gst/gl/gstglfuncs.h> ++#include <ext/qt/gstqtgl.h> + #include "qtwindow.h" + #include "gstqsgtexture.h" + #include "gstqtglutility.h" +-- +2.26.0 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch deleted file mode 100644 index c7f3630e..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/avoid-including-sys-poll.h-directly.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 4bfe2c8570a4a7080ec662504882969054d8a072 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Wed, 3 Feb 2016 18:12:38 -0800 -Subject: [PATCH] avoid including <sys/poll.h> directly - -musl libc generates warnings if <sys/poll.h> is included directly. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> ---- - ext/raw1394/gstdv1394src.c | 2 +- - ext/raw1394/gsthdv1394src.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ext/raw1394/gstdv1394src.c b/ext/raw1394/gstdv1394src.c -index dbc7607..3c42b41 100644 ---- a/ext/raw1394/gstdv1394src.c -+++ b/ext/raw1394/gstdv1394src.c -@@ -37,7 +37,7 @@ - #include "config.h" - #endif - #include <unistd.h> --#include <sys/poll.h> -+#include <poll.h> - #include <sys/socket.h> - #include <errno.h> - #include <fcntl.h> -diff --git a/ext/raw1394/gsthdv1394src.c b/ext/raw1394/gsthdv1394src.c -index 0b07a37..9785a15 100644 ---- a/ext/raw1394/gsthdv1394src.c -+++ b/ext/raw1394/gsthdv1394src.c -@@ -36,7 +36,7 @@ - #include "config.h" - #endif - #include <unistd.h> --#include <sys/poll.h> -+#include <poll.h> - #include <sys/socket.h> - #include <errno.h> - #include <fcntl.h> --- -1.9.1 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch deleted file mode 100644 index bc7ac0b6..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/ensure-valid-sentinel-for-gst_structure_get.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 2169f2205c0205a220d826d7573e5a863bd36e0a Mon Sep 17 00:00:00 2001 -From: Andre McCurdy <armccurdy@gmail.com> -Date: Tue, 9 Feb 2016 14:00:00 -0800 -Subject: [PATCH] ensure valid sentinal for gst_structure_get() - -gst_structure_get() is declared with G_GNUC_NULL_TERMINATED, ie -__attribute__((__sentinel__)), which means gcc will generate a -warning if the last parameter passed to the function is not NULL -(where a valid NULL in this context is defined as zero with any -pointer type). - -The C code callers to gst_structure_get() within gst-plugins-good -use the C NULL definition (ie ((void*)0)), which is a valid sentinel. - -However gstid3v2mux.cc uses the C++ NULL definition (ie 0L), which -is not a valid sentinel without an explicit cast to a pointer type. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy <armccurdy@gmail.com> ---- - ext/taglib/gstid3v2mux.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/taglib/gstid3v2mux.cc b/ext/taglib/gstid3v2mux.cc -index 8651e77..a87234f 100644 ---- a/ext/taglib/gstid3v2mux.cc -+++ b/ext/taglib/gstid3v2mux.cc -@@ -465,7 +465,7 @@ add_image_tag (ID3v2::Tag * id3v2tag, const GstTagList * list, - - if (info_struct) { - if (gst_structure_get (info_struct, "image-type", -- GST_TYPE_TAG_IMAGE_TYPE, &image_type, NULL)) { -+ GST_TYPE_TAG_IMAGE_TYPE, &image_type, (void *) NULL)) { - if (image_type > 0 && image_type <= 18) { - image_type += 2; - } else { --- -1.9.1 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bb deleted file mode 100644 index 83066057..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.14.4.bb +++ /dev/null @@ -1,79 +0,0 @@ -require gstreamer1.0-plugins.inc - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ - file://0001-gstrtpmp4gpay-set-dafault-value-for-MPEG4-without-co.patch \ - file://avoid-including-sys-poll.h-directly.patch \ - file://ensure-valid-sentinel-for-gst_structure_get.patch \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ - " - -SRC_URI[md5sum] = "6e3b247097366cf2639f22abfece7113" -SRC_URI[sha256sum] = "5f8b553260cb0aac56890053d8511db1528d53cae10f0287cfce2cb2acc70979" - -S = "${WORKDIR}/gst-plugins-good-${PV}" - -LICENSE = "GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ - file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" - -DEPENDS += "gstreamer1.0-plugins-base libcap" -RPROVIDES_${PN}-pulseaudio += "${PN}-pulse" -RPROVIDES_${PN}-soup += "${PN}-souphttpsrc" - -inherit gettext - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \ - bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 soup speex taglib v4l2 zlib \ -" - -X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" - -PACKAGECONFIG[bz2] = "--enable-bz2,--disable-bz2,bzip2" -PACKAGECONFIG[cairo] = "--enable-cairo,--disable-cairo,cairo" -PACKAGECONFIG[dv1394] = "--enable-dv1394,--disable-dv1394,libiec61883 libavc1394 libraw1394" -PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac" -PACKAGECONFIG[gdk-pixbuf] = "--enable-gdk_pixbuf,--disable-gdk_pixbuf,gdk-pixbuf" -PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3" -PACKAGECONFIG[gudev] = "--with-gudev,--without-gudev,libgudev" -PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" -PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg" -PACKAGECONFIG[lame] = "--enable-lame,--disable-lame,lame" -PACKAGECONFIG[libpng] = "--enable-libpng,--disable-libpng,libpng" -PACKAGECONFIG[libv4l2] = "--with-libv4l2,--without-libv4l2,v4l-utils" -PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123" -PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio" -PACKAGECONFIG[soup] = "--enable-soup,--disable-soup,libsoup-2.4" -PACKAGECONFIG[speex] = "--enable-speex,--disable-speex,speex" -PACKAGECONFIG[taglib] = "--enable-taglib,--disable-taglib,taglib" -PACKAGECONFIG[v4l2] = "--enable-gst_v4l2 --enable-v4l2-probe,--disable-gst_v4l2" -PACKAGECONFIG[vpx] = "--enable-vpx,--disable-vpx,libvpx" -PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack" -PACKAGECONFIG[x11] = "--enable-x,--disable-x,${X11DEPENDS}" -PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" - -# qt5 support is disabled, because it is not present in OE core, and requires more work than -# just adding a packageconfig (it requires access to moc, uic, rcc, and qmake paths). -# This is better done in a separate qt5 layer (which then should add a "qt5" packageconfig -# in a gstreamer1.0-plugins-good bbappend). - -EXTRA_OECONF += " \ - --enable-oss \ - --disable-aalib \ - --disable-aalibtest \ - --disable-directsound \ - --disable-libcaca \ - --disable-libdv \ - --disable-oss4 \ - --disable-osx_audio \ - --disable-osx_video \ - --disable-qt \ - --disable-shout2 \ - --disable-twolame \ - --disable-waveform \ -" - -FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bb new file mode 100644 index 00000000..17c94213 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.16.2.bb @@ -0,0 +1,70 @@ +require gstreamer1.0-plugins-common.inc + +SRC_URI = " \ + https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-${PV}.tar.xz \ + file://0001-qmlgl-ensure-Qt-defines-GLsync-to-fix-compile-on-som.patch \ + file://0001-qt-include-ext-qt-gstqtgl.h-instead-of-gst-gl-gstglf.patch \ + " + +SRC_URI[md5sum] = "bd025f8f14974f94b75ac69a9d1b9c93" +SRC_URI[sha256sum] = "40bb3bafda25c0b739c8fc36e48380fccf61c4d3f83747e97ac3f9b0171b1319" + +S = "${WORKDIR}/gst-plugins-good-${PV}" + +LICENSE = "GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://common/coverage/coverage-report.pl;beginline=2;endline=17;md5=a4e1830fce078028c8f0974161272607 \ + file://gst/replaygain/rganalysis.c;beginline=1;endline=23;md5=b60ebefd5b2f5a8e0cab6bfee391a5fe" + +DEPENDS += "gstreamer1.0-plugins-base libcap zlib" +RPROVIDES_${PN}-pulseaudio += "${PN}-pulse" +RPROVIDES_${PN}-soup += "${PN}-souphttpsrc" + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio x11', d)} \ + bz2 cairo flac gdk-pixbuf gudev jpeg lame libpng mpg123 soup speex taglib v4l2 \ +" + +X11DEPENDS = "virtual/libx11 libsm libxrender libxfixes libxdamage" +X11ENABLEOPTS = "-Dximagesrc=enabled -Dximagesrc-xshm=enabled -Dximagesrc-xfixes=enabled -Dximagesrc-xdamage=enabled" +X11DISABLEOPTS = "-Dximagesrc=disabled -Dximagesrc-xshm=disabled -Dximagesrc-xfixes=disabled -Dximagesrc-xdamage=disabled" + +PACKAGECONFIG[bz2] = "-Dbz2=enabled,-Dbz2=disabled,bzip2" +PACKAGECONFIG[cairo] = "-Dcairo=enabled,-Dcairo=disabled,cairo" +PACKAGECONFIG[dv1394] = "-Ddv1394=enabled,-Ddv1394=disabled,libiec61883 libavc1394 libraw1394" +PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" +PACKAGECONFIG[gdk-pixbuf] = "-Dgdk-pixbuf=enabled,-Dgdk-pixbuf=disabled,gdk-pixbuf" +PACKAGECONFIG[gtk] = "-Dgtk3=enabled,-Dgtk3=disabled,gtk+3" +PACKAGECONFIG[gudev] = "-Dv4l2-gudev=enabled,-Dv4l2-gudev=disabled,libgudev" +PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" +PACKAGECONFIG[jpeg] = "-Djpeg=enabled,-Djpeg=disabled,jpeg" +PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" +PACKAGECONFIG[libpng] = "-Dpng=enabled,-Dpng=disabled,libpng" +PACKAGECONFIG[libv4l2] = "-Dv4l2-libv4l2=enabled,-Dv4l2-libv4l2=disabled,v4l-utils" +PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" +PACKAGECONFIG[pulseaudio] = "-Dpulse=enabled,-Dpulse=disabled,pulseaudio" +PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native" +PACKAGECONFIG[soup] = "-Dsoup=enabled,-Dsoup=disabled,libsoup-2.4" +PACKAGECONFIG[speex] = "-Dspeex=enabled,-Dspeex=disabled,speex" +PACKAGECONFIG[taglib] = "-Dtaglib=enabled,-Dtaglib=disabled,taglib" +PACKAGECONFIG[v4l2] = "-Dv4l2=enabled -Dv4l2-probe=true,-Dv4l2=disabled -Dv4l2-probe=false" +PACKAGECONFIG[vpx] = "-Dvpx=enabled,-Dvpx=disabled,libvpx" +PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" +PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" + +EXTRA_OEMESON += " \ + -Daalib=disabled \ + -Ddirectsound=disabled \ + -Ddv=disabled \ + -Dlibcaca=disabled \ + -Doss=enabled \ + -Doss4=disabled \ + -Dosxaudio=disabled \ + -Dosxvideo=disabled \ + -Dshout2=disabled \ + -Dtwolame=disabled \ + -Dwaveform=disabled \ +" + +FILES_${PN}-equalizer += "${datadir}/gstreamer-1.0/presets/*.prs" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc new file mode 100644 index 00000000..9a7a1b6a --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-packaging.inc @@ -0,0 +1,70 @@ +# This .inc file contains functionality for automatically splitting +# built plugins into individual packages for each plugin. A -meta +# package is also set up that has no files of its own, but contains +# the names of all plugin packages in its RDEPENDS list. +# +# This is mainly used by the gstreamer1.0-plugins-* plugin set recipes, +# but can be used in any recipe that produces GStreamer plugins. + +PACKAGESPLITFUNCS_prepend = " split_gstreamer10_packages " +PACKAGESPLITFUNCS_append = " set_gstreamer10_metapkg_rdepends " + +python split_gstreamer10_packages () { + gst_libdir = d.expand('${libdir}/gstreamer-1.0') + postinst = d.getVar('plugin_postinst') + glibdir = d.getVar('libdir') + + # GStreamer libraries + do_split_packages(d, glibdir, r'^lib(.*)\.so\.*', 'lib%s', 'GStreamer 1.0 %s library', extra_depends='', allow_links=True) + # GStreamer plugin shared objects + do_split_packages(d, gst_libdir, r'libgst(.*)\.so$', d.expand('${PN}-%s'), 'GStreamer 1.0 plugin for %s', postinst=postinst, extra_depends='') + # GObject introspection files for GStreamer plugins + do_split_packages(d, glibdir+'/girepository-1.0', r'Gst(.*)-1.0\.typelib$', d.expand('${PN}-%s-typelib'), 'GStreamer 1.0 typelib file for %s', postinst=postinst, extra_depends='') + # Static GStreamer libraries for development + do_split_packages(d, gst_libdir, r'libgst(.*)\.a$', d.expand('${PN}-%s-staticdev'), 'GStreamer 1.0 plugin for %s (static development files)', extra_depends='${PN}-staticdev') +} + +python set_gstreamer10_metapkg_rdepends () { + import os + import oe.utils + + # Go through all generated packages (excluding the main package and + # the -meta package itself) and add them to the -meta package as RDEPENDS. + + pn = d.getVar('PN') + metapkg = pn + '-meta' + d.setVar('ALLOW_EMPTY_' + metapkg, "1") + d.setVar('FILES_' + metapkg, "") + blacklist = [ pn, pn + '-meta' ] + metapkg_rdepends = [] + pkgdest = d.getVar('PKGDEST') + for pkg in oe.utils.packages_filter_out_system(d): + if pkg not in blacklist and pkg not in metapkg_rdepends: + # See if the package is empty by looking at the contents of its PKGDEST subdirectory. + # If this subdirectory is empty, then the package is. + # Empty packages do not get added to the meta package's RDEPENDS + pkgdir = os.path.join(pkgdest, pkg) + if os.path.exists(pkgdir): + dir_contents = os.listdir(pkgdir) or [] + else: + dir_contents = [] + is_empty = len(dir_contents) == 0 + if not is_empty: + metapkg_rdepends.append(pkg) + d.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends)) + d.setVar('DESCRIPTION_' + metapkg, pn + ' meta package') +} + +# each plugin-dev depends on PN-dev, plugin-staticdev on PN-staticdev +# so we need them even when empty (like in gst-plugins-good case) +ALLOW_EMPTY_${PN} = "1" +ALLOW_EMPTY_${PN}-dev = "1" +ALLOW_EMPTY_${PN}-staticdev = "1" + +PACKAGES += "${PN}-apps ${PN}-meta ${PN}-glib" + +FILES_${PN} = "" +FILES_${PN}-apps = "${bindir}" +FILES_${PN}-glib = "${datadir}/glib-2.0" + +RRECOMMENDS_${PN} += "${PN}-meta" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.14.4.bb deleted file mode 100644 index c59ba1de..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.14.4.bb +++ /dev/null @@ -1,40 +0,0 @@ -require gstreamer1.0-plugins.inc - -LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ - file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068" - -LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" -LICENSE_FLAGS = "commercial" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ - " -SRC_URI[md5sum] = "90768a0074db071175ce980064d9a1ac" -SRC_URI[sha256sum] = "ac02d837f166c35ff6ce0738e281680d0b90052cfb1f0255dcf6aaca5f0f6d23" - -S = "${WORKDIR}/gst-plugins-ugly-${PV}" - -DEPENDS += "gstreamer1.0-plugins-base libid3tag" - -inherit gettext - -PACKAGECONFIG ??= " \ - ${GSTREAMER_ORC} \ - a52dec mpeg2dec \ -" - -PACKAGECONFIG[a52dec] = "--enable-a52dec,--disable-a52dec,liba52" -PACKAGECONFIG[amrnb] = "--enable-amrnb,--disable-amrnb,opencore-amr" -PACKAGECONFIG[amrwb] = "--enable-amrwb,--disable-amrwb,opencore-amr" -PACKAGECONFIG[cdio] = "--enable-cdio,--disable-cdio,libcdio" -PACKAGECONFIG[dvdread] = "--enable-dvdread,--disable-dvdread,libdvdread" -PACKAGECONFIG[mpeg2dec] = "--enable-mpeg2dec,--disable-mpeg2dec,mpeg2dec" -PACKAGECONFIG[x264] = "--enable-x264,--disable-x264,x264" - -EXTRA_OECONF += " \ - --disable-sidplay \ -" - -FILES_${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs" -FILES_${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.2.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.2.bb new file mode 100644 index 00000000..be108003 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.16.2.bb @@ -0,0 +1,39 @@ +require gstreamer1.0-plugins-common.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \ + file://tests/check/elements/xingmux.c;beginline=1;endline=21;md5=4c771b8af188724855cb99cadd390068" + +LICENSE = "GPLv2+ & LGPLv2.1+ & LGPLv2+" +LICENSE_FLAGS = "commercial" + +SRC_URI = " \ + https://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-${PV}.tar.xz \ + " +SRC_URI[md5sum] = "10283ff5ef1e34d462dde77042e329bd" +SRC_URI[sha256sum] = "5500415b865e8b62775d4742cbb9f37146a50caecfc0e7a6fc0160d3c560fbca" + +S = "${WORKDIR}/gst-plugins-ugly-${PV}" + +DEPENDS += "gstreamer1.0-plugins-base" + +GST_PLUGIN_SET_HAS_EXAMPLES = "0" + +PACKAGECONFIG ??= " \ + ${GSTREAMER_ORC} \ + a52dec mpeg2dec \ +" + +PACKAGECONFIG[a52dec] = "-Da52dec=enabled,-Da52dec=disabled,liba52" +PACKAGECONFIG[amrnb] = "-Damrnb=enabled,-Damrnb=disabled,opencore-amr" +PACKAGECONFIG[amrwb] = "-Damrwbdec=enabled,-Damrwbdec=disabled,opencore-amr" +PACKAGECONFIG[cdio] = "-Dcdio=enabled,-Dcdio=disabled,libcdio" +PACKAGECONFIG[dvdread] = "-Ddvdread=enabled,-Ddvdread=disabled,libdvdread" +PACKAGECONFIG[mpeg2dec] = "-Dmpeg2dec=enabled,-Dmpeg2dec=disabled,mpeg2dec" +PACKAGECONFIG[x264] = "-Dx264=enabled,-Dx264=disabled,x264" + +EXTRA_OEMESON += " \ + -Dsidplay=disabled \ +" + +FILES_${PN}-amrnb += "${datadir}/gstreamer-1.0/presets/GstAmrnbEnc.prs" +FILES_${PN}-x264 += "${datadir}/gstreamer-1.0/presets/GstX264Enc.prs" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc deleted file mode 100644 index 5906e4ad..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins.inc +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "Plugins for the GStreamer multimedia framework 1.x" -HOMEPAGE = "http://gstreamer.freedesktop.org/" -BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" -SECTION = "multimedia" - -DEPENDS = "gstreamer1.0 glib-2.0-native" - -SRC_URI_append = " file://gtk-doc-tweaks.patch" - -inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc - -acpaths = "-I ${S}/common/m4 -I ${S}/m4" - -LIBV = "1.0" -require gst-plugins-package.inc - -# Orc enables runtime JIT compilation of data processing routines from Orc -# bytecode to SIMD instructions for various architectures (currently SSE, MMX, -# MIPS, Altivec and NEON are supported). - -GSTREAMER_ORC ?= "orc" - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[orc] = "--enable-orc,--disable-orc,orc orc-native" -PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind" - -export ORCC = "${STAGING_DIR_NATIVE}${bindir}/orcc" - -EXTRA_OECONF = " \ - --disable-examples \ -" - -delete_pkg_m4_file() { - # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection - rm "${S}/common/m4/pkg.m4" || true - rm -f "${S}/common/m4/gtk-doc.m4" -} - -do_configure[prefuncs] += " delete_pkg_m4_file" - -PACKAGES_DYNAMIC = "^${PN}-.*" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc new file mode 100644 index 00000000..b6980670 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-ptest.inc @@ -0,0 +1,23 @@ +inherit ptest-gnome + +TEST_FILES_PATH = "${datadir}/installed-tests/gstreamer-1.0/test-files" +RUN_PTEST_FILE = "${D}${PTEST_PATH}/run-ptest" + +EXTRA_OEMESON += "-Dtest-files-path=${TEST_FILES_PATH}" + +GST_TEST_SUITE_NAME ?= "gstreamer-1.0" + +# Using do_install_ptest_base instead of do_install_ptest, since +# the default do_install_ptest_base is hardcoded to expect Makefiles. +do_install_ptest_base() { + # Generate run-ptest file + echo "#!/usr/bin/env sh" > "${RUN_PTEST_FILE}" + echo "gnome-desktop-testing-runner ${GST_TEST_SUITE_NAME}" >> "${RUN_PTEST_FILE}" + chmod 0755 "${RUN_PTEST_FILE}" + + # Install additional files required by tests + if [ -d "${S}/tests/files" ] ; then + install -d "${D}/${TEST_FILES_PATH}" + install -m 0644 "${S}/tests/files"/* "${D}/${TEST_FILES_PATH}" + fi +} diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-fix-builds-with-python-3.8.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-fix-builds-with-python-3.8.patch new file mode 100644 index 00000000..053108ad --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python/0001-meson.build-fix-builds-with-python-3.8.patch @@ -0,0 +1,24 @@ +From 61cfd1b49dc82baf14bb36d88b6c5be7b8c3d23a Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Mon, 2 Dec 2019 18:16:41 +0100 +Subject: [PATCH] meson.build: fix builds with python 3.8 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/gstreamer/gst-python/merge_requests/14] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 1da81d5..3e0db38 100644 +--- a/meson.build ++++ b/meson.build +@@ -24,7 +24,7 @@ pygobject_dep = dependency('pygobject-3.0', fallback: ['pygobject', 'pygobject_d + + pymod = import('python') + python = pymod.find_installation(get_option('python')) +-python_dep = python.dependency(required : true) ++python_dep = dependency('python3-embed', required : true) + + python_abi_flags = python.get_variable('ABIFLAGS', '') + pylib_loc = get_option('libpython-dir') diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.14.4.bb deleted file mode 100644 index 8d45ca26..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.14.4.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "Python bindings for GStreamer 1.0" -HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/" -SECTION = "multimedia" - -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740" - -SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz" -SRC_URI[md5sum] = "d4c0e3915f547feef49208ee08981e5a" -SRC_URI[sha256sum] = "d0fdb24f93b6d889f309d2f526b8ea9577e0084ff0a62b4623ef1aed52e85a1b" - -DEPENDS = "gstreamer1.0 python3-pygobject" -RDEPENDS_${PN} += "gstreamer1.0 python3-pygobject" - -PNREAL = "gst-python" - -S = "${WORKDIR}/${PNREAL}-${PV}" - -inherit autotools pkgconfig distutils3-base upstream-version-is-even gobject-introspection - -do_install_append() { - # gstpythonplugin hardcodes the location of the libpython from the build - # workspace and then fails at runtime. We can override it using - # --with-libpython-dir=${libdir}, but it still fails because it looks for a - # symlinked library ending in .so instead of the actually library with - # LIBNAME.so.MAJOR.MINOR. Although we could patch the code to use the path - # we want, it will break again if the library version ever changes. We need - # to think about the best way of handling this and possibly consult - # upstream. - # - # Note that this particular find line is taken from the Debian packaging for - # gst-python1.0. - find "${D}" \ - -name '*.pyc' -o \ - -name '*.pyo' -o \ - -name '*.la' -o \ - -name 'libgstpythonplugin*' \ - -delete -} diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.2.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.2.bb new file mode 100644 index 00000000..9e024eb9 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-python_1.16.2.bb @@ -0,0 +1,37 @@ +SUMMARY = "Python bindings for GStreamer 1.0" +HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-python/" +SECTION = "multimedia" + +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=c34deae4e395ca07e725ab0076a5f740" + +SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ + file://0001-meson.build-fix-builds-with-python-3.8.patch \ + " +SRC_URI[md5sum] = "6ac709767334d8d0a71cb4e016f6abeb" +SRC_URI[sha256sum] = "208df3148d73d9f416d016564737585d8ea763d91201732d44b5fe688c6288a8" + +DEPENDS = "gstreamer1.0 python3-pygobject" +RDEPENDS_${PN} += "gstreamer1.0 python3-pygobject" + +PNREAL = "gst-python" + +S = "${WORKDIR}/${PNREAL}-${PV}" + +# gobject-introspection is mandatory and cannot be configured +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" +UNKNOWN_CONFIGURE_WHITELIST_append = " introspection" + +inherit meson pkgconfig distutils3-base upstream-version-is-even gobject-introspection features_check + +do_install_append() { + + # Note that this particular find line is taken from the Debian packaging for + # gst-python1.0. + find "${D}" \ + -name '*.pyc' -o \ + -name '*.pyo' -o \ + -name '*.la' -o \ + -name 'libgstpythonplugin*' \ + -delete +} diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch deleted file mode 100644 index 89d6384a..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-Don-t-hardcode-libtool-name-when-using-introspection.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 4a12569e5ae5be63cd92a9b178860026a99746b1 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Tue, 27 Oct 2015 16:55:45 +0200 -Subject: [PATCH] Don't hardcode libtool name when using introspection - -Upstream-Status: Pending [review on oe-core maillist] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - gst/rtsp-server/Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/gst/rtsp-server/Makefile.am b/gst/rtsp-server/Makefile.am -index 4fcd366..c67f5ab 100644 ---- a/gst/rtsp-server/Makefile.am -+++ b/gst/rtsp-server/Makefile.am -@@ -87,7 +87,7 @@ GstRtspServer-@GST_API_VERSION@.gir: $(INTROSPECTION_SCANNER) libgstrtspserver-@ - --include=Gst-@GST_API_VERSION@ \ - --include=GstRtsp-@GST_API_VERSION@ \ - --include=GstNet-@GST_API_VERSION@ \ -- --libtool="$(top_builddir)/libtool" \ -+ --libtool="$(LIBTOOL)" \ - --pkg gstreamer-@GST_API_VERSION@ \ - --pkg gstreamer-rtsp-@GST_API_VERSION@ \ - --pkg gstreamer-net-@GST_API_VERSION@ \ --- -2.1.4 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 00000000..6962a50d --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server/0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch @@ -0,0 +1,36 @@ +From 95ce953e34cd0e9f5d42ce7900a9572e7bc8ca47 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> +Date: Fri, 18 Oct 2019 00:42:12 +0100 +Subject: [PATCH] meson: build gir even when cross-compiling if introspection + was enabled explicitly + +This can be made to work in certain circumstances when +cross-compiling, so default to not building g-i stuff +when cross-compiling, but allow it if introspection was +enabled explicitly via -Dintrospection=enabled. + +See gstreamer/gstreamer#454 and gstreamer/gstreamer#381. + +Upstream-Status: Backport [95ce953e34cd0e9f5d42ce7900a9572e7bc8ca47] + +Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index e1e3b1d..3f45f0e 100644 +--- a/meson.build ++++ b/meson.build +@@ -173,7 +173,7 @@ endif + + gir = find_program('g-ir-scanner', required : get_option('introspection')) + gnome = import('gnome') +-build_gir = gir.found() and not meson.is_cross_build() ++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ + 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ + 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \ +-- +2.17.1 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.14.4.bb deleted file mode 100644 index 7efc1b35..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.14.4.bb +++ /dev/null @@ -1,35 +0,0 @@ -SUMMARY = "A library on top of GStreamer for building an RTSP server" -HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/" -SECTION = "multimedia" -LICENSE = "LGPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" - -DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base" - -PNREAL = "gst-rtsp-server" - -SRC_URI = "http://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ - file://0001-Don-t-hardcode-libtool-name-when-using-introspection.patch \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ - file://gtk-doc-tweaks.patch \ - " - -SRC_URI[md5sum] = "ab0fb5c829266a500e14b46b7bdf06bf" -SRC_URI[sha256sum] = "3d0ece2afdcd601c175ece24e32a30bc19247b454f4eafd3deeec2533c6884f1" - -S = "${WORKDIR}/${PNREAL}-${PV}" - -inherit autotools pkgconfig upstream-version-is-even gobject-introspection gtk-doc - -EXTRA_OECONF = "--disable-examples --disable-tests" - -# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well -LIBV = "1.0" -require gst-plugins-package.inc - -delete_pkg_m4_file() { - # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection - rm "${S}/common/m4/pkg.m4" || true -} - -do_configure[prefuncs] += " delete_pkg_m4_file" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.2.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.2.bb new file mode 100644 index 00000000..02c3c838 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-rtsp-server_1.16.2.bb @@ -0,0 +1,31 @@ +SUMMARY = "A library on top of GStreamer for building an RTSP server" +HOMEPAGE = "http://cgit.freedesktop.org/gstreamer/gst-rtsp-server/" +SECTION = "multimedia" +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d" + +DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base" + +PNREAL = "gst-rtsp-server" + +SRC_URI = "https://gstreamer.freedesktop.org/src/${PNREAL}/${PNREAL}-${PV}.tar.xz \ + file://0001-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ + " + +SRC_URI[md5sum] = "8a998725820c771ba45be6e18bfdf73a" +SRC_URI[sha256sum] = "de07a2837b3b04820ce68264a4909f70c221b85dbff0cede7926e9cdbb1dc26e" + +S = "${WORKDIR}/${PNREAL}-${PV}" + +inherit meson pkgconfig upstream-version-is-even gobject-introspection + +EXTRA_OEMESON += " \ + -Dexamples=disabled \ + -Dtests=disabled \ +" + +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" + +# Starting with 1.8.0 gst-rtsp-server includes dependency-less plugins as well +require gstreamer1.0-plugins-packaging.inc diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch deleted file mode 100644 index d7b89849..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 5403a89e6a7ac72a23e0221075c0c19b5f85a021 Mon Sep 17 00:00:00 2001 -From: Fabio Berton <fabio.berton@ossystems.com.br> -Date: Wed, 13 Jun 2018 09:09:25 -0300 -Subject: [PATCH] gst/vaapi/Makefile.am: Add EGL_CFLAGS to libgstvaapi CFLAGS -Organization: O.S. Systems Software LTDA. - -We need this to pass correctly EGL CFLAGS when building with EGL support. - -Upstream-Status: Pending - -Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> ---- - gst/vaapi/Makefile.am | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/gst/vaapi/Makefile.am b/gst/vaapi/Makefile.am -index b299ac98..d6cab71f 100644 ---- a/gst/vaapi/Makefile.am -+++ b/gst/vaapi/Makefile.am -@@ -24,6 +24,10 @@ libgstvaapi_LIBS += $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-glx.la - endif - - if USE_EGL -+libgstvaapi_CFLAGS += \ -+ $(EGL_CFLAGS) \ -+ $(NULL) -+ - libgstvaapi_LIBS += $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-egl.la - endif - --- -2.17.1 - diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-vaapsink-downgrade-to-marginal.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-vaapsink-downgrade-to-marginal.patch index c861f3be..7945a923 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-vaapsink-downgrade-to-marginal.patch +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi/0001-vaapsink-downgrade-to-marginal.patch @@ -24,7 +24,7 @@ diff --git a/gst/vaapi/gstvaapi.c b/gst/vaapi/gstvaapi.c index 9a82454..4d94f2b 100644 --- a/gst/vaapi/gstvaapi.c +++ b/gst/vaapi/gstvaapi.c -@@ -210,7 +210,6 @@ plugin_init (GstPlugin * plugin) +@@ -195,7 +195,6 @@ plugin_init (GstPlugin * plugin) { GstVaapiDisplay *display; GArray *decoders; @@ -32,7 +32,7 @@ index 9a82454..4d94f2b 100644 plugin_add_dependencies (plugin); -@@ -235,10 +234,7 @@ plugin_init (GstPlugin * plugin) +@@ -220,10 +219,7 @@ plugin_init (GstPlugin * plugin) gst_element_register (plugin, "vaapidecodebin", GST_RANK_PRIMARY + 2, GST_TYPE_VAAPI_DECODE_BIN); diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.2.bb index 38964341..1bedf251 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.14.4.bb +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-vaapi_1.16.2.bb @@ -9,20 +9,27 @@ LICENSE = "LGPLv2.1+" LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c" SRC_URI = "https://gstreamer.freedesktop.org/src/${REALPN}/${REALPN}-${PV}.tar.xz \ - file://0001-gst-vaapi-Makefile.am-Add-EGL_CFLAGS-to-libgstvaapi-.patch \ file://0001-vaapsink-downgrade-to-marginal.patch \ " -SRC_URI[md5sum] = "2fae3442f5f23e7354a0c592bc7b9065" -SRC_URI[sha256sum] = "ce18dbfe961c6a8d31270231686075586bf7a7df62b778c8e7f5ec148251d0a3" +SRC_URI[md5sum] = "13f7cb6a64bde24e67f563377487dcce" +SRC_URI[sha256sum] = "191de7b0ab64a85dd0875c990721e7be95518f60e2a9106beca162004ed7c601" S = "${WORKDIR}/${REALPN}-${PV}" DEPENDS = "libva gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad" -inherit autotools pkgconfig gtk-doc distro_features_check upstream-version-is-even +inherit meson pkgconfig gtk-doc features_check upstream-version-is-even REQUIRED_DISTRO_FEATURES ?= "opengl" +EXTRA_OEMESON += " \ + -Dexamples=disabled \ +" + +GTKDOC_MESON_OPTION = "gtk_doc" +GTKDOC_MESON_ENABLE_FLAG = "enabled" +GTKDOC_MESON_DISABLE_FLAG = "disabled" + PACKAGES =+ "${PN}-tests" # OpenGL packageconfig factored out to make it easy for distros @@ -33,17 +40,18 @@ PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', 'glx' bb.utils.contains('DISTRO_FEATURES', 'opengl', 'egl', \ '', d), d)}" -PACKAGECONFIG ??= "drm \ +PACKAGECONFIG ??= "drm encoders \ ${PACKAGECONFIG_GL} \ ${@bb.utils.filter('DISTRO_FEATURES', 'wayland x11', d)}" -PACKAGECONFIG[drm] = "--enable-drm,--disable-drm,udev libdrm" -PACKAGECONFIG[egl] = "--enable-egl,--disable-egl,virtual/egl" -PACKAGECONFIG[glx] = "--enable-glx,--disable-glx,virtual/libgl" -PACKAGECONFIG[wayland] = "--enable-wayland,--disable-wayland,wayland" -PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,virtual/libx11 libxrandr libxrender" +PACKAGECONFIG[drm] = "-Dwith_drm=yes,-Dwith_drm=no,udev libdrm" +PACKAGECONFIG[egl] = "-Dwith_egl=yes,-Dwith_egl=no,virtual/egl" +PACKAGECONFIG[encoders] = "-Dwith_encoders=yes,-Dwith_encoders=no" +PACKAGECONFIG[glx] = "-Dwith_glx=yes,-Dwith_glx=no,virtual/libgl" +PACKAGECONFIG[wayland] = "-Dwith_wayland=yes,-Dwith_wayland=no,wayland-native wayland wayland-protocols" +PACKAGECONFIG[x11] = "-Dwith_x11=yes,-Dwith_x11=no,virtual/libx11 libxrandr libxrender" FILES_${PN} += "${libdir}/gstreamer-*/*.so" FILES_${PN}-dbg += "${libdir}/gstreamer-*/.debug" -FILES_${PN}-dev += "${libdir}/gstreamer-*/*.la ${libdir}/gstreamer-*/*.a" +FILES_${PN}-dev += "${libdir}/gstreamer-*/*.a" FILES_${PN}-tests = "${bindir}/*" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch index 67a872cd..67a872cd 100644 --- a/external/poky/meta/recipes-multimedia/gstreamer/files/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch new file mode 100644 index 00000000..1ed7198a --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch @@ -0,0 +1,36 @@ +From 35db4a2433fbdf8612cf98b5aab5b14aeb5372f8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= <tim@centricular.com> +Date: Thu, 17 Oct 2019 12:13:35 +0100 +Subject: [PATCH] meson: build gir even when cross-compiling if introspection + was enabled explicitly + +This can be made to work in certain circumstances when +cross-compiling, so default to not building g-i stuff +when cross-compiling, but allow it if introspection was +enabled explicitly via -Dintrospection=enabled. + +Fixes #454 and #381. + +Upstream-Status: Backport [35db4a2433fbdf8612cf98b5aab5b14aeb5372f8] + +Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 90d98d8eb..a47e7f34e 100644 +--- a/meson.build ++++ b/meson.build +@@ -466,7 +466,7 @@ rt_lib = cc.find_library('rt', required : false) + gir = find_program('g-ir-scanner', required : get_option('introspection')) + gnome = import('gnome') + +-build_gir = gir.found() and not meson.is_cross_build() ++build_gir = gir.found() and (not meson.is_cross_build() or get_option('introspection').enabled()) + + gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ + 'g_setenv("GST_REGISTRY_DISABLE", "yes", TRUE);' + \ +-- +2.17.1 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch new file mode 100644 index 00000000..f553340f --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0003-meson-Add-valgrind-feature.patch @@ -0,0 +1,74 @@ +From f6c7973c03d9ba7dab60c496e768c5e6c4ee824c Mon Sep 17 00:00:00 2001 +From: Carlos Rafael Giani <crg7475@mailbox.org> +Date: Sun, 20 Oct 2019 10:36:44 +0200 +Subject: [PATCH] meson: Add valgrind feature + +This allows for enabling/disabling Valgrind support. Since Valgrind is +an external dependency, such a feature is needed by build environemnts +such as Yocto to make sure builds are deterministic. These changes also +add more Valgrind specific configure log output. + +Upstream-Status: Pending + +Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> +--- + meson.build | 23 ++++++++++++++++++++++- + meson_options.txt | 1 + + 2 files changed, 23 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index b55ecc5..4751761 100644 +--- a/meson.build ++++ b/meson.build +@@ -199,7 +199,6 @@ check_headers = [ + 'sys/wait.h', + 'ucontext.h', + 'unistd.h', +- 'valgrind/valgrind.h', + 'sys/resource.h', + ] + +@@ -214,6 +213,28 @@ foreach h : check_headers + endif + endforeach + ++valgrind_option = get_option('valgrind') ++if valgrind_option.disabled() ++ message('Valgrind support not requested; disabled.') ++else ++ valgrind_header = 'valgrind/valgrind.h' ++ has_valgrind_header = cc.has_header(valgrind_header) ++ if has_valgrind_header ++ message('Valgrind support requested, and header ' + valgrind_header + \ ++ ' found. Enabled Valgrind support.') ++ define = 'HAVE_' + valgrind_header.underscorify().to_upper() ++ cdata.set(define, 1) ++ else ++ if valgrind_option.enabled() ++ error('Valgrind support requested and set as required, but header ' + \ ++ valgrind_header + ' not found.') ++ else ++ message('Valgrind support requested, but header ' + valgrind_header + \ ++ ' not found. Disabling Valgrind support.') ++ endif ++ endif ++endif ++ + if cc.has_member('struct tm', 'tm_gmtoff', prefix : '#include <time.h>') + cdata.set('HAVE_TM_GMTOFF', 1) + endif +diff --git a/meson_options.txt b/meson_options.txt +index e7ff7ba..8afde39 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -19,6 +19,7 @@ option('memory-alignment', type: 'combo', + + # Feature options + option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') ++option('valgrind', type : 'feature', value : 'auto', description : 'Enable Valgrind support') + option('libunwind', type : 'feature', value : 'auto', description : 'Use libunwind to generate backtraces') + option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind') + option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces') +-- +2.17.1 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch new file mode 100644 index 00000000..0e6c44ea --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/0004-meson-Add-option-for-installed-tests.patch @@ -0,0 +1,257 @@ +From b843400284751968862751dfe93853f151551c64 Mon Sep 17 00:00:00 2001 +From: Carlos Rafael Giani <crg7475@mailbox.org> +Date: Fri, 25 Oct 2019 00:06:26 +0200 +Subject: [PATCH] meson: Add option for installed tests + +This adds an option for producing installed versions of the unit tests. +These versions don't need meson to run (only a small shell script). This +makes it easier to run cross compiled tests on a target machine. + +Upstream-Status: Pending + +Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org> +--- + build-aux/gen-installed-test-desc.py | 18 ++++++ + build-aux/gen-installed-test-shscript.py | 25 ++++++++ + meson_options.txt | 2 + + tests/check/meson.build | 46 +++++++++++++- + tests/files/testfile | 80 ++++++++++++++++++++++++ + 5 files changed, 170 insertions(+), 1 deletion(-) + create mode 100644 build-aux/gen-installed-test-desc.py + create mode 100644 build-aux/gen-installed-test-shscript.py + create mode 100644 tests/files/testfile + +diff --git a/build-aux/gen-installed-test-desc.py b/build-aux/gen-installed-test-desc.py +new file mode 100644 +index 0000000..69e8a0f +--- /dev/null ++++ b/build-aux/gen-installed-test-desc.py +@@ -0,0 +1,18 @@ ++import sys ++import os ++import argparse ++ ++def write_template(filename, data): ++ with open(filename, 'w') as f: ++ f.write(data) ++ ++def build_template(testdir, testname): ++ return "[Test]\nType=session\nExec={}\n".format(os.path.join(testdir, testname)) ++ ++argparser = argparse.ArgumentParser(description='Generate installed-test data.') ++argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') ++argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') ++argparser.add_argument('--output', metavar='file', required=True, help='Output file') ++args = argparser.parse_args() ++ ++write_template(args.output, build_template(args.test_execdir, args.testname)) +diff --git a/build-aux/gen-installed-test-shscript.py b/build-aux/gen-installed-test-shscript.py +new file mode 100644 +index 0000000..5da86fb +--- /dev/null ++++ b/build-aux/gen-installed-test-shscript.py +@@ -0,0 +1,25 @@ ++import sys ++import os ++import argparse ++ ++def write_template(filename, data): ++ with open(filename, 'w') as f: ++ f.write(data) ++ ++def build_template(testdir, testname): ++ return ''.join([ ++ "#!/usr/bin/env sh\n", ++ "export GST_STATE_IGNORE_ELEMENTS=''\n", ++ "export CK_DEFAULT_TIMEOUT=20\n", ++ "export GST_PLUGIN_LOADING_WHITELIST='gstreamer'\n", ++ "{}\n".format(os.path.join(testdir, testname)), ++ ]) ++ ++argparser = argparse.ArgumentParser(description='Generate installed-test data.') ++argparser.add_argument('--test-execdir', metavar='dir', required=True, help='Installed test directory') ++argparser.add_argument('--testname', metavar='name', required=True, help='Installed test name') ++argparser.add_argument('--output', metavar='file', required=True, help='Output file') ++args = argparser.parse_args() ++ ++write_template(args.output, build_template(args.test_execdir, args.testname)) ++os.chmod(args.output, 0o755) +diff --git a/meson_options.txt b/meson_options.txt +index 8afde39..8884dcc 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -16,6 +16,8 @@ option('poisoning', type : 'boolean', value : false, description : 'Enable poiso + option('memory-alignment', type: 'combo', + choices : ['1', '2', '4', '8', '16', '32', '64', '128', '256', '512', '1024', '2048', '4096', '8192', 'malloc', 'pagesize'], + value: 'malloc') ++option('installed-tests', type : 'boolean', value : false, description : 'enable installed tests') ++option('test-files-path', type : 'string', description : 'Path where to find test files') + + # Feature options + option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries') +diff --git a/tests/check/meson.build b/tests/check/meson.build +index 04da83f..2db7f76 100644 +--- a/tests/check/meson.build ++++ b/tests/check/meson.build +@@ -118,11 +118,17 @@ if add_languages('cpp', required : false) + ] + endif + ++test_files_path = get_option('test-files-path') ++if test_files_path == '' ++ test_files_path = meson.current_source_dir() + '/../files' ++endif ++message('Using path "@0@" as the path to read test files from'.format(test_files_path)) ++ + test_defines = [ + '-UG_DISABLE_ASSERT', + '-UG_DISABLE_CAST_CHECKS', + '-DGST_CHECK_TEST_ENVIRONMENT_BEACON="GST_STATE_IGNORE_ELEMENTS"', +- '-DTESTFILE="' + meson.current_source_dir() + '/meson.build"', ++ '-DTESTFILE="@0@"'.format(test_files_path + '/testfile'), + '-DGST_USE_UNSTABLE_API', + '-DGST_DISABLE_DEPRECATED', + ] +@@ -137,6 +143,14 @@ endif + glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep] + gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep] + ++installed_tests_datadir = join_paths(prefix, get_option('datadir'), 'installed-tests', 'gstreamer-1.0') ++installed_tests_execdir = join_paths(prefix, libexecdir, 'installed-tests', 'gstreamer-1.0') ++installed_tests_enabled = get_option('installed-tests') ++ ++python = import('python').find_installation() ++gen_installed_test_desc = files('../../build-aux/gen-installed-test-desc.py') ++gen_installed_test_shscript = files('../../build-aux/gen-installed-test-shscript.py') ++ + foreach t : core_tests + fname = t[0] + test_name = fname.split('.')[0].underscorify() +@@ -150,8 +164,38 @@ foreach t : core_tests + include_directories : [configinc], + link_with : link_with_libs, + dependencies : test_deps + glib_deps + gst_deps, ++ install_dir: installed_tests_execdir, ++ install: installed_tests_enabled + ) + ++ if installed_tests_enabled ++ installed_test_shscript = test_name + '.sh' ++ shscript = custom_target (test_name + '_shscript', ++ output: installed_test_shscript, ++ command: [ ++ python, ++ gen_installed_test_shscript, ++ '--test-execdir=@0@'.format(installed_tests_execdir), ++ '--testname=@0@'.format(test_name), ++ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_shscript)), ++ ], ++ install: true, ++ install_dir: installed_tests_execdir) ++ ++ installed_test_desc = test_name + '.test' ++ data = custom_target(test_name + '_desc', ++ output: installed_test_desc, ++ command: [ ++ python, ++ gen_installed_test_desc, ++ '--test-execdir=@0@'.format(installed_tests_execdir), ++ '--testname=@0@'.format(installed_test_shscript), ++ '--output=@0@'.format(join_paths('@OUTDIR@', installed_test_desc)), ++ ], ++ install: true, ++ install_dir: installed_tests_datadir) ++ endif ++ + env = environment() + env.set('GST_PLUGIN_PATH_1_0', meson.build_root()) + env.set('GST_PLUGIN_SYSTEM_PATH_1_0', '') +diff --git a/tests/files/testfile b/tests/files/testfile +new file mode 100644 +index 0000000..89954e0 +--- /dev/null ++++ b/tests/files/testfile +@@ -0,0 +1,80 @@ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ ++................................................................................ +-- +2.17.1 + diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch new file mode 100644 index 00000000..7ca3d5ad --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0/capfix.patch @@ -0,0 +1,37 @@ +Currently gstreamer configuration depends on whether setcap is found on the host +system. Turn this into a configure option to make builds deterinistic. + +RP 2020/2/19 +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> +Upstream-Status: Pending + +Index: gstreamer-1.16.1/libs/gst/helpers/meson.build +=================================================================== +--- gstreamer-1.16.1.orig/libs/gst/helpers/meson.build ++++ gstreamer-1.16.1/libs/gst/helpers/meson.build +@@ -73,7 +73,12 @@ if have_ptp + endif + endif + +- setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) ++ setcap_feature = get_option('setcap') ++ if setcap_feature.disabled() ++ setcap = find_program('dontexist', required : false) ++ else ++ setcap = find_program('setcap', '/usr/sbin/setcap', '/sbin/setcap', required : false) ++ endif + + # user/group to change to in gst-ptp-helper + ptp_helper_setuid_user = get_option('ptp-helper-setuid-user') +Index: gstreamer-1.16.1/meson_options.txt +=================================================================== +--- gstreamer-1.16.1.orig/meson_options.txt ++++ gstreamer-1.16.1/meson_options.txt +@@ -26,6 +26,7 @@ option('libunwind', type : 'feature', va + option('libdw', type : 'feature', value : 'auto', description : 'Use libdw to generate better backtraces from libunwind') + option('dbghelp', type : 'feature', value : 'auto', description : 'Use dbghelp to generate backtraces') + option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files') ++option('setcap', type : 'feature', value : 'auto', description : 'Use setcap') + + # Common feature options + option('examples', type : 'feature', value : 'auto', yield : true) diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.14.4.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.14.4.bb deleted file mode 100644 index 232234b8..00000000 --- a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.14.4.bb +++ /dev/null @@ -1,90 +0,0 @@ -SUMMARY = "GStreamer 1.0 multimedia framework" -DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \ -It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime." -HOMEPAGE = "http://gstreamer.freedesktop.org/" -BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" -SECTION = "multimedia" -LICENSE = "LGPLv2+" - -DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native" - -inherit autotools pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc ptest - -# This way common/m4/introspection.m4 will come first -# (it has a custom INTROSPECTION_INIT macro, and so must be used instead of our common introspection.m4 file) -acpaths = "-I ${S}/common/m4 -I ${S}/m4" - -LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ - file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" - -S = "${WORKDIR}/gstreamer-${PV}" - -SRC_URI = " \ - http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ - file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ - file://gtk-doc-tweaks.patch \ - file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ - file://add-a-target-to-compile-tests.patch \ - file://run-ptest \ -" -SRC_URI[md5sum] = "f67fbbc42bd85a0701df119f52fb52bd" -SRC_URI[sha256sum] = "f94f6696c5f05a3b3a9183e39c5f5c0b779f75a04c0efa497e7920afa985ffc7" - -PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ - " - -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug" -PACKAGECONFIG[tests] = "--enable-tests,--disable-tests" -PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," -PACKAGECONFIG[gst-tracer-hooks] = "--enable-gst-tracer-hooks,--disable-gst-tracer-hooks," -PACKAGECONFIG[unwind] = "--with-unwind,--without-unwind,libunwind" -PACKAGECONFIG[dw] = "--with-dw,--without-dw,elfutils" - -EXTRA_OECONF = " \ - --disable-examples \ -" - -CACHED_CONFIGUREVARS += "ac_cv_header_valgrind_valgrind_h=no" - -# musl libc generates warnings if <sys/poll.h> is included directly -CACHED_CONFIGUREVARS += "ac_cv_header_sys_poll_h=no" - -PACKAGES += "${PN}-bash-completion" - -FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" -FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.la ${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" -FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" - -RDEPENDS_${PN}-ptest += "make" - -delete_pkg_m4_file() { - # This m4 file is out of date and is missing PKG_CONFIG_SYSROOT_PATH tweaks which we need for introspection - rm "${S}/common/m4/pkg.m4" || true - rm -f "${S}/common/m4/gtk-doc.m4" -} - -do_configure[prefuncs] += "delete_pkg_m4_file" - -do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/gst/.libs:${B}/libs/gst/base/.libs" -} - -do_compile_ptest() { - oe_runmake build-checks -} - -do_install_ptest() { - oe_runmake -C tests/check DESTDIR=${D}${PTEST_PATH} install-ptest - install -m 644 ${B}/tests/check/Makefile ${D}${PTEST_PATH} - install -m 755 ${S}/test-driver ${D}${PTEST_PATH} - sed -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ - -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \-e 's/^Makefile:/_Makefile:/' \ - -e 's/^srcdir = \(.*\)/srcdir = ./' -e 's/^top_srcdir = \(.*\)/top_srcdir = ./' \ - -e 's/^builddir = \(.*\)/builddir = ./' -e 's/^top_builddir = \(.*\)/top_builddir = ./' \ - -i ${D}${PTEST_PATH}/Makefile -} - -CVE_PRODUCT = "gstreamer" diff --git a/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.bb b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.bb new file mode 100644 index 00000000..50a872e2 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.16.2.bb @@ -0,0 +1,77 @@ +SUMMARY = "GStreamer 1.0 multimedia framework" +DESCRIPTION = "GStreamer is a multimedia framework for encoding and decoding video and sound. \ +It supports a wide range of formats including mp3, ogg, avi, mpeg and quicktime." +HOMEPAGE = "http://gstreamer.freedesktop.org/" +BUGTRACKER = "https://bugzilla.gnome.org/enter_bug.cgi?product=Gstreamer" +SECTION = "multimedia" +LICENSE = "LGPLv2+" + +DEPENDS = "glib-2.0 glib-2.0-native libcap libxml2 bison-native flex-native" + +inherit meson pkgconfig gettext upstream-version-is-even gobject-introspection gtk-doc + +LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d \ + file://gst/gst.h;beginline=1;endline=21;md5=e059138481205ee2c6fc1c079c016d0d" + +S = "${WORKDIR}/gstreamer-${PV}" + +SRC_URI = " \ + https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.xz \ + file://0001-gst-gstpluginloader.c-when-env-var-is-set-do-not-fal.patch \ + file://0002-meson-build-gir-even-when-cross-compiling-if-introsp.patch \ + file://0003-meson-Add-valgrind-feature.patch \ + file://0004-meson-Add-option-for-installed-tests.patch \ + file://capfix.patch \ +" +SRC_URI[md5sum] = "0e661ed5bdf1d8996e430228d022628e" +SRC_URI[sha256sum] = "e3f044246783fd685439647373fa13ba14f7ab0b346eadd06437092f8419e94e" + +PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \ + check \ + debug \ + tools" + +PACKAGECONFIG[debug] = "-Dgst_debug=true,-Dgst_debug=false" +PACKAGECONFIG[tracer-hooks] = "-Dtracer_hooks=true,-Dtracer_hooks=false" +PACKAGECONFIG[check] = "-Dcheck=enabled,-Dcheck=disabled" +PACKAGECONFIG[tests] = "-Dtests=enabled -Dinstalled-tests=true,-Dtests=disabled -Dinstalled-tests=false" +PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind," +PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" +PACKAGECONFIG[dw] = "-Dlibdw=enabled,-Dlibdw=disabled,elfutils" +PACKAGECONFIG[bash-completion] = "-Dbash-completion=enabled,-Dbash-completion=disabled,bash-completion" +PACKAGECONFIG[tools] = "-Dtools=enabled,-Dtools=disabled" +PACKAGECONFIG[setcap] = "-Dsetcap=enabled,-Dsetcap=disabled,libcap libcap-native" + +# TODO: put this in a gettext.bbclass patch +def gettext_oemeson(d): + if d.getVar('USE_NLS') == 'no': + return '-Dnls=disabled' + # Remove the NLS bits if USE_NLS is no or INHIBIT_DEFAULT_DEPS is set + if d.getVar('INHIBIT_DEFAULT_DEPS') and not oe.utils.inherits(d, 'cross-canadian'): + return '-Dnls=disabled' + return '-Dnls=enabled' + +EXTRA_OEMESON += " \ + -Dexamples=disabled \ + -Ddbghelp=disabled \ + ${@gettext_oemeson(d)} \ +" + +GTKDOC_MESON_OPTION = "gtk_doc" +GTKDOC_MESON_ENABLE_FLAG = "enabled" +GTKDOC_MESON_DISABLE_FLAG = "disabled" + +GIR_MESON_ENABLE_FLAG = "enabled" +GIR_MESON_DISABLE_FLAG = "disabled" + +PACKAGES += "${PN}-bash-completion" + +# Add the core element plugins to the main package +FILES_${PN} += "${libdir}/gstreamer-1.0/*.so" +FILES_${PN}-dev += "${libdir}/gstreamer-1.0/*.a ${libdir}/gstreamer-1.0/include" +FILES_${PN}-bash-completion += "${datadir}/bash-completion/completions/ ${datadir}/bash-completion/helpers/gst*" +FILES_${PN}-dbg += "${datadir}/gdb ${datadir}/gstreamer-1.0/gdb" + +CVE_PRODUCT = "gstreamer" + +require gstreamer1.0-ptest.inc diff --git a/external/poky/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.dpatch b/external/poky/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch index 8d09ce7b..10e08901 100644 --- a/external/poky/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.dpatch +++ b/external/poky/meta/recipes-multimedia/libid3tag/libid3tag/10_utf16.patch @@ -6,6 +6,7 @@ https://sources.debian.org/patches/libid3tag/0.15.1b-13/10_utf16.dpatch Upstream-Status: Pending CVE: CVE-2004-2779 +CVE: CVE-2017-11551 Signed-off-by: Changqing Li <changqing.li@windriver.com> diff --git a/external/poky/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch b/external/poky/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch new file mode 100644 index 00000000..f0867b5f --- /dev/null +++ b/external/poky/meta/recipes-multimedia/libid3tag/libid3tag/unknown-encoding.patch @@ -0,0 +1,39 @@ +In case of an unknown/invalid encoding, id3_parse_string() will +return NULL, but the return value wasn't checked resulting +in segfault in id3_ucs4_length(). This is the only place +the return value wasn't checked. + +Patch taken from Debian: +https://sources.debian.org/patches/libid3tag/0.15.1b-14/11_unknown_encoding.dpatch/ + +CVE: CVE-2017-11550 +Upstream-Status: Pending +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff -urNad libid3tag-0.15.1b~/compat.gperf libid3tag-0.15.1b/compat.gperf +--- libid3tag-0.15.1b~/compat.gperf 2004-01-23 09:41:32.000000000 +0000 ++++ libid3tag-0.15.1b/compat.gperf 2007-01-14 14:36:53.000000000 +0000 +@@ -236,6 +236,10 @@ + + encoding = id3_parse_uint(&data, 1); + string = id3_parse_string(&data, end - data, encoding, 0); ++ if (!string) ++ { ++ continue; ++ } + + if (id3_ucs4_length(string) < 4) { + free(string); +diff -urNad libid3tag-0.15.1b~/parse.c libid3tag-0.15.1b/parse.c +--- libid3tag-0.15.1b~/parse.c 2004-01-23 09:41:32.000000000 +0000 ++++ libid3tag-0.15.1b/parse.c 2007-01-14 14:37:34.000000000 +0000 +@@ -165,6 +165,9 @@ + case ID3_FIELD_TEXTENCODING_UTF_8: + ucs4 = id3_utf8_deserialize(ptr, length); + break; ++ default: ++ /* FIXME: Unknown encoding! Print warning? */ ++ return NULL; + } + + if (ucs4 && !full) { diff --git a/external/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb b/external/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb index fe316461..0312a610 100644 --- a/external/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb +++ b/external/poky/meta/recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb @@ -13,7 +13,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libid3tag-${PV}.tar.gz \ file://addpkgconfig.patch \ file://obsolete_automake_macros.patch \ file://0001-Fix-gperf-3.1-incompatibility.patch \ - file://10_utf16.dpatch \ + file://10_utf16.patch \ + file://unknown-encoding.patch \ " UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/mad/files/libid3tag/" UPSTREAM_CHECK_REGEX = "/projects/mad/files/libid3tag/(?P<pver>.*)/$" diff --git a/external/poky/meta/recipes-multimedia/libogg/libogg_1.3.3.bb b/external/poky/meta/recipes-multimedia/libogg/libogg_1.3.4.bb index 8d88f1f9..c4004619 100644 --- a/external/poky/meta/recipes-multimedia/libogg/libogg_1.3.3.bb +++ b/external/poky/meta/recipes-multimedia/libogg/libogg_1.3.4.bb @@ -5,13 +5,13 @@ necessary to codec libraries like libvorbis." HOMEPAGE = "http://xiph.org/" BUGTRACKER = "https://trac.xiph.org/newticket" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=db1b7a668b2a6f47b2af88fb008ad555 \ file://include/ogg/ogg.h;beginline=1;endline=11;md5=eda812856f13a3b1326eb8f020cc3b0b" SRC_URI = "http://downloads.xiph.org/releases/ogg/${BP}.tar.xz" -SRC_URI[md5sum] = "87ed742047f065046eb6c36745d871b8" -SRC_URI[sha256sum] = "4f3fc6178a533d392064f14776b23c397ed4b9f48f5de297aba73b643f955c08" +SRC_URI[md5sum] = "eadef24aad6e3e8379ba0d14971fd64a" +SRC_URI[sha256sum] = "c163bc12bc300c401b6aa35907ac682671ea376f13ae0969a220f7ddf71893fe" inherit autotools pkgconfig diff --git a/external/poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb b/external/poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb index d83eb457..271c2a30 100644 --- a/external/poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb +++ b/external/poky/meta/recipes-multimedia/libomxil/libomxil_0.9.3.bb @@ -24,6 +24,8 @@ inherit autotools EXTRA_OECONF += "--disable-doc --disable-Werror" +PROVIDES += "virtual/libomxil" + # # The .so files under ${libdir}/bellagio are not intended to be versioned and symlinked. # Make sure they get packaged in the main package. diff --git a/external/poky/meta/recipes-multimedia/libpng/libpng/CVE-2019-7317.patch b/external/poky/meta/recipes-multimedia/libpng/libpng/CVE-2019-7317.patch deleted file mode 100644 index 6ee1f8da..00000000 --- a/external/poky/meta/recipes-multimedia/libpng/libpng/CVE-2019-7317.patch +++ /dev/null @@ -1,20 +0,0 @@ -Use-after-free detected with static analysis. - -CVE: CVE-2019-7317 -Upstream-Status: Submitted [https://github.com/glennrp/libpng/issues/275] -Signed-off-by: Ross Burton <ross.burton@intel.com> - -diff --git a/png.c b/png.c -index 9d9926f638..efd1aecfbd 100644 ---- a/png.c -+++ b/png.c -@@ -4588,8 +4588,7 @@ png_image_free(png_imagep image) - if (image != NULL && image->opaque != NULL && - image->opaque->error_buf == NULL) - { -- /* Ignore errors here: */ -- (void)png_safe_execute(image, png_image_free_function, image); -+ png_image_free_function(image); - image->opaque = NULL; - } - } diff --git a/external/poky/meta/recipes-multimedia/libpng/libpng_1.6.36.bb b/external/poky/meta/recipes-multimedia/libpng/libpng_1.6.37.bb index a5862378..8c53d116 100644 --- a/external/poky/meta/recipes-multimedia/libpng/libpng_1.6.36.bb +++ b/external/poky/meta/recipes-multimedia/libpng/libpng_1.6.37.bb @@ -2,19 +2,16 @@ SUMMARY = "PNG image format decoding library" HOMEPAGE = "http://www.libpng.org/" SECTION = "libs" LICENSE = "Libpng" -LIC_FILES_CHKSUM = "file://LICENSE;md5=12b4ec50384c800bc568f519671b120c \ - file://png.h;endline=144;md5=15ae15f53376306868259924a9db4e05 \ - " +LIC_FILES_CHKSUM = "file://LICENSE;md5=b0085051bf265bac2bfc38bc89f50000" DEPENDS = "zlib" LIBV = "16" -SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/${BP}.tar.xz \ - file://CVE-2019-7317.patch" -SRC_URI[md5sum] = "df2be2d29c40937fe1f5349b16bc2826" -SRC_URI[sha256sum] = "eceb924c1fa6b79172fdfd008d335f0e59172a86a66481e09d4089df872aa319" +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/${BP}.tar.xz" +SRC_URI[md5sum] = "015e8e15db1eecde5f2eb9eb5b6e59e9" +SRC_URI[sha256sum] = "505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca" -MIRRORS += "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/${PV}/ ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}${LIBV}/older-releases/${PV}/" +MIRRORS += "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/ ${SOURCEFORGE_MIRROR}/${BPN}/${BPN}${LIBV}/older-releases/" UPSTREAM_CHECK_URI = "http://libpng.org/pub/png/libpng.html" @@ -30,3 +27,6 @@ PACKAGES =+ "${PN}-tools" FILES_${PN}-tools = "${bindir}/png-fix-itxt ${bindir}/pngfix ${bindir}/pngcp" BBCLASSEXTEND = "native nativesdk" + +# CVE-2019-17371 is actually a memory leak in gif2png 2.x +CVE_CHECK_WHITELIST += "CVE-2019-17371" diff --git a/external/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb b/external/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb index 77393db8..b1001087 100644 --- a/external/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb +++ b/external/poky/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb @@ -1,7 +1,7 @@ SUMMARY = "Audio format Conversion library" HOMEPAGE = "http://www.mega-nerd.com/libsndfile" AUTHOR = "Erik de Castro Lopo" -DEPENDS = "flac libogg libvorbis sqlite3" +DEPENDS = "flac libogg libvorbis" SECTION = "libs/multimedia" LICENSE = "LGPLv2.1" @@ -30,11 +30,14 @@ S = "${WORKDIR}/libsndfile-${PV}" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'alsa', d)}" PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" +PACKAGECONFIG[regtest] = "--enable-sqlite,--disable-sqlite,sqlite3" -inherit autotools lib_package pkgconfig +inherit autotools lib_package pkgconfig multilib_header -do_configure_prepend_arm() { - export ac_cv_sys_largefile_source=1 - export ac_cv_sys_file_offset_bits=64 +do_install_append() { + oe_multilib_header sndfile.h } +# This can't be replicated and is just a memory leak. +# https://github.com/erikd/libsndfile/issues/398 +CVE_CHECK_WHITELIST += "CVE-2018-13419" diff --git a/external/poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb b/external/poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb index 664d8480..178e1a92 100644 --- a/external/poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb +++ b/external/poky/meta/recipes-multimedia/libtheora/libtheora_1.1.1.bb @@ -3,7 +3,7 @@ DESCRIPTION = "The libtheora reference implementation provides the standard enco HOMEPAGE = "http://xiph.org/" BUGTRACKER = "https://trac.xiph.org/newticket" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=cf91718f59eb6a83d06dc7bcaf411132" DEPENDS = "libogg" diff --git a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2017-17095.patch b/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2017-17095.patch deleted file mode 100644 index 9b9962ed..00000000 --- a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2017-17095.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 9171da596c88e6a2dadcab4a3a89dddd6e1b4655 Mon Sep 17 00:00:00 2001 -From: Nathan Baker <elitebadger@gmail.com> -Date: Thu, 25 Jan 2018 21:28:15 +0000 -Subject: [PATCH] Add workaround to pal2rgb buffer overflow. - -CVE: CVE-2017-17095 - -Upstream-Status: Backport (unchanged) [gitlab.com/libtiff/libtiff/commit/9171da5...] - -Signed-off-by: Joe Slater <joe.slater@windriver.com. - ---- - tools/pal2rgb.c | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) - -diff --git a/tools/pal2rgb.c b/tools/pal2rgb.c -index 0423598..01fcf94 100644 ---- a/tools/pal2rgb.c -+++ b/tools/pal2rgb.c -@@ -182,8 +182,21 @@ main(int argc, char* argv[]) - { unsigned char *ibuf, *obuf; - register unsigned char* pp; - register uint32 x; -- ibuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(in)); -- obuf = (unsigned char*)_TIFFmalloc(TIFFScanlineSize(out)); -+ tmsize_t tss_in = TIFFScanlineSize(in); -+ tmsize_t tss_out = TIFFScanlineSize(out); -+ if (tss_out / tss_in < 3) { -+ /* -+ * BUG 2750: The following code does not know about chroma -+ * subsampling of JPEG data. It assumes that the output buffer is 3x -+ * the length of the input buffer due to exploding the palette into -+ * RGB tuples. If this assumption is incorrect, it could lead to a -+ * buffer overflow. Go ahead and fail now to prevent that. -+ */ -+ fprintf(stderr, "Could not determine correct image size for output. Exiting.\n"); -+ return -1; -+ } -+ ibuf = (unsigned char*)_TIFFmalloc(tss_in); -+ obuf = (unsigned char*)_TIFFmalloc(tss_out); - switch (config) { - case PLANARCONFIG_CONTIG: - for (row = 0; row < imagelength; row++) { --- -1.7.9.5 - diff --git a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2017-18013.patch b/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2017-18013.patch deleted file mode 100644 index 878e0de9..00000000 --- a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2017-18013.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 293c8b0298e91d20ba51291e2351ab7d110671d0 Mon Sep 17 00:00:00 2001 -From: Even Rouault <even.rouault@spatialys.com> -Date: Sun, 31 Dec 2017 15:09:41 +0100 -Subject: [PATCH] libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer - dereference on corrupted file. Fixes - http://bugzilla.maptools.org/show_bug.cgi?id=2770 - -Upstream-Status: Backport -[https://gitlab.com/libtiff/libtiff/commit/c6f41df7b581402dfba3c19a1e3df4454c551a01] - -CVE: CVE-2017-18013 - -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> ---- - libtiff/tif_print.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 24d4b98..f494cfb 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -667,13 +667,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) - fprintf(fd, " %3lu: [%8I64u, %8I64u]\n", - (unsigned long) s, -- (unsigned __int64) td->td_stripoffset[s], -- (unsigned __int64) td->td_stripbytecount[s]); -+ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0, -+ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0); - #else - fprintf(fd, " %3lu: [%8llu, %8llu]\n", - (unsigned long) s, -- (unsigned long long) td->td_stripoffset[s], -- (unsigned long long) td->td_stripbytecount[s]); -+ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0, -+ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0); - #endif - } - } --- -2.7.4 - diff --git a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9935.patch b/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9935.patch deleted file mode 100644 index 60684dd2..00000000 --- a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2017-9935.patch +++ /dev/null @@ -1,160 +0,0 @@ -From abb0055d21c52a9925314d5b0628fb2b6307619c Mon Sep 17 00:00:00 2001 -From: Brian May <brian@linuxpenguins.xyz> -Date: Thu, 7 Dec 2017 07:46:47 +1100 -Subject: [PATCH] tiff2pdf: Fix CVE-2017-9935 - -Fix for http://bugzilla.maptools.org/show_bug.cgi?id=2704 - -This vulnerability - at least for the supplied test case - is because we -assume that a tiff will only have one transfer function that is the same -for all pages. This is not required by the TIFF standards. - -We than read the transfer function for every page. Depending on the -transfer function, we allocate either 2 or 4 bytes to the XREF buffer. -We allocate this memory after we read in the transfer function for the -page. - -For the first exploit - POC1, this file has 3 pages. For the first page -we allocate 2 extra extra XREF entries. Then for the next page 2 more -entries. Then for the last page the transfer function changes and we -allocate 4 more entries. - -When we read the file into memory, we assume we have 4 bytes extra for -each and every page (as per the last transfer function we read). Which -is not correct, we only have 2 bytes extra for the first 2 pages. As a -result, we end up writing past the end of the buffer. - -There are also some related issues that this also fixes. For example, -TIFFGetField can return uninitalized pointer values, and the logic to -detect a N=3 vs N=1 transfer function seemed rather strange. - -It is also strange that we declare the transfer functions to be of type -float, when the standard says they are unsigned 16 bit values. This is -fixed in another patch. - -This patch will check to ensure that the N value for every transfer -function is the same for every page. If this changes, we abort with an -error. In theory, we should perhaps check that the transfer function -itself is identical for every page, however we don't do that due to the -confusion of the type of the data in the transfer function. - -Upstream-Status: Backport -[https://gitlab.com/libtiff/libtiff/commit/3dd8f6a357981a4090f126ab9025056c938b6940] - -CVE: CVE-2017-9935 - -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> ---- - libtiff/tif_dir.c | 3 +++ - tools/tiff2pdf.c | 65 +++++++++++++++++++++++++++++++++++++------------------ - 2 files changed, 47 insertions(+), 21 deletions(-) - -diff --git a/libtiff/tif_dir.c b/libtiff/tif_dir.c -index f00f808..c36a5f3 100644 ---- a/libtiff/tif_dir.c -+++ b/libtiff/tif_dir.c -@@ -1067,6 +1067,9 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap) - if (td->td_samplesperpixel - td->td_extrasamples > 1) { - *va_arg(ap, uint16**) = td->td_transferfunction[1]; - *va_arg(ap, uint16**) = td->td_transferfunction[2]; -+ } else { -+ *va_arg(ap, uint16**) = NULL; -+ *va_arg(ap, uint16**) = NULL; - } - break; - case TIFFTAG_REFERENCEBLACKWHITE: -diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c -index 454befb..0b5973e 100644 ---- a/tools/tiff2pdf.c -+++ b/tools/tiff2pdf.c -@@ -1047,6 +1047,8 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ - uint16 pagen=0; - uint16 paged=0; - uint16 xuint16=0; -+ uint16 tiff_transferfunctioncount=0; -+ float* tiff_transferfunction[3]; - - directorycount=TIFFNumberOfDirectories(input); - t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE))); -@@ -1147,26 +1149,48 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ - } - #endif - if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION, -- &(t2p->tiff_transferfunction[0]), -- &(t2p->tiff_transferfunction[1]), -- &(t2p->tiff_transferfunction[2]))) { -- if((t2p->tiff_transferfunction[1] != (float*) NULL) && -- (t2p->tiff_transferfunction[2] != (float*) NULL) && -- (t2p->tiff_transferfunction[1] != -- t2p->tiff_transferfunction[0])) { -- t2p->tiff_transferfunctioncount = 3; -- t2p->tiff_pages[i].page_extra += 4; -- t2p->pdf_xrefcount += 4; -- } else { -- t2p->tiff_transferfunctioncount = 1; -- t2p->tiff_pages[i].page_extra += 2; -- t2p->pdf_xrefcount += 2; -- } -- if(t2p->pdf_minorversion < 2) -- t2p->pdf_minorversion = 2; -+ &(tiff_transferfunction[0]), -+ &(tiff_transferfunction[1]), -+ &(tiff_transferfunction[2]))) { -+ -+ if((tiff_transferfunction[1] != (float*) NULL) && -+ (tiff_transferfunction[2] != (float*) NULL) -+ ) { -+ tiff_transferfunctioncount=3; -+ } else { -+ tiff_transferfunctioncount=1; -+ } - } else { -- t2p->tiff_transferfunctioncount=0; -+ tiff_transferfunctioncount=0; - } -+ -+ if (i > 0){ -+ if (tiff_transferfunctioncount != t2p->tiff_transferfunctioncount){ -+ TIFFError( -+ TIFF2PDF_MODULE, -+ "Different transfer function on page %d", -+ i); -+ t2p->t2p_error = T2P_ERR_ERROR; -+ return; -+ } -+ } -+ -+ t2p->tiff_transferfunctioncount = tiff_transferfunctioncount; -+ t2p->tiff_transferfunction[0] = tiff_transferfunction[0]; -+ t2p->tiff_transferfunction[1] = tiff_transferfunction[1]; -+ t2p->tiff_transferfunction[2] = tiff_transferfunction[2]; -+ if(tiff_transferfunctioncount == 3){ -+ t2p->tiff_pages[i].page_extra += 4; -+ t2p->pdf_xrefcount += 4; -+ if(t2p->pdf_minorversion < 2) -+ t2p->pdf_minorversion = 2; -+ } else if (tiff_transferfunctioncount == 1){ -+ t2p->tiff_pages[i].page_extra += 2; -+ t2p->pdf_xrefcount += 2; -+ if(t2p->pdf_minorversion < 2) -+ t2p->pdf_minorversion = 2; -+ } -+ - if( TIFFGetField( - input, - TIFFTAG_ICCPROFILE, -@@ -1828,9 +1852,8 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){ - &(t2p->tiff_transferfunction[1]), - &(t2p->tiff_transferfunction[2]))) { - if((t2p->tiff_transferfunction[1] != (float*) NULL) && -- (t2p->tiff_transferfunction[2] != (float*) NULL) && -- (t2p->tiff_transferfunction[1] != -- t2p->tiff_transferfunction[0])) { -+ (t2p->tiff_transferfunction[2] != (float*) NULL) -+ ) { - t2p->tiff_transferfunctioncount=3; - } else { - t2p->tiff_transferfunctioncount=1; --- -2.7.4 - diff --git a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-10963.patch b/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-10963.patch deleted file mode 100644 index 7252298b..00000000 --- a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-10963.patch +++ /dev/null @@ -1,39 +0,0 @@ -From de144fd228e4be8aa484c3caf3d814b6fa88c6d9 Mon Sep 17 00:00:00 2001 -From: Even Rouault <even.rouault@spatialys.com> -Date: Sat, 12 May 2018 14:24:15 +0200 -Subject: [PATCH] TIFFWriteDirectorySec: avoid assertion. Fixes - http://bugzilla.maptools.org/show_bug.cgi?id=2795. - CVE-2018-10963 - ---- -CVE: CVE-2018-10963 - -Upstream-Status: Backport [gitlab.com/libtiff/libtiff/commit/de144f...] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - ---- - libtiff/tif_dirwrite.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/libtiff/tif_dirwrite.c b/libtiff/tif_dirwrite.c -index 2430de6..c15a28d 100644 ---- a/libtiff/tif_dirwrite.c -+++ b/libtiff/tif_dirwrite.c -@@ -695,8 +695,11 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff) - } - break; - default: -- assert(0); /* we should never get here */ -- break; -+ TIFFErrorExt(tif->tif_clientdata,module, -+ "Cannot write tag %d (%s)", -+ TIFFFieldTag(o), -+ o->field_name ? o->field_name : "unknown"); -+ goto bad; - } - } - } --- -1.7.9.5 - diff --git a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-5784.patch b/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-5784.patch deleted file mode 100644 index 406001d5..00000000 --- a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-5784.patch +++ /dev/null @@ -1,135 +0,0 @@ -From 6cdea15213be6b67d9f8380c7bb40e325d3adace Mon Sep 17 00:00:00 2001 -From: Nathan Baker <nathanb@lenovo-chrome.com> -Date: Tue, 6 Feb 2018 10:13:57 -0500 -Subject: [PATCH] Fix for bug 2772 - -It is possible to craft a TIFF document where the IFD list is circular, -leading to an infinite loop while traversing the chain. The libtiff -directory reader has a failsafe that will break out of this loop after -reading 65535 directory entries, but it will continue processing, -consuming time and resources to process what is essentially a bogus TIFF -document. - -This change fixes the above behavior by breaking out of processing when -a TIFF document has >= 65535 directories and terminating with an error. - -Upstream-Status: Backport -[https://gitlab.com/libtiff/libtiff/commit/473851d211cf8805a161820337ca74cc9615d6ef] - -CVE: CVE-2018-5784 - -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> ---- - contrib/addtiffo/tif_overview.c | 14 +++++++++++++- - tools/tiff2pdf.c | 10 ++++++++++ - tools/tiffcrop.c | 13 +++++++++++-- - 3 files changed, 34 insertions(+), 3 deletions(-) - -diff --git a/contrib/addtiffo/tif_overview.c b/contrib/addtiffo/tif_overview.c -index c61ffbb..03b3573 100644 ---- a/contrib/addtiffo/tif_overview.c -+++ b/contrib/addtiffo/tif_overview.c -@@ -65,6 +65,8 @@ - # define MAX(a,b) ((a>b) ? a : b) - #endif - -+#define TIFF_DIR_MAX 65534 -+ - void TIFFBuildOverviews( TIFF *, int, int *, int, const char *, - int (*)(double,void*), void * ); - -@@ -91,6 +93,7 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize, - { - toff_t nBaseDirOffset; - toff_t nOffset; -+ tdir_t iNumDir; - - (void) bUseSubIFDs; - -@@ -147,7 +150,16 @@ uint32 TIFF_WriteOverview( TIFF *hTIFF, uint32 nXSize, uint32 nYSize, - return 0; - - TIFFWriteDirectory( hTIFF ); -- TIFFSetDirectory( hTIFF, (tdir_t) (TIFFNumberOfDirectories(hTIFF)-1) ); -+ iNumDir = TIFFNumberOfDirectories(hTIFF); -+ if( iNumDir > TIFF_DIR_MAX ) -+ { -+ TIFFErrorExt( TIFFClientdata(hTIFF), -+ "TIFF_WriteOverview", -+ "File `%s' has too many directories.\n", -+ TIFFFileName(hTIFF) ); -+ exit(-1); -+ } -+ TIFFSetDirectory( hTIFF, (tdir_t) (iNumDir - 1) ); - - nOffset = TIFFCurrentDirOffset( hTIFF ); - -diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c -index 0b5973e..ef5d6a0 100644 ---- a/tools/tiff2pdf.c -+++ b/tools/tiff2pdf.c -@@ -68,6 +68,8 @@ extern int getopt(int, char**, char*); - - #define PS_UNIT_SIZE 72.0F - -+#define TIFF_DIR_MAX 65534 -+ - /* This type is of PDF color spaces. */ - typedef enum { - T2P_CS_BILEVEL = 0x01, /* Bilevel, black and white */ -@@ -1051,6 +1053,14 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){ - float* tiff_transferfunction[3]; - - directorycount=TIFFNumberOfDirectories(input); -+ if(directorycount > TIFF_DIR_MAX) { -+ TIFFError( -+ TIFF2PDF_MODULE, -+ "TIFF contains too many directories, %s", -+ TIFFFileName(input)); -+ t2p->t2p_error = T2P_ERR_ERROR; -+ return; -+ } - t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE))); - if(t2p->tiff_pages==NULL){ - TIFFError( -diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c -index c69177e..c60cb38 100644 ---- a/tools/tiffcrop.c -+++ b/tools/tiffcrop.c -@@ -217,6 +217,8 @@ extern int getopt(int argc, char * const argv[], const char *optstring); - #define DUMP_TEXT 1 - #define DUMP_RAW 2 - -+#define TIFF_DIR_MAX 65534 -+ - /* Offsets into buffer for margins and fixed width and length segments */ - struct offset { - uint32 tmargin; -@@ -2233,7 +2235,7 @@ main(int argc, char* argv[]) - pageNum = -1; - else - total_images = 0; -- /* read multiple input files and write to output file(s) */ -+ /* Read multiple input files and write to output file(s) */ - while (optind < argc - 1) - { - in = TIFFOpen (argv[optind], "r"); -@@ -2241,7 +2243,14 @@ main(int argc, char* argv[]) - return (-3); - - /* If only one input file is specified, we can use directory count */ -- total_images = TIFFNumberOfDirectories(in); -+ total_images = TIFFNumberOfDirectories(in); -+ if (total_images > TIFF_DIR_MAX) -+ { -+ TIFFError (TIFFFileName(in), "File contains too many directories"); -+ if (out != NULL) -+ (void) TIFFClose(out); -+ return (1); -+ } - if (image_count == 0) - { - dirnum = 0; --- -2.7.4 - diff --git a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-7456.patch b/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-7456.patch deleted file mode 100644 index 2c11f93d..00000000 --- a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-7456.patch +++ /dev/null @@ -1,178 +0,0 @@ -From be4c85b16e8801a16eec25e80eb9f3dd6a96731b Mon Sep 17 00:00:00 2001 -From: Hugo Lefeuvre <hle@debian.org> -Date: Sun, 8 Apr 2018 14:07:08 -0400 -Subject: [PATCH] Fix NULL pointer dereference in TIFFPrintDirectory - -The TIFFPrintDirectory function relies on the following assumptions, -supposed to be guaranteed by the specification: - -(a) A Transfer Function field is only present if the TIFF file has - photometric type < 3. - -(b) If SamplesPerPixel > Color Channels, then the ExtraSamples field - has count SamplesPerPixel - (Color Channels) and contains - information about supplementary channels. - -While respect of (a) and (b) are essential for the well functioning of -TIFFPrintDirectory, no checks are realized neither by the callee nor -by TIFFPrintDirectory itself. Hence, following scenarios might happen -and trigger the NULL pointer dereference: - -(1) TIFF File of photometric type 4 or more has illegal Transfer - Function field. - -(2) TIFF File has photometric type 3 or less and defines a - SamplesPerPixel field such that SamplesPerPixel > Color Channels - without defining all extra samples in the ExtraSamples fields. - -In this patch, we address both issues with respect of the following -principles: - -(A) In the case of (1), the defined transfer table should be printed - safely even if it isn't 'legal'. This allows us to avoid expensive - checks in TIFFPrintDirectory. Also, it is quite possible that - an alternative photometric type would be developed (not part of the - standard) and would allow definition of Transfer Table. We want - libtiff to be able to handle this scenario out of the box. - -(B) In the case of (2), the transfer table should be printed at its - right size, that is if TIFF file has photometric type Palette - then the transfer table should have one row and not three, even - if two extra samples are declared. - -In order to fulfill (A) we simply add a new 'i < 3' end condition to -the broken TIFFPrintDirectory loop. This makes sure that in any case -where (b) would be respected but not (a), everything stays fine. - -(B) is fulfilled by the loop condition -'i < td->td_samplesperpixel - td->td_extrasamples'. This is enough as -long as (b) is respected. - -Naturally, we also make sure (b) is respected. This is done in the -TIFFReadDirectory function by making sure any non-color channel is -counted in ExtraSamples. - -This commit addresses CVE-2018-7456. - ---- -CVE: CVE-2018-7456 - -Upstream-Status: Backport [gitlab.com/libtiff/libtiff/commit/be4c85b...] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - ---- - libtiff/tif_dirread.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++ - libtiff/tif_print.c | 2 +- - 2 files changed, 63 insertions(+), 1 deletion(-) - -diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c -index 6baa7b3..af5b84a 100644 ---- a/libtiff/tif_dirread.c -+++ b/libtiff/tif_dirread.c -@@ -165,6 +165,7 @@ static int TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, uint32 nstrips, uin - static int TIFFFetchSubjectDistance(TIFF*, TIFFDirEntry*); - static void ChopUpSingleUncompressedStrip(TIFF*); - static uint64 TIFFReadUInt64(const uint8 *value); -+static int _TIFFGetMaxColorChannels(uint16 photometric); - - static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount ); - -@@ -3505,6 +3506,35 @@ static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, c - } - - /* -+ * Return the maximum number of color channels specified for a given photometric -+ * type. 0 is returned if photometric type isn't supported or no default value -+ * is defined by the specification. -+ */ -+static int _TIFFGetMaxColorChannels( uint16 photometric ) -+{ -+ switch (photometric) { -+ case PHOTOMETRIC_PALETTE: -+ case PHOTOMETRIC_MINISWHITE: -+ case PHOTOMETRIC_MINISBLACK: -+ return 1; -+ case PHOTOMETRIC_YCBCR: -+ case PHOTOMETRIC_RGB: -+ case PHOTOMETRIC_CIELAB: -+ return 3; -+ case PHOTOMETRIC_SEPARATED: -+ case PHOTOMETRIC_MASK: -+ return 4; -+ case PHOTOMETRIC_LOGL: -+ case PHOTOMETRIC_LOGLUV: -+ case PHOTOMETRIC_CFA: -+ case PHOTOMETRIC_ITULAB: -+ case PHOTOMETRIC_ICCLAB: -+ default: -+ return 0; -+ } -+} -+ -+/* - * Read the next TIFF directory from a file and convert it to the internal - * format. We read directories sequentially. - */ -@@ -3520,6 +3550,7 @@ TIFFReadDirectory(TIFF* tif) - uint32 fii=FAILED_FII; - toff_t nextdiroff; - int bitspersample_read = FALSE; -+ int color_channels; - - tif->tif_diroff=tif->tif_nextdiroff; - if (!TIFFCheckDirOffset(tif,tif->tif_nextdiroff)) -@@ -4024,6 +4055,37 @@ TIFFReadDirectory(TIFF* tif) - } - } - } -+ -+ /* -+ * Make sure all non-color channels are extrasamples. -+ * If it's not the case, define them as such. -+ */ -+ color_channels = _TIFFGetMaxColorChannels(tif->tif_dir.td_photometric); -+ if (color_channels && tif->tif_dir.td_samplesperpixel - tif->tif_dir.td_extrasamples > color_channels) { -+ uint16 old_extrasamples; -+ uint16 *new_sampleinfo; -+ -+ TIFFWarningExt(tif->tif_clientdata,module, "Sum of Photometric type-related " -+ "color channels and ExtraSamples doesn't match SamplesPerPixel. " -+ "Defining non-color channels as ExtraSamples."); -+ -+ old_extrasamples = tif->tif_dir.td_extrasamples; -+ tif->tif_dir.td_extrasamples = (tif->tif_dir.td_samplesperpixel - color_channels); -+ -+ // sampleinfo should contain information relative to these new extra samples -+ new_sampleinfo = (uint16*) _TIFFcalloc(tif->tif_dir.td_extrasamples, sizeof(uint16)); -+ if (!new_sampleinfo) { -+ TIFFErrorExt(tif->tif_clientdata, module, "Failed to allocate memory for " -+ "temporary new sampleinfo array (%d 16 bit elements)", -+ tif->tif_dir.td_extrasamples); -+ goto bad; -+ } -+ -+ memcpy(new_sampleinfo, tif->tif_dir.td_sampleinfo, old_extrasamples * sizeof(uint16)); -+ _TIFFsetShortArray(&tif->tif_dir.td_sampleinfo, new_sampleinfo, tif->tif_dir.td_extrasamples); -+ _TIFFfree(new_sampleinfo); -+ } -+ - /* - * Verify Palette image has a Colormap. - */ -diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c -index 8deceb2..1d86adb 100644 ---- a/libtiff/tif_print.c -+++ b/libtiff/tif_print.c -@@ -544,7 +544,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) - uint16 i; - fprintf(fd, " %2ld: %5u", - l, td->td_transferfunction[0][l]); -- for (i = 1; i < td->td_samplesperpixel; i++) -+ for (i = 1; i < td->td_samplesperpixel - td->td_extrasamples && i < 3; i++) - fprintf(fd, " %5u", - td->td_transferfunction[i][l]); - fputc('\n', fd); --- -1.7.9.5 - diff --git a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-8905.patch b/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-8905.patch deleted file mode 100644 index 962646db..00000000 --- a/external/poky/meta/recipes-multimedia/libtiff/files/CVE-2018-8905.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 58a898cb4459055bb488ca815c23b880c242a27d Mon Sep 17 00:00:00 2001 -From: Even Rouault <even.rouault@spatialys.com> -Date: Sat, 12 May 2018 15:32:31 +0200 -Subject: [PATCH] LZWDecodeCompat(): fix potential index-out-of-bounds write. - Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2780 / - CVE-2018-8905 - -The fix consists in using the similar code LZWDecode() to validate we -don't write outside of the output buffer. - ---- -CVE: CVE-2018-8905 - -Upstream-Status: Backport [gitlab.com/libtiff/libtiff/commit/58a898...] - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - ---- - libtiff/tif_lzw.c | 18 ++++++++++++------ - 1 file changed, 12 insertions(+), 6 deletions(-) - -diff --git a/libtiff/tif_lzw.c b/libtiff/tif_lzw.c -index 4ccb443..94d85e3 100644 ---- a/libtiff/tif_lzw.c -+++ b/libtiff/tif_lzw.c -@@ -602,6 +602,7 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) - char *tp; - unsigned char *bp; - int code, nbits; -+ int len; - long nextbits, nextdata, nbitsmask; - code_t *codep, *free_entp, *maxcodep, *oldcodep; - -@@ -753,13 +754,18 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s) - } while (--occ); - break; - } -- assert(occ >= codep->length); -- op += codep->length; -- occ -= codep->length; -- tp = op; -+ len = codep->length; -+ tp = op + len; - do { -- *--tp = codep->value; -- } while( (codep = codep->next) != NULL ); -+ int t; -+ --tp; -+ t = codep->value; -+ codep = codep->next; -+ *tp = (char)t; -+ } while (codep && tp > op); -+ assert(occ >= len); -+ op += len; -+ occ -= len; - } else { - *op++ = (char)code; - occ--; --- -1.7.9.5 - diff --git a/external/poky/meta/recipes-multimedia/libtiff/files/libtool2.patch b/external/poky/meta/recipes-multimedia/libtiff/files/libtool2.patch deleted file mode 100644 index a84c6889..00000000 --- a/external/poky/meta/recipes-multimedia/libtiff/files/libtool2.patch +++ /dev/null @@ -1,19 +0,0 @@ -Upstream-Status: Inappropriate [configuration] - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: tiff-4.0.9/configure.ac -=================================================================== ---- tiff-4.0.9.orig/configure.ac -+++ tiff-4.0.9/configure.ac -@@ -27,7 +27,7 @@ dnl Process this file with autoconf to p - AC_PREREQ(2.64) - AC_INIT([LibTIFF Software],[4.0.9],[tiff@lists.maptools.org],[tiff]) - AC_CONFIG_AUX_DIR(config) --AC_CONFIG_MACRO_DIR(m4) -+dnl AC_CONFIG_MACRO_DIR(m4) - AC_LANG(C) - - dnl Compute the canonical host (run-time) system type variable diff --git a/external/poky/meta/recipes-multimedia/libtiff/tiff_4.0.9.bb b/external/poky/meta/recipes-multimedia/libtiff/tiff_4.1.0.bb index 93beddb4..1f92c185 100644 --- a/external/poky/meta/recipes-multimedia/libtiff/tiff_4.0.9.bb +++ b/external/poky/meta/recipes-multimedia/libtiff/tiff_4.1.0.bb @@ -5,18 +5,9 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" CVE_PRODUCT = "libtiff" SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - file://libtool2.patch \ - file://CVE-2017-9935.patch \ - file://CVE-2017-18013.patch \ - file://CVE-2018-5784.patch \ - file://CVE-2018-10963.patch \ - file://CVE-2018-8905.patch \ - file://CVE-2018-7456.patch \ - file://CVE-2017-17095.patch \ " - -SRC_URI[md5sum] = "54bad211279cc93eb4fca31ba9bfdc79" -SRC_URI[sha256sum] = "6e7bdeec2c310734e734d19aae3a71ebe37a4d842e0e23dbb1b8921c0026cfcd" +SRC_URI[md5sum] = "2165e7aba557463acc0664e71a3ed424" +SRC_URI[sha256sum] = "5d29f32517dadb6dbcd1255ea5bbc93a2b54b94fbf83653b4d65c7d6775b8634" # exclude betas UPSTREAM_CHECK_REGEX = "tiff-(?P<pver>\d+(\.\d+)+).tar" diff --git a/external/poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.6.bb b/external/poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.6.bb index cbda6dc2..1a3cdc22 100644 --- a/external/poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.6.bb +++ b/external/poky/meta/recipes-multimedia/libvorbis/libvorbis_1.3.6.bb @@ -5,7 +5,7 @@ is the main vorbis codec library." HOMEPAGE = "http://www.vorbis.com/" BUGTRACKER = "https://trac.xiph.org" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=70c7063491d2d9f76a098d62ed5134f1 \ file://include/vorbis/vorbisenc.h;beginline=1;endline=11;md5=d1c1d138863d6315131193d4046d81cb" DEPENDS = "libogg" diff --git a/external/poky/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch b/external/poky/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch new file mode 100644 index 00000000..b2544cb4 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/mpeg2dec/files/0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch @@ -0,0 +1,156 @@ +From 0cafb99b57f43cf6ac2c6208718e49ad2dbe462d Mon Sep 17 00:00:00 2001 +From: Jan Schmidt <thaytan@noraisin.net> +Date: Sun, 10 Nov 2013 00:49:52 +1100 +Subject: [PATCH] Import revision 1206 from upstream to fix PIE build. + +Functions MC_put_o_16_arm, MC_put_o_8_arm, MC_put_x_16_arm, MC_put_x_8_arm +in libmpeg2/motion_comp_arm_s.S have addresses in .text, which is bad +for shared libraries. Some environments demand that .text actually be +read-only all the time, yet MC_put_o_16_arm etc require that the addresses +be modified by the dynamic linking mechanism (dlopen, LoadLibrary, etc.) +Even in those environments which permit the dynamic linker to modify the +.text segment, the runtime cost of doing the relocation can be noticeable. + +This commit rewrites the linkage, discarding the tables of addresses +in favor of tables of offsets. All transfers are local within each individual +function, so there can be no interference by processing that occurs +after assembly, such as link-time re-ordering (even of individual functions.) + +Patch by John Reiser <jreiser@bitwagon.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Backport [https://code.videolan.org/videolan/libmpeg2/commit/946bf4b518aacc224f845e73708f99e394744499] +--- + libmpeg2/motion_comp_arm_s.S | 70 +++++++++++++++++------------------- + 1 file changed, 33 insertions(+), 37 deletions(-) + +diff --git a/libmpeg2/motion_comp_arm_s.S b/libmpeg2/motion_comp_arm_s.S +index c921f7c..82143f8 100644 +--- a/libmpeg2/motion_comp_arm_s.S ++++ b/libmpeg2/motion_comp_arm_s.S +@@ -30,9 +30,13 @@ MC_put_o_16_arm: + pld [r1] + stmfd sp!, {r4-r11, lr} @ R14 is also called LR + and r4, r1, #3 +- adr r5, MC_put_o_16_arm_align_jt +- add r5, r5, r4, lsl #2 +- ldr pc, [r5] ++ ldrb r4, [pc, r4] ++ add pc, pc, r4, lsl #2 ++ .byte (MC_put_o_16_arm_align0 - 0f)>>2 ++ .byte (MC_put_o_16_arm_align1 - 0f)>>2 ++ .byte (MC_put_o_16_arm_align2 - 0f)>>2 ++ .byte (MC_put_o_16_arm_align3 - 0f)>>2 ++0: + + MC_put_o_16_arm_align0: + ldmia r1, {r4-r7} +@@ -76,11 +80,6 @@ MC_put_o_16_arm_align3: + 1: PROC(24) + bne 1b + ldmfd sp!, {r4-r11, pc} @@ update PC with LR content. +-MC_put_o_16_arm_align_jt: +- .word MC_put_o_16_arm_align0 +- .word MC_put_o_16_arm_align1 +- .word MC_put_o_16_arm_align2 +- .word MC_put_o_16_arm_align3 + + @ ---------------------------------------------------------------- + .align +@@ -91,9 +90,14 @@ MC_put_o_8_arm: + pld [r1] + stmfd sp!, {r4-r10, lr} @ R14 is also called LR + and r4, r1, #3 +- adr r5, MC_put_o_8_arm_align_jt +- add r5, r5, r4, lsl #2 +- ldr pc, [r5] ++ ldrb r4, [pc, r4] ++ add pc, pc, r4, lsl #2 ++ .byte (MC_put_o_8_arm_align0 - 0f)>>2 ++ .byte (MC_put_o_8_arm_align1 - 0f)>>2 ++ .byte (MC_put_o_8_arm_align2 - 0f)>>2 ++ .byte (MC_put_o_8_arm_align3 - 0f)>>2 ++0: ++ + MC_put_o_8_arm_align0: + ldmia r1, {r4-r5} + add r1, r1, r2 +@@ -135,12 +139,6 @@ MC_put_o_8_arm_align3: + bne 1b + ldmfd sp!, {r4-r10, pc} @@ update PC with LR content. + +-MC_put_o_8_arm_align_jt: +- .word MC_put_o_8_arm_align0 +- .word MC_put_o_8_arm_align1 +- .word MC_put_o_8_arm_align2 +- .word MC_put_o_8_arm_align3 +- + @ ---------------------------------------------------------------- + .macro AVG_PW rW1, rW2 + mov \rW2, \rW2, lsl #24 +@@ -160,12 +158,17 @@ MC_put_x_16_arm: + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) + pld [r1] + stmfd sp!, {r4-r11,lr} @ R14 is also called LR ++ ldr r11, 0f + and r4, r1, #3 +- adr r5, MC_put_x_16_arm_align_jt +- ldr r11, [r5] + mvn r12, r11 +- add r5, r5, r4, lsl #2 +- ldr pc, [r5, #4] ++ ldrb r4, [pc, r4] ++ add pc, pc, r4, lsl #2 ++ .byte (MC_put_x_16_arm_align0 - 0f)>>2 ++ .byte (MC_put_x_16_arm_align1 - 0f)>>2 ++ .byte (MC_put_x_16_arm_align2 - 0f)>>2 ++ .byte (MC_put_x_16_arm_align3 - 0f)>>2 ++0: ++ .word 0x01010101 + + .macro ADJ_ALIGN_QW shift, R0, R1, R2, R3, R4 + mov \R0, \R0, lsr #(\shift) +@@ -238,12 +241,6 @@ MC_put_x_16_arm_align3: + add r0, r0, r2 + bne 1b + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. +-MC_put_x_16_arm_align_jt: +- .word 0x01010101 +- .word MC_put_x_16_arm_align0 +- .word MC_put_x_16_arm_align1 +- .word MC_put_x_16_arm_align2 +- .word MC_put_x_16_arm_align3 + + @ ---------------------------------------------------------------- + .align +@@ -253,12 +250,17 @@ MC_put_x_8_arm: + @@ void func(uint8_t * dest, const uint8_t * ref, int stride, int height) + pld [r1] + stmfd sp!, {r4-r11,lr} @ R14 is also called LR ++ ldr r11, 0f + and r4, r1, #3 +- adr r5, MC_put_x_8_arm_align_jt +- ldr r11, [r5] + mvn r12, r11 +- add r5, r5, r4, lsl #2 +- ldr pc, [r5, #4] ++ ldrb r4, [pc, r4] ++ add pc, pc, r4, lsl #2 ++ .byte (MC_put_x_8_arm_align0 - 0f)>>2 ++ .byte (MC_put_x_8_arm_align1 - 0f)>>2 ++ .byte (MC_put_x_8_arm_align2 - 0f)>>2 ++ .byte (MC_put_x_8_arm_align3 - 0f)>>2 ++0: ++ .word 0x01010101 + + .macro ADJ_ALIGN_DW shift, R0, R1, R2 + mov \R0, \R0, lsr #(\shift) +@@ -319,9 +321,3 @@ MC_put_x_8_arm_align3: + add r0, r0, r2 + bne 1b + ldmfd sp!, {r4-r11,pc} @@ update PC with LR content. +-MC_put_x_8_arm_align_jt: +- .word 0x01010101 +- .word MC_put_x_8_arm_align0 +- .word MC_put_x_8_arm_align1 +- .word MC_put_x_8_arm_align2 +- .word MC_put_x_8_arm_align3 diff --git a/external/poky/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch b/external/poky/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch new file mode 100644 index 00000000..00b667d3 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/mpeg2dec/files/61_global-symbol-test.patch @@ -0,0 +1,70 @@ +Rewrite the public symbol check to verify the shared libraries, to check for +more things, and to avoid duplication; fixes make check on ARM + +Taken From +https://sources.debian.org/src/mpeg2dec/0.5.1-8/debian/patches/61_global-symbol-test.patch/ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + test/globals | 42 +++++++++++++++++++++++++++--------------- + 1 file changed, 27 insertions(+), 15 deletions(-) + +--- mpeg2dec.orig/test/globals ++++ mpeg2dec/test/globals +@@ -1,4 +1,8 @@ + #!/bin/sh ++# TODO ++# - fix checking of .a libs; problem is that "nm -g --defined-only" lists ++# internal symbols; this can be solved by using objdump, but it's probably ++# good enough to just run the tests on the shared lib + + if test x"$srcdir" != x""; then + builddir="." # running from make check, but it does not define that +@@ -14,22 +18,30 @@ builddir=`cd $builddir;pwd` + + error=0 + +-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/*.o |\ +- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2_'` +- +-if test x"$bad_globals" != x""; then +- echo BAD GLOBAL SYMBOLS: +- for s in $bad_globals; do echo $s; done ++# check_bad_public_symbols <symbol prefix> <lib file> [<lib file>...] ++# ++# checks public symbols in shared libs: ++# - allow prefix_anything ++# - reject _prefixanything ++# - allow _anything ++# - reject anything else ++# ++# NB: skips missing files ++check_bad_public_symbols() { ++ symbols_prefix="$1" ++ shift ++ lib_files=`ls "$@" 2>/dev/null` ++ [ -z "$lib_files" ] && return ++ bad_globals=`nm -g --defined-only $lib_files | ++ awk '{if ($3) print $3}' | ++ sed -n "/^${symbols_prefix}_/ d; /^_${symbols_prefix}/ { p; d }; /^_/ d; p"` ++ [ -z "$bad_globals" ] && return + error=1 +-fi +- +-bad_globals=`nm -g --defined-only $builddir/../libmpeg2/convert/*.o |\ +- awk '{if ($3) print $3}' | grep -v '^_\?mpeg2convert_'` ++ echo BAD GLOBAL SYMBOLS in $lib_files: ++ echo "$bad_globals" ++} + +-if test x"$bad_globals" != x""; then +- echo BAD GLOBAL SYMBOLS: +- for s in $bad_globals; do echo $s; done +- error=1 +-fi ++check_bad_public_symbols mpeg2 $builddir/../libmpeg2/.libs/libmpeg2.so ++check_bad_public_symbols mpeg2convert $builddir/../libmpeg2/convert/.libs/libmpeg2convert.so + + exit $error diff --git a/external/poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb b/external/poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb index 7711c2dc..00ca3675 100644 --- a/external/poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb +++ b/external/poky/meta/recipes-multimedia/mpeg2dec/mpeg2dec_0.5.1.bb @@ -10,6 +10,8 @@ SRC_URI = "http://libmpeg2.sourceforge.net/files/libmpeg2-${PV}.tar.gz \ file://altivec_h_needed.patch \ file://0001-check-for-available-arm-optimizations.patch \ file://0002-Set-visibility-of-global-symbols-used-in-ARM-specifi.patch \ + file://61_global-symbol-test.patch \ + file://0001-Import-revision-1206-from-upstream-to-fix-PIE-build.patch \ " S = "${WORKDIR}/libmpeg2-${PV}" diff --git a/external/poky/meta/recipes-multimedia/mpg123/mpg123/sdl2.patch b/external/poky/meta/recipes-multimedia/mpg123/mpg123/sdl2.patch new file mode 100644 index 00000000..9dc9b923 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/mpg123/mpg123/sdl2.patch @@ -0,0 +1,14 @@ +Use libsdl2 instead of libsdl 1.2, which is dead upstream. + +Luckily the API that mpg123 use didn't change so this is a trivial change. + +Upstream-Status: Submitted [https://sourceforge.net/p/mpg123/bugs/268/] +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/configure.ac b/configure.ac +index 6216d4f..b8d3344 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1694 +1694 @@ do +- PKG_CHECK_MODULES(SDL, sdl, output_modules="$output_modules sdl" HAVE_SDL="yes", HAVE_SDL="no" check_failed=yes) ++ PKG_CHECK_MODULES(SDL, sdl2, output_modules="$output_modules sdl" HAVE_SDL="yes", HAVE_SDL="no" check_failed=yes) diff --git a/external/poky/meta/recipes-multimedia/mpg123/mpg123_1.25.10.bb b/external/poky/meta/recipes-multimedia/mpg123/mpg123_1.25.13.bb index ff2b7d89..125574fc 100644 --- a/external/poky/meta/recipes-multimedia/mpg123/mpg123_1.25.10.bb +++ b/external/poky/meta/recipes-multimedia/mpg123/mpg123_1.25.13.bb @@ -9,9 +9,10 @@ SECTION = "multimedia" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=1e86753638d3cf2512528b99079bc4f3" -SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2" -SRC_URI[md5sum] = "ea32caa61d41d8be797f0b04a1b43ad9" -SRC_URI[sha256sum] = "6c1337aee2e4bf993299851c70b7db11faec785303cfca3a5c3eb5f329ba7023" +SRC_URI = "https://www.mpg123.de/download/${BP}.tar.bz2 \ + file://sdl2.patch" +SRC_URI[md5sum] = "294a6c30546504ec3d0deac2b2ea22be" +SRC_URI[sha256sum] = "90306848359c793fd43b9906e52201df18775742dc3c81c06ab67a806509890a" inherit autotools pkgconfig @@ -27,7 +28,7 @@ PACKAGECONFIG[jack] = ",,jack" PACKAGECONFIG[openal] = ",,openal-soft" PACKAGECONFIG[portaudio] = ",,portaudio-v19" PACKAGECONFIG[pulseaudio] = "--with-default-audio=pulse,,pulseaudio" -PACKAGECONFIG[sdl] = ",,libsdl" +PACKAGECONFIG[sdl] = ",,libsdl2" # Following are possible sound output modules: # alsa arts coreaudio dummy esd jack nas openal os2 oss portaudio pulse sdl sndio sun tinyalsa win32 win32_wasapi diff --git a/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index f5266903..c7f3e670 100644 --- a/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -56,12 +56,20 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=0e5cd938de1a7a53ea5adac38cc10c39 \ file://src/pulsecore/filter/biquad.h;beginline=1;endline=4;md5=6d46d1365206528a20137355924233c1 \ " -DEPENDS = "libatomic-ops libsndfile1 libtool intltool-native" +DEPENDS = "libatomic-ops libsndfile1 libtool" # optional -DEPENDS += "udev alsa-lib glib-2.0 gconf" +DEPENDS += "udev alsa-lib glib-2.0" DEPENDS += "speexdsp libxml-parser-perl-native libcap" -inherit autotools bash-completion pkgconfig useradd gettext perlnative bluetooth systemd manpages +inherit autotools bash-completion pkgconfig useradd gettext perlnative systemd manpages gsettings + +# When compiling for Thumb or Thumb2, frame pointers _must_ be disabled since the +# Thumb frame pointer in r7 clashes with pulseaudio's use of inline asm to make syscalls +# (where r7 is used for the syscall NR). In most cases, frame pointers will be +# disabled automatically due to the optimisation level, but append an explicit +# -fomit-frame-pointer to handle cases where optimisation is set to -O0 or frame +# pointers have been enabled by -fno-omit-frame-pointer earlier in CFLAGS, etc. +CFLAGS_append_arm = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" # *.desktop rules wont be generated during configure and build will fail # if using --disable-nls @@ -76,8 +84,9 @@ EXTRA_OECONF = "\ --with-database=simple \ --without-zsh-completion-dir \ --with-udev-rules-dir=`pkg-config --variable=udevdir udev`/rules.d \ - ac_cv_header_valgrind_memcheck_h=no \ - --disable-tests \ + ac_cv_header_valgrind_memcheck_h=no \ + --disable-tests \ + --disable-running-from-build-tree \ " # soxr (the SoX Resampler library) doesn't seem to be currently packaged in @@ -97,20 +106,17 @@ EXTRA_OECONF += "--without-fftw" # very good anyway, better alternatives exist (such as the webrtc canceller). EXTRA_OECONF += "--disable-adrian-aec" -# FIXME: The gsettings module is temporarily disabled, because adding support -# for it is a bit complicated. -EXTRA_OECONF += "--disable-gsettings" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \ +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', '3g', 'ofono', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd x11', d)} \ - dbus \ + dbus gsettings \ " PACKAGECONFIG[dbus] = "--enable-dbus,--disable-dbus,dbus" -PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4 sbc" PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5 sbc" +PACKAGECONFIG[gconf] = "--enable-gconf,--disable-gconf,gconf" +PACKAGECONFIG[gsettings] = "--enable-gsettings,--disable-gsettings,glib-2.0-native glib-2.0" PACKAGECONFIG[ofono] = "--enable-bluez5-ofono-headset,--disable-bluez5-ofono-headset,ofono" PACKAGECONFIG[gtk] = "--enable-gtk3,--disable-gtk3,gtk+3" PACKAGECONFIG[systemd] = "--enable-systemd-daemon --enable-systemd-login --enable-systemd-journal --with-systemduserunitdir=${systemd_user_unitdir},--disable-systemd-daemon --disable-systemd-login --disable-systemd-journal,systemd" @@ -160,12 +166,22 @@ USERADD_PARAM_pulseaudio-server = "--system --home /var/run/pulse \ --no-create-home --shell /bin/false \ --groups audio,pulse --gid pulse pulse" +PACKAGES =+ "\ + libpulse \ + libpulse-mainloop-glib \ + libpulse-simple \ + libpulsecommon \ + libpulsecore \ + ${PN}-pa-info \ + ${PN}-server \ + ${PN}-misc \ + " + # The console-kit module is included here explicitly so bitbake can map to the # RDEPENDS we define for it in this recipe, and thereby ensure that when # adding the console-kit module to an image, we also get the necessary # consolekit package produced. -PACKAGES =+ "libpulsecore libpulsecommon libpulse libpulse-simple libpulse-mainloop-glib \ - pulseaudio-server pulseaudio-misc ${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'pulseaudio-module-console-kit', '', d)}" +PACKAGES =+ "${@bb.utils.contains('PACKAGECONFIG', 'dbus', 'pulseaudio-module-console-kit', '', d)}" #upgrade path: RREPLACES_pulseaudio-server = "libpulse-bin libpulse-conf" @@ -185,6 +201,7 @@ FILES_libpulse-mainloop-glib = "${libdir}/libpulse-mainloop-glib.so.*" FILES_${PN}-dev += "${libdir}/pulse-${PV}/modules/*.la ${datadir}/vala ${libdir}/cmake" FILES_${PN}-conf = "${sysconfdir}" FILES_${PN}-bin += "${sysconfdir}/default/volatiles/volatiles.04_pulse" +FILES_${PN}-pa-info = "${bindir}/pa-info" FILES_${PN}-server = "${bindir}/pulseaudio ${bindir}/start-* ${sysconfdir} ${bindir}/pactl */udev/rules.d/*.rules */*/udev/rules.d/*.rules ${systemd_user_unitdir}/*" #SYSTEMD_PACKAGES = "${PN}-server" @@ -193,6 +210,7 @@ SYSTEMD_SERVICE_${PN}-server = "pulseaudio.service" FILES_${PN}-misc = "${bindir}/* ${libdir}/pulseaudio/libpulsedsp.so" # Allow the pulseaudio package to be created empty as a placeholder (-dbg and -dev depend on it) +FILES_${PN} = "" ALLOW_EMPTY_${PN} = "1" CONFFILES_libpulse = "${sysconfdir}/pulse/client.conf" @@ -210,13 +228,21 @@ pkg_postinst_${PN}-server() { } python populate_packages_prepend() { - #d.setVar('PKG_pulseaudio', 'pulseaudio') - plugindir = d.expand('${libdir}/pulse-${PV}/modules/') - do_split_packages(d, plugindir, '^module-(.*)\.so$', 'pulseaudio-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True) - do_split_packages(d, plugindir, '^lib(.*)\.so$', 'pulseaudio-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True) + do_split_packages(d, plugindir, r'^module-(.*)\.so$', '${PN}-module-%s', 'PulseAudio module for %s', extra_depends='', prepend=True) + do_split_packages(d, plugindir, r'^lib(.*)\.so$', '${PN}-lib-%s', 'PulseAudio library for %s', extra_depends='', prepend=True) } +# pa-info is a bash script that collects information about the audio setup. +# It's primarily useful for attaching an information dump when reporting bugs. +RDEPENDS_${PN}-pa-info = "\ + alsa-utils-amixer \ + alsa-utils-aplay \ + alsa-utils-scripts \ + bash \ + ${PN}-server \ + " + RDEPENDS_pulseaudio-server = " \ pulseaudio-module-filter-apply \ pulseaudio-module-filter-heuristics \ @@ -250,8 +276,11 @@ RDEPENDS_pulseaudio-server += "alsa-plugins-pulseaudio-conf" RDEPENDS_pulseaudio-module-console-kit =+ "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d)}" RDEPENDS_pulseaudio-misc += "pulseaudio-module-cli-protocol-unix" -FILES_pulseaudio-module-gconf += "${libexecdir}/pulse/gconf-helper" -FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer" +FILES_${PN}-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer" +FILES_${PN}-module-gconf += "${libexecdir}/pulse/gconf-helper" + +GSETTINGS_PACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'gsettings', '${PN}-module-gsettings', '', d)}" +FILES_${PN}-module-gsettings += "${libexecdir}/pulse/gsettings-helper ${datadir}/GConf/gsettings ${datadir}/glib-2.0/schemas" # The console-kit module is good to have on X11 systems (it keeps PulseAudio # running for the duration of the user login session). The device-manager and @@ -259,9 +288,12 @@ FILES_pulseaudio-module-alsa-card += "${datadir}/pulseaudio/alsa-mixer" # modules must be installed when X11 is enabled. RDEPENDS_pulseaudio-server += "\ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '\ - pulseaudio-module-console-kit \ pulseaudio-module-device-manager \ pulseaudio-module-x11-cork-request \ pulseaudio-module-x11-publish \ pulseaudio-module-x11-xsmp \ ', '', d)}" + +RDEPENDS_pulseaudio-server += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', \ + bb.utils.contains('DISTRO_FEATURES', 'systemd', 'pulseaudio-module-systemd-login', 'pulseaudio-module-console-kit', d), \ + '', d)}" diff --git a/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-remap-arm-Adjust-inline-asm-constraints.patch b/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-remap-arm-Adjust-inline-asm-constraints.patch new file mode 100644 index 00000000..95133fd9 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-remap-arm-Adjust-inline-asm-constraints.patch @@ -0,0 +1,114 @@ +From 3450d1fcfe8a8f84553ab299cd96ae0705ddffbe Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 5 Mar 2020 11:48:28 -0800 +Subject: [PATCH] remap/arm: Adjust inline asm constraints + +gcc10 can effectively emit single precision registers if right +operand modifier constraint is not in use + +This results in assembler rejecting the code + +/tmp/ccEG4QpI.s:646: Error: VFP/Neon double precision register expected -- `vtbl.8 d3,{d0,d1},s8' +/tmp/ccEG4QpI.s:678: Error: invalid instruction shape -- `vmul.f32 d0,d0,s8' + +Therefore add %P qualifier to request double registers sinece 'w' could +mean variable could be stored in s0..s14 and GCC defaults to printing out s0..s14. +Note those registers map to d0..d7 also. + +Output generated is exactly same with gcc9, and it also now compiles +with gcc10 + +Its not documented well in gcc docs and there is a ticket for that +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84343 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/261] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/pulsecore/remap_neon.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/src/pulsecore/remap_neon.c b/src/pulsecore/remap_neon.c +index 41208986d..ca3b95b48 100644 +--- a/src/pulsecore/remap_neon.c ++++ b/src/pulsecore/remap_neon.c +@@ -189,7 +189,7 @@ static void remap_ch4_to_mono_float32ne_neon(pa_remap_t *m, float *dst, const fl + "vadd.f32 d0, d0, d1 \n\t" + "vadd.f32 d2, d2, d3 \n\t" + "vadd.f32 d0, d0, d2 \n\t" +- "vmul.f32 d0, d0, %[quart] \n\t" ++ "vmul.f32 d0, d0, %P[quart] \n\t" + "vst1.32 {d0}, [%[dst]]! \n\t" + : [dst] "+r" (dst), [src] "+r" (src) /* output operands */ + : [quart] "w" (quart) /* input operands */ +@@ -276,7 +276,7 @@ static void remap_arrange_stereo_s16ne_neon(pa_remap_t *m, int16_t *dst, const i + for (; n >= 2; n -= 2) { + __asm__ __volatile__ ( + "vld1.s16 d0, [%[src]]! \n\t" +- "vtbl.8 d0, {d0}, %[t] \n\t" ++ "vtbl.8 d0, {d0}, %P[t] \n\t" + "vst1.s16 d0, [%[dst]]! \n\t" + : [dst] "+r" (dst), [src] "+r" (src) /* output operands */ + : [t] "w" (t) /* input operands */ +@@ -287,7 +287,7 @@ static void remap_arrange_stereo_s16ne_neon(pa_remap_t *m, int16_t *dst, const i + if (n > 0) { + __asm__ __volatile__ ( + "vld1.32 d0[0], [%[src]]! \n\t" +- "vtbl.8 d0, {d0}, %[t] \n\t" ++ "vtbl.8 d0, {d0}, %P[t] \n\t" + "vst1.32 d0[0], [%[dst]]! \n\t" + : [dst] "+r" (dst), [src] "+r" (src) /* output operands */ + : [t] "w" (t) /* input operands */ +@@ -302,8 +302,8 @@ static void remap_arrange_ch2_ch4_s16ne_neon(pa_remap_t *m, int16_t *dst, const + for (; n > 0; n--) { + __asm__ __volatile__ ( + "vld1.32 d0[0], [%[src]]! \n\t" +- "vtbl.8 d0, {d0}, %[t] \n\t" +- "vst1.s16 d0, [%[dst]]! \n\t" ++ "vtbl.8 d0, {d0}, %P[t] \n\t" ++ "vst1.s16 d0, [%[dst]]! \n\t" + : [dst] "+r" (dst), [src] "+r" (src) /* output operands */ + : [t] "w" (t) /* input operands */ + : "memory", "d0" /* clobber list */ +@@ -317,7 +317,7 @@ static void remap_arrange_ch4_s16ne_neon(pa_remap_t *m, int16_t *dst, const int1 + for (; n > 0; n--) { + __asm__ __volatile__ ( + "vld1.s16 d0, [%[src]]! \n\t" +- "vtbl.8 d0, {d0}, %[t] \n\t" ++ "vtbl.8 d0, {d0}, %P[t] \n\t" + "vst1.s16 d0, [%[dst]]! \n\t" + : [dst] "+r" (dst), [src] "+r" (src) /* output operands */ + : [t] "w" (t) /* input operands */ +@@ -332,7 +332,7 @@ static void remap_arrange_stereo_float32ne_neon(pa_remap_t *m, float *dst, const + for (; n > 0; n--) { + __asm__ __volatile__ ( + "vld1.f32 d0, [%[src]]! \n\t" +- "vtbl.8 d0, {d0}, %[t] \n\t" ++ "vtbl.8 d0, {d0}, %P[t] \n\t" + "vst1.s16 {d0}, [%[dst]]! \n\t" + : [dst] "+r" (dst), [src] "+r" (src) /* output operands */ + : [t] "w" (t) /* input operands */ +@@ -349,8 +349,8 @@ static void remap_arrange_ch2_ch4_any32ne_neon(pa_remap_t *m, float *dst, const + for (; n > 0; n--) { + __asm__ __volatile__ ( + "vld1.f32 d0, [%[src]]! \n\t" +- "vtbl.8 d1, {d0}, %[t0] \n\t" +- "vtbl.8 d2, {d0}, %[t1] \n\t" ++ "vtbl.8 d1, {d0}, %P[t0] \n\t" ++ "vtbl.8 d2, {d0}, %P[t1] \n\t" + "vst1.s16 {d1,d2}, [%[dst]]! \n\t" + : [dst] "+r" (dst), [src] "+r" (src) /* output operands */ + : [t0] "w" (t0), [t1] "w" (t1) /* input operands */ +@@ -366,8 +366,8 @@ static void remap_arrange_ch4_float32ne_neon(pa_remap_t *m, float *dst, const fl + for (; n > 0; n--) { + __asm__ __volatile__ ( + "vld1.f32 {d0,d1}, [%[src]]! \n\t" +- "vtbl.8 d2, {d0,d1}, %[t0] \n\t" +- "vtbl.8 d3, {d0,d1}, %[t1] \n\t" ++ "vtbl.8 d2, {d0,d1}, %P[t0] \n\t" ++ "vtbl.8 d3, {d0,d1}, %P[t1] \n\t" + "vst1.s16 {d2,d3}, [%[dst]]! \n\t" + : [dst] "+r" (dst), [src] "+r" (src) /* output operands */ + : [t0] "w" (t0), [t1] "w" (t1) /* input operands */ +-- +2.25.1 + diff --git a/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch b/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch new file mode 100644 index 00000000..43add75d --- /dev/null +++ b/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio/0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch @@ -0,0 +1,30 @@ +From f0ddd7c36556ad05c1398fdd132947323ad26473 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 6 Dec 2018 11:43:41 +0800 +Subject: [PATCH 2/2] do not display CLFAGS to improve reproducibility build + +Macro PA_CFLAGS contains build path, do not use it to +display CFLAGS which could improve reproducibility build. + +Upstream-Status: Inappropriate [oe specific] +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + src/daemon/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon/main.c b/src/daemon/main.c +index c80fa94..75496be 100644 +--- a/src/daemon/main.c ++++ b/src/daemon/main.c +@@ -908,7 +908,7 @@ int main(int argc, char *argv[]) { + + pa_log_info("This is PulseAudio %s", PACKAGE_VERSION); + pa_log_debug("Compilation host: %s", CANONICAL_HOST); +- pa_log_debug("Compilation CFLAGS: %s", PA_CFLAGS); ++ pa_log_debug("Compilation CFLAGS: ***"); + + #ifdef HAVE_LIBSAMPLERATE + pa_log_warn("Compiled with DEPRECATED libsamplerate support!"); +-- +2.7.4 + diff --git a/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio_12.2.bb b/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio_13.0.bb index 36d92bca..601499b6 100644 --- a/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio_12.2.bb +++ b/external/poky/meta/recipes-multimedia/pulseaudio/pulseaudio_13.0.bb @@ -2,10 +2,12 @@ require pulseaudio.inc SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ file://0001-client-conf-Add-allow-autospawn-for-root.patch \ + file://0002-do-not-display-CLFAGS-to-improve-reproducibility-bui.patch \ + file://0001-remap-arm-Adjust-inline-asm-constraints.patch \ file://volatiles.04_pulse \ " -SRC_URI[md5sum] = "c42f1f1465e8df9859d023dc184734bf" -SRC_URI[sha256sum] = "809668ffc296043779c984f53461c2b3987a45b7a25eb2f0a1d11d9f23ba4055" +SRC_URI[md5sum] = "e41d606f90254ed45c90520faf83d95c" +SRC_URI[sha256sum] = "961b23ca1acfd28f2bc87414c27bb40e12436efcf2158d29721b1e89f3f28057" do_compile_prepend() { mkdir -p ${S}/libltdl diff --git a/external/poky/meta/recipes-multimedia/sbc/sbc_1.3.bb b/external/poky/meta/recipes-multimedia/sbc/sbc_1.4.bb index 2bb895de..674d77ef 100644 --- a/external/poky/meta/recipes-multimedia/sbc/sbc_1.3.bb +++ b/external/poky/meta/recipes-multimedia/sbc/sbc_1.4.bb @@ -14,8 +14,8 @@ DEPENDS = "libsndfile1" SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/${BP}.tar.xz" -SRC_URI[md5sum] = "2d8b7841f2c11ab287718d562f2b981c" -SRC_URI[sha256sum] = "e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309" +SRC_URI[md5sum] = "800fb0908899baa48dc216d8e156cc05" +SRC_URI[sha256sum] = "518bf46e6bb3dc808a95e1eabad26fdebe8a099c1e781c27ed7fca6c2f4a54c9" inherit autotools pkgconfig diff --git a/external/poky/meta/recipes-multimedia/speex/speex_1.2.0.bb b/external/poky/meta/recipes-multimedia/speex/speex_1.2.0.bb index 19636bb2..3a0911d6 100644 --- a/external/poky/meta/recipes-multimedia/speex/speex_1.2.0.bb +++ b/external/poky/meta/recipes-multimedia/speex/speex_1.2.0.bb @@ -2,7 +2,7 @@ SUMMARY = "Speech Audio Codec" DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compression format designed for speech." HOMEPAGE = "http://www.speex.org" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8 \ file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50" DEPENDS = "libogg speexdsp" diff --git a/external/poky/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch b/external/poky/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch deleted file mode 100644 index c7067daa..00000000 --- a/external/poky/meta/recipes-multimedia/speex/speexdsp/0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch +++ /dev/null @@ -1,63 +0,0 @@ -From c73370ceafd138becee8ca3c688ba75756830bfe Mon Sep 17 00:00:00 2001 -From: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> -Date: Sun, 5 Jul 2015 17:48:16 +0300 -Subject: [PATCH] Don't rely on HAVE_STDINT_H et al. being defined - -Not everyone who includes speexdsp_config_types.h will have a test -which defines those, and if we've chosen to use the stdint types at -configure time then we know exactly which header(s) are available, so -just choose the best one then and generate the header to use it. - -This patch, including the above text, is copied from a commit in the -speex repository[1]. The original commit for speex was made by Ron -<ron@debian.org>. - -[1] https://git.xiph.org/?p=speex.git;a=commitdiff;h=774c87d6cb7dd8dabdd17677fc6da753ecf4aa87 - -Upstream-Status: Backport - -Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com> ---- - configure.ac | 6 ++++++ - include/speex/speexdsp_config_types.h.in | 8 +------- - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 2cd2d1e..1de0c23 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -334,6 +334,12 @@ AC_SUBST([USIZE16]) - AC_SUBST([SIZE32]) - AC_SUBST([USIZE32]) - -+AS_IF([test "$ac_cv_header_stdint_h" = "yes"], [INCLUDE_STDINT="#include <stdint.h>"], -+ [test "$ac_cv_header_inttypes_h" = "yes"], [INCLUDE_STDINT="#include <inttypes.h>"], -+ [test "$ac_cv_header_sys_types_h" = "yes"], [INCLUDE_STDINT="#include <sys/types.h>"]) -+ -+AC_SUBST([INCLUDE_STDINT]) -+ - AC_CONFIG_FILES([ - Makefile libspeexdsp/Makefile doc/Makefile SpeexDSP.spec - include/Makefile include/speex/Makefile speexdsp.pc -diff --git a/include/speex/speexdsp_config_types.h.in b/include/speex/speexdsp_config_types.h.in -index 02b82fd..5ea7b55 100644 ---- a/include/speex/speexdsp_config_types.h.in -+++ b/include/speex/speexdsp_config_types.h.in -@@ -1,13 +1,7 @@ - #ifndef __SPEEX_TYPES_H__ - #define __SPEEX_TYPES_H__ - --#if defined HAVE_STDINT_H --# include <stdint.h> --#elif defined HAVE_INTTYPES_H --# include <inttypes.h> --#elif defined HAVE_SYS_TYPES_H --# include <sys/types.h> --#endif -+@INCLUDE_STDINT@ - - typedef @SIZE16@ spx_int16_t; - typedef @USIZE16@ spx_uint16_t; --- -1.9.3 - diff --git a/external/poky/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb b/external/poky/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb new file mode 100644 index 00000000..63696467 --- /dev/null +++ b/external/poky/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb @@ -0,0 +1,27 @@ +SUMMARY = "A patent-free DSP library" +DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library." +HOMEPAGE = "http://www.speex.org" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8" + +SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz" + +UPSTREAM_CHECK_REGEX = "speexdsp-(?P<pver>\d+(\.\d+)+)\.tar" + +SRC_URI[md5sum] = "b722df341576dc185d897131321008fc" +SRC_URI[sha256sum] = "682042fc6f9bee6294ec453f470dadc26c6ff29b9c9e9ad2ffc1f4312fd64771" + +inherit autotools pkgconfig + +EXTRA_OECONF = "\ + --disable-examples \ + ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api', '', d)} \ +" + +# speexdsp was split off from speex in 1.2rc2. Older versions of speex can't +# be installed together with speexdsp, since they contain overlapping files. +RCONFLICTS_${PN} = "speex (< 1.2rc2)" +RCONFLICTS_${PN}-dbg = "speex-dbg (< 1.2rc2)" +RCONFLICTS_${PN}-dev = "speex-dev (< 1.2rc2)" +RCONFLICTS_${PN}-staticdev = "speex-staticdev (< 1.2rc2)" diff --git a/external/poky/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb b/external/poky/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb deleted file mode 100644 index 6b1acedb..00000000 --- a/external/poky/meta/recipes-multimedia/speex/speexdsp_1.2rc3.bb +++ /dev/null @@ -1,39 +0,0 @@ -SUMMARY = "A patent-free DSP library" -DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library." -HOMEPAGE = "http://www.speex.org" -SECTION = "libs" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8" - -SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz \ - file://0001-Don-t-rely-on-HAVE_STDINT_H-et-al.-being-defined.patch" - -SRC_URI[md5sum] = "70d9d31184f7eb761192fd1ef0b73333" -SRC_URI[sha256sum] = "4ae688600039f5d224bdf2e222d2fbde65608447e4c2f681585e4dca6df692f1" - -inherit autotools pkgconfig - -EXTRA_OECONF = "\ - --disable-examples \ - ${@bb.utils.contains('TARGET_FPU', 'soft', '--enable-fixed-point --disable-float-api', '', d)} \ -" - -# Workaround for a build failure when building with MACHINE=qemuarm64. I think -# aarch64 is supposed to support NEON just fine, but building for qemuarm64 -# fails in NEON code: -# -# .../speexdsp-1.2rc3/libspeexdsp/resample_neon.h:148:5: error: impossible constraint in 'asm' -# asm volatile (" cmp %[len], #0\n" -# ^ -# -# I sent an email about the issue to speex-dev. At the time of writing there -# are no responses yet: -# http://thread.gmane.org/gmane.comp.audio.compression.speex.devel/7360 -EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--disable-neon', '', d)}" - -# speexdsp was split off from speex in 1.2rc2. Older versions of speex can't -# be installed together with speexdsp, since they contain overlapping files. -RCONFLICTS_${PN} = "speex (< 1.2rc2)" -RCONFLICTS_${PN}-dbg = "speex-dbg (< 1.2rc2)" -RCONFLICTS_${PN}-dev = "speex-dev (< 1.2rc2)" -RCONFLICTS_${PN}-staticdev = "speex-staticdev (< 1.2rc2)" diff --git a/external/poky/meta/recipes-multimedia/webp/libwebp_1.0.0.bb b/external/poky/meta/recipes-multimedia/webp/libwebp_1.1.0.bb index 1a9679f9..68e5ae2b 100644 --- a/external/poky/meta/recipes-multimedia/webp/libwebp_1.0.0.bb +++ b/external/poky/meta/recipes-multimedia/webp/libwebp_1.1.0.bb @@ -9,13 +9,13 @@ DESCRIPTION = "WebP is a method of lossy and lossless compression that can be \ HOMEPAGE = "https://developers.google.com/speed/webp/" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://COPYING;md5=6e8dee932c26f2dab503abf70c96d8bb \ file://PATENTS;md5=c6926d0cb07d296f886ab6e0cc5a85b7" SRC_URI = "http://downloads.webmproject.org/releases/webp/${BP}.tar.gz" -SRC_URI[md5sum] = "967b8f087cb392e6cc94d5e116a120c0" -SRC_URI[sha256sum] = "84259c4388f18637af3c5a6361536d754a5394492f91be1abc2e981d4983225b" +SRC_URI[md5sum] = "7e047f2cbaf584dff7a8a7e0f8572f18" +SRC_URI[sha256sum] = "98a052268cc4d5ece27f76572a7f50293f439c17a98e67c4ea0c7ed6f50ef043" UPSTREAM_CHECK_URI = "http://downloads.webmproject.org/releases/webp/index.html" @@ -25,11 +25,14 @@ EXTRA_OECONF = " \ --enable-libwebpdemux \ --enable-threading \ " + # Do not trust configure to determine if neon is available. # -EXTRA_OECONF_append_arm = " \ +EXTRA_OECONF_ARM = " \ ${@bb.utils.contains("TUNE_FEATURES","neon","--enable-neon","--disable-neon",d)} \ " +EXTRA_OECONF_append_arm = " ${EXTRA_OECONF_ARM}" +EXTRA_OECONF_append_armeb = " ${EXTRA_OECONF_ARM}" inherit autotools lib_package diff --git a/external/poky/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch b/external/poky/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch index 087a448e..cb771fb0 100644 --- a/external/poky/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch +++ b/external/poky/meta/recipes-multimedia/x264/x264/Fix-X32-build-by-disabling-asm.patch @@ -1,4 +1,4 @@ -From 66b120079fb21ed38cab0900c63360b0a7853eaa Mon Sep 17 00:00:00 2001 +From 7bc25f4d1aaa5186d2eff3e2326c7245fcd7e7f3 Mon Sep 17 00:00:00 2001 From: Christopher Larson <chris_larson@mentor.com> Date: Tue, 13 Dec 2016 14:22:32 -0700 Subject: [PATCH] Fix X32 build by disabling asm @@ -12,15 +12,16 @@ doesn't successfully build at this time, and my assembly is very rusty. Upstream-Status: Pending Signed-off-by: Christopher Larson <chris_larson@mentor.com> + --- configure | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/configure b/configure -index 3109ec4..844aeae 100755 +index 51b128d..6ea9469 100755 --- a/configure +++ b/configure -@@ -703,7 +703,13 @@ case $host_cpu in +@@ -754,7 +754,13 @@ case $host_cpu in AS_EXT=".asm" ASFLAGS="$ASFLAGS -DARCH_X86_64=1 -I\$(SRCPATH)/common/x86/" stack_alignment=16 @@ -33,9 +34,9 @@ index 3109ec4..844aeae 100755 + fi + fi if [ "$SYS" = MACOSX ]; then - ASFLAGS="$ASFLAGS -f macho64 -DPIC -DPREFIX" + ASFLAGS="$ASFLAGS -f macho64 -DPREFIX" if cc_check '' "-arch x86_64"; then -@@ -722,7 +728,11 @@ case $host_cpu in +@@ -773,7 +779,11 @@ case $host_cpu in RCFLAGS="--target=pe-x86-64 $RCFLAGS" fi else @@ -48,6 +49,3 @@ index 3109ec4..844aeae 100755 fi ;; powerpc*) --- -2.8.0 - diff --git a/external/poky/meta/recipes-multimedia/x264/x264_git.bb b/external/poky/meta/recipes-multimedia/x264/x264_git.bb index 4174cb28..39429a88 100644 --- a/external/poky/meta/recipes-multimedia/x264/x264_git.bb +++ b/external/poky/meta/recipes-multimedia/x264/x264_git.bb @@ -14,16 +14,16 @@ SRC_URI = "git://github.com/mirror/x264;branch=stable \ " UPSTREAM_CHECK_COMMITS = "1" -SRCREV = "e9a5903edf8ca59ef20e6f4894c196f135af735e" +SRCREV = "1771b556ee45207f8711744ccbd5d42a3949b14c" -PV = "r2854+git${SRCPV}" +PV = "r2991+git${SRCPV}" S = "${WORKDIR}/git" -inherit lib_package pkgconfig perlnative +inherit lib_package pkgconfig X264_DISABLE_ASM = "" -X264_DISABLE_ASM_x86_libc-musl = "--disable-asm" +X264_DISABLE_ASM_x86 = "--disable-asm" X264_DISABLE_ASM_armv4 = "--disable-asm" X264_DISABLE_ASM_armv5 = "--disable-asm" X264_DISABLE_ASM_powerpc = "${@bb.utils.contains("TUNE_FEATURES", "spe", "--disable-asm", "", d)}" |