backend of JACK. Currently this is only supported for the ALSA
backend.
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Change-Id: I4b634056ea1774db0a264fcff121d2854f6b1a60
otherwise incorrect sample rate (0) would be used for
comparisons
Change-Id: I93b733f820171fe3a169a5e9c92b416348e90c5e
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 94eaf8b023)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
previously some state variables were reused for this
purpose which caused hidden bugs in multi device
implementation, this would cause issues with reloading
the jack server in certain conditions
now separate variable is used and the driver correctly
evaluates sample bytes and format
Change-Id: Ic82ba475c4eaa7baffea032106b62bc0b7e86535
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit b0dfe85ef1)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
both read and write can fail, therefore allow recovery
Change-Id: I32462c68aaa2395da11d2969a73ab5b5f28af879
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 1996a103ac)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
read and write can fail, allow retry in process method
Change-Id: I6d29b5cb1a6b849b44c9e0128dd3de7269a35873
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit e24bd05411)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
upper layer will be responsible for handling recovery
Change-Id: I507df2976ae569b4953a16e6e334ae5f9c78b59f
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit aff8dd6e21)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
to be used in JackAlsaDriver.cpp
Change-Id: Ica92fe1a1366664e5a9f5eff54dc8d1c8a0405e1
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit a88639d3e9)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
add more logs to error cases
Change-Id: Ie369972a177b869ea1ca8375556f608304d52a44
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 9abd7adb57)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
error code can now be checked making error handling more
explicit
this change also fixes confusing log in case of idle mode of
operation
the specific error code numbers are not significant because they
were never used in handling errors and in general there is error
log printed each time error occurs
Change-Id: Ieef6c2d72301ba582bfbd101bba7f3a5e228e980
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 2ec88d7054)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
snd_pcm_plugin_flush will not flush all linked devices on qnx,
each device has to be flushed separately
Change-Id: Ie2921ecc9d9f7cdd88e6b80f6a51e7d7bfd3d954
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 8ff2595575)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
the upper layer is responsible for deleting the driver in case of failed
initialization
Change-Id: I2fa0850375b1397d0b6907f210ca68d7a73acd03
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 8e6734a2b0)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
'c' decides what state idle device should be put to during reload
api call, when this option is present logic is to 'close' the idle
device, otherwise leave it 'prepared'
'x' enables the idle devices check for jackd init phase, the check
will behave the same way reload api call check call behaves,
therefore the state of the device will depend on 'c' option, if 'x'
option is not provided, devices will be configured to 'running' state
during jack init.
Change-Id: I3f8461884ef0569229f689412d0ec6ff8aeb39e9
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
Signed-off-by: Adam Miartus <external.adam.miartus@de.bosch.com>
(cherry picked from commit ce2146ef1b)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
do not close alsa devices that should stay open
do not prepare already prepared device
do not drop frames on device that is not running
Change-Id: Ibb6463bf6604a9e5e0038266bc99d2f8d838e135
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit f5f8d29ef0)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
for cases when we need to shutdown jack server or disconnect all devices
Change-Id: Idb3bede50e9f5e86d5997d5f675724846226b0c5
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 2d7d8b93d0)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
changes signature of function to allow extending the possible modes
of TargetState()
Change-Id: I394d85f4aac9fabb669fb03eedbfc3c6587a2a8e
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 9d215ce938)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Change-Id: I68228ae98b4b074847abf547810e35e8e9267f31
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit d890538d32)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Change-Id: I9c4724ca8b0b464dc3b38bac9f1fa6d8b05c186e
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 73a34ffc49)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
if enabled with '-x' option starts jackd with all devices closed, when
configured, user must provide number of channels for all devices, otherwise
we would not be able to create any jack ports.
we need to create all jack ports, since the only way to start any device
in this condition is to connect a jack port and issue a call
jack_client_reload_master
Change-Id: I63736eff20a2f2db7405ad512fec11e7bd0a9860
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 55d03f05d0)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Change-Id: I3d79e5f2516d8709b70dc700e5c9a04534619661
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 7a7d3b3524)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
allow discard duplicate array members as a configurable feature
Change-Id: Ibbbfed9ec5633d2bdd23cc516f726ff4ad98c4ed
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 65c157936a)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
allows additional logic to be added to function later
Change-Id: I30a8de53faa66883a7976f69ccc2b312d9f7ecce
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 2fb38bca8d)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Change-Id: I607eba702288677f8401c396c93d9c2d790cd362
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit efe557426b)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
in case ALSA_DRIVER_FEAT_LINK_DEVS is defined, driver will attempt to
snd_pcm_link all devices
Change-Id: I7bd54b8414d0b614786bee1078667a9aa595b58f
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit da45a136f5)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
in case ALSA_DRIVER_FEAT_CLOSE_IDLE_DEVS is defined unused devices are
closed on restart request, otherwise unused devices will be kept in
prepared state
Change-Id: I0cd91deb957a4839c5ea8c679bdabe1d0a3c6720
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit ee4fe3fde6)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
on restart request desired state of devices is evaluated, devices will be
closed, left prepared, started depending on selected options or their usage
(number or connected ports)
Change-Id: Id512e013556169dfc3837fd5f10845848a211d5b
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 9bdb9d09de)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
will be used to ease transporting data between functions, later will be
used as part of alsa_driver_t struct
parsing of input devices moved to driver_initialize
Change-Id: I17ab2f51595aa3c8a77e36f68adfd4b60d8220a1
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 9414ef5852)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
later used to restart JackAlsaDriver and allow closing unused devices
(devices whose ports are are not connected)
Change-Id: I886e4b23949e2a5e321194c18043f00f434537cc
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 39a31b50b3)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
allowed by compiler and helps with clean commit history when
adding changes
Change-Id: Iaafbe0a01970cf1b176a24d8fdc8cc6ee5c97e3b
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
linux release 1.0
what was tested:
- playing and recording from multiple devices
- linking devices, fallback for case when some or all devices are not linked
- xrun recovery
notes:
- we should be using epoll instead of poll, ~ +1 manday to implement
- solution can be simplified to remove doubling parameters for capture and playback
device, instead one struct for abstract "device" could be created that has parameter
capture or playaback, this would simplify code and reduce duplicate lines of code
Change-Id: I457b8e7e8ff0d04db18333b44bf64bf26a253bac
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
vsnprintf implementation on QNX can not handle NULL string parameter and
will interrupt, This is a workaround for the same
Change-Id: I18c57ec4b596336cea6f3061caf49c0b33afe198
Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
shave off a few usec from processing time
Change-Id: I052d168b11caa54d881d651c32822d6db33383b8
Signed-off-by: Adam Miartus <amiartus@de.adit-jv.com>
(cherry picked from commit 138925dfd5)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>