Skip to content

Commit

Permalink
SDRPlay v1: fix setting of hardware flavour. Fixes #2127
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed Jun 2, 2024
1 parent cfc0114 commit ade3eed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions plugins/samplesource/sdrplay/sdrplayinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,6 @@ bool SDRPlayInput::openDevice()
return false;
}

if ((res = mirisdr_set_hw_flavour(m_dev, MIRISDR_HW_SDRPLAY)) < 0)
{
qCritical("SDRPlayInput::openDevice: failed to set HW flavour: %s", strerror(errno));
return false;
}

char vendor[256];
char product[256];
char serial[256];
Expand All @@ -142,6 +136,12 @@ bool SDRPlayInput::openDevice()
m_variant = SDRPlayRSP1;
}

if ((res = mirisdr_set_hw_flavour(m_dev, (m_variant == SDRPlayRSP1) ? MIRISDR_HW_DEFAULT : MIRISDR_HW_SDRPLAY)) < 0)
{
qCritical("SDRPlayInput::openDevice: failed to set HW flavour: %s", strerror(errno));
return false;
}

qDebug("SDRPlayInput::openDevice: m_variant: %d", (int) m_variant);

return true;
Expand Down

0 comments on commit ade3eed

Please sign in to comment.