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>
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>
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>
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>
This is always an audible issue. Therefore print the coresponding
error message also in non verbose mode.
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 5b8c373318)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Change-Id: I5e1380776f76814409f198a4ad874d4ae46007e3
poll may be interrupted due to signal, in that case print
error log
Change-Id: I1b2b2543a4b056b50af7617efc80fe517bddaaae
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 20883aa404)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
should be set in milliseconds
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 17031895de)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
Change-Id: I3d32e4602c1bdf15474b14496173727aa130c924
Change-Id: I45e1ccf2e1b955db187eb72127a536fe5eb0b81e
Signed-off-by: Adam Miartus <external.Adam.Miartus@de.bosch.com>
(cherry picked from commit 865cad2003)
Signed-off-by: Timo Wischer <twischer@de.adit-jv.com>
On ALSA poll time out, retry polling after executing the recovery.
Retry max limit is set with MAX_RETRY_COUNT.
Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
Currently only poll_result is checked for < 0 before doing the further
processing, and not for timeout. After this movement the revents is checked
only if the poll doesn't timeout.
Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
Currently even on XRUN, the xrun recovery is not executed as the
need_playback or need_capture flag is still true and so it goes
and waits on poll again.
Signed-off-by: Laxmi Devi <Laxmi.Devi@in.bosch.com>
* Revert "oss_driver: Use float to S32 conversion if requested"
This reverts commit c5a0f5ea1c.
* Revert "alsa_in/out: Use float to S32 conversion if requested"
This reverts commit 148c8d8e6a.
* Revert "alsa_driver: Use float to S32 conversion if requested"
This reverts commit d017e1fffe.
* Revert "memops: Provide function for float to S32 conversion"
This reverts commit bb99e09b99.
* Revert "memops: Align S24LE and S32LE to float conversion"
This reverts commit b4ea23df6a.
* Revert "memops: Provide function for S32 to float conversion"
This reverts commit 244fc27e29.
* Revert "memops: Align float to S24LE and S32LE conversion"
This reverts commit 4455fe020c.
* Revert "memops: Remove not used conversion macros"
This reverts commit a82f3f2fb4.
* Revert "memops: Use right-aligned S24LE to float conversion"
This reverts commit e753254313.
* Revert "memops: Use right-aligned float to S24LE conversion"
This reverts commit 831163e516.