mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-14 12:22:00 -05:00
DSD demod plugin: DV serial: fix filter, timeout value and volume control
This commit is contained in:
parent
be467fdc24
commit
7fc2b431a4
@ -113,7 +113,7 @@ It is based on the [DSDcc](https://github.com/f4exb/dsdcc) C++ library which is
|
|||||||
|
|
||||||
If you have one or more serial devices interfacing the AMBE3000 chip in packet mode you can use them to decode AMBE voice frames. For that purpose you will need to compile with [SerialDV](https://github.com/f4exb/serialDV) support. Please refer to this project Readme.md to compile and install SerialDV. If you install it in a custom location say `/opt/install/serialdv` you will need to add these defines to the cmake command: `-DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so`
|
If you have one or more serial devices interfacing the AMBE3000 chip in packet mode you can use them to decode AMBE voice frames. For that purpose you will need to compile with [SerialDV](https://github.com/f4exb/serialDV) support. Please refer to this project Readme.md to compile and install SerialDV. If you install it in a custom location say `/opt/install/serialdv` you will need to add these defines to the cmake command: `-DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so`
|
||||||
|
|
||||||
Although such serial devices work with a serial interface at 400 kb in practice maybe for other reasons they are capable of handling only one conversation at a time. The software will allocate the device dynamically to a conversation with an inactivity timeout of 500ms. In practice you will have to have as many devices connected to your system as the number of conversations you would like to be handled in parallel.
|
Although such serial devices work with a serial interface at 400 kb in practice maybe for other reasons they are capable of handling only one conversation at a time. The software will allocate the device dynamically to a conversation with an inactivity timeout of 1 second so that conversations do not get interrupted constantly making the audio output too choppy. In practice you will have to have as many devices connected to your system as the number of conversations you would like to be handled in parallel.
|
||||||
|
|
||||||
Note that this is not supported in Windows because of trouble with COM port support (contributors welcome!).
|
Note that this is not supported in Windows because of trouble with COM port support (contributors welcome!).
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ You can use a serial device connected to your system that implements and exposes
|
|||||||
- Compile with [SerialDV](https://github.com/f4exb/serialDV) support Please refer to this project Readme.md to compile and install SerialDV. If you install it in a custom location say `/opt/install/serialdv` you will need to add these defines to the cmake command: `-DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so`
|
- Compile with [SerialDV](https://github.com/f4exb/serialDV) support Please refer to this project Readme.md to compile and install SerialDV. If you install it in a custom location say `/opt/install/serialdv` you will need to add these defines to the cmake command: `-DLIBSERIALDV_INCLUDE_DIR=/opt/install/serialdv/include/serialdv -DLIBSERIALDV_LIBRARY=/opt/install/serialdv/lib/libserialdv.so`
|
||||||
- Enable DV serial devices in your system by checking the option in the Preferences menu. YOu will need to enable the DV serial devices each time you start SDRangel.
|
- Enable DV serial devices in your system by checking the option in the Preferences menu. YOu will need to enable the DV serial devices each time you start SDRangel.
|
||||||
|
|
||||||
Although such serial devices work with a serial interface at 400 kb in practice maybe for other reasons they are capable of handling only one conversation at a time. The software will allocate the device dynamically to a conversation with an inactivity timeout of 500ms. In practice you will have to have as many devices connected to your system as the number of conversations you would like to be handled in parallel.
|
Although such serial devices work with a serial interface at 400 kb in practice maybe for other reasons they are capable of handling only one conversation at a time. The software will allocate the device dynamically to a conversation with an inactivity timeout of 1 second so that conversations do not get interrupted constantly making the audio output too choppy. In practice you will have to have as many devices connected to your system as the number of conversations you would like to be handled in parallel.
|
||||||
|
|
||||||
Note also that this is not supported in Windows because of trouble with COM port support (contributors welcome!).
|
Note also that this is not supported in Windows because of trouble with COM port support (contributors welcome!).
|
||||||
|
|
||||||
@ -116,7 +116,9 @@ This is the gain applied to the output of the discriminator before the decoder
|
|||||||
|
|
||||||
<h3>13: Audio volume</h3>
|
<h3>13: Audio volume</h3>
|
||||||
|
|
||||||
This is the audio volume for positive values. A value of zero triggers the auto volume (audio AGC).
|
When working with mbelib this is a linear multiplication factor. A value of zero triggers the auto gain feature.
|
||||||
|
|
||||||
|
With the DV serial device(s) amplification factor in dB is given by `(value - 3.0)*5.0`. In most practical cases the middle value of 5.0 (+10 dB) is a comfortable level.
|
||||||
|
|
||||||
<h3>14: Maximum expected FM deviation</h3>
|
<h3>14: Maximum expected FM deviation</h3>
|
||||||
|
|
||||||
|
@ -73,15 +73,15 @@ void DVSerialWorker::stop()
|
|||||||
|
|
||||||
void DVSerialWorker::handleInputMessages()
|
void DVSerialWorker::handleInputMessages()
|
||||||
{
|
{
|
||||||
|
m_timer->stop(); // suspend FIFO queue holding timeout
|
||||||
Message* message;
|
Message* message;
|
||||||
m_timer->start(500); // FIFO queue holding timeout
|
|
||||||
|
|
||||||
while ((message = m_inputMessageQueue.pop()) != 0)
|
while ((message = m_inputMessageQueue.pop()) != 0)
|
||||||
{
|
{
|
||||||
if (MsgMbeDecode::match(*message))
|
if (MsgMbeDecode::match(*message))
|
||||||
{
|
{
|
||||||
MsgMbeDecode *decodeMsg = (MsgMbeDecode *) message;
|
MsgMbeDecode *decodeMsg = (MsgMbeDecode *) message;
|
||||||
int dBVolume = (decodeMsg->getVolumeIndex() - 50) / 2;
|
int dBVolume = (decodeMsg->getVolumeIndex() - 30) / 2;
|
||||||
|
|
||||||
if (m_dvController.decode(m_dvAudioSamples, decodeMsg->getMbeFrame(), decodeMsg->getMbeRate(), dBVolume))
|
if (m_dvController.decode(m_dvAudioSamples, decodeMsg->getMbeFrame(), decodeMsg->getMbeRate(), dBVolume))
|
||||||
{
|
{
|
||||||
@ -95,6 +95,8 @@ void DVSerialWorker::handleInputMessages()
|
|||||||
|
|
||||||
delete message;
|
delete message;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_timer->start(1000); // FIFO queue holding timeout
|
||||||
}
|
}
|
||||||
|
|
||||||
void DVSerialWorker::pushMbeFrame(const unsigned char *mbeFrame,
|
void DVSerialWorker::pushMbeFrame(const unsigned char *mbeFrame,
|
||||||
@ -122,7 +124,7 @@ void DVSerialWorker::upsample6(short *in, int nbSamplesIn, unsigned char channel
|
|||||||
|
|
||||||
for (int j = 1; j < 7; j++)
|
for (int j = 1; j < 7; j++)
|
||||||
{
|
{
|
||||||
upsample = (qint16) ((cur*j + prev*(6-j)) / 6);
|
upsample = m_upsampleFilter.run((qint16) ((cur*j + prev*(6-j)) / 6));
|
||||||
m_audioBuffer[m_audioBufferFill].l = channels & 1 ? upsample : 0;
|
m_audioBuffer[m_audioBufferFill].l = channels & 1 ? upsample : 0;
|
||||||
m_audioBuffer[m_audioBufferFill].r = (channels>>1) & 1 ? upsample : 0;
|
m_audioBuffer[m_audioBufferFill].r = (channels>>1) & 1 ? upsample : 0;
|
||||||
++m_audioBufferFill;
|
++m_audioBufferFill;
|
||||||
|
@ -24,7 +24,9 @@ const float MBEAudioInterpolatorFilter::m_b1 = 1.392667E+00;
|
|||||||
const float MBEAudioInterpolatorFilter::m_b2 = -5.474446E-01;
|
const float MBEAudioInterpolatorFilter::m_b2 = -5.474446E-01;
|
||||||
|
|
||||||
MBEAudioInterpolatorFilter::MBEAudioInterpolatorFilter()
|
MBEAudioInterpolatorFilter::MBEAudioInterpolatorFilter()
|
||||||
{}
|
{
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
|
||||||
MBEAudioInterpolatorFilter::~MBEAudioInterpolatorFilter()
|
MBEAudioInterpolatorFilter::~MBEAudioInterpolatorFilter()
|
||||||
{}
|
{}
|
||||||
|
Loading…
Reference in New Issue
Block a user