2025-09-13 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in rdalsaconfig(8) that caused multiple card entries
	to appear for sound devices with more than one PCM.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2025-09-13 18:46:08 -04:00
parent 9482446a6d
commit 62c3f7e5b7
8 changed files with 50 additions and 245 deletions

View File

@@ -2,7 +2,7 @@
//
// Abstract an ALSA configuration.
//
// (C) Copyright 2009-2018 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2009-2025 Fred Gleason <fredg@paravelsystems.com>
//
// 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
@@ -42,9 +42,7 @@ class RDAlsaModel : public QAbstractListModel
QVariant data(const QModelIndex &index,int role=Qt::DisplayRole) const;
QVariant headerData(int section,Qt::Orientation orient,
int role=Qt::DisplayRole) const;
QModelIndex indexOf(const QString &card_id,int pcm_num) const;
RDAlsaCard *card(const QModelIndex &index) const;
int pcmNumber(const QModelIndex &index) const;
QModelIndex indexOf(const QString &card_id) const;
bool isEnabled(int row) const;
void setEnabled(int row,bool state);
bool loadConfig(const QString &filename);
@@ -53,8 +51,6 @@ class RDAlsaModel : public QAbstractListModel
private:
void LoadSystemConfig();
QList<RDAlsaCard *> model_alsa_cards;
QList<int> model_card_index;
QList<int> model_pcm_index;
unsigned model_sample_rate;
QStringList model_other_lines;
};