Skip to content

Commit 58cc613

Browse files
ossilatortiwai
authored andcommitted
ALSA: emu10k1: actually show some S/PDIF status in /proc for E-MU cards
The file is called spdif-in, but we abused it to show only sample rates from various sources. Rectify it as far as possible (the FPGA doesn't give us a lot of information). Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230612191325.1315854-10-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 3ac2514 commit 58cc613

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

sound/pci/emu10k1/emuproc.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,14 @@ static void snd_emu10k1_proc_spdif_read(struct snd_info_entry *entry,
194194
emu->card_capabilities->emu_model == EMU_MODEL_EMU1010)
195195
snd_iprintf(buffer, "BNC rate: %dHz\n",
196196
snd_emu1010_get_raw_rate(emu, EMU_HANA_WCLOCK_SYNC_BNC));
197+
198+
snd_emu1010_fpga_read(emu, EMU_HANA_SPDIF_MODE, &value);
199+
if (value & EMU_HANA_SPDIF_MODE_RX_INVALID)
200+
snd_iprintf(buffer, "\nS/PDIF input invalid\n");
201+
else
202+
snd_iprintf(buffer, "\nS/PDIF mode: %s%s\n",
203+
value & EMU_HANA_SPDIF_MODE_RX_PRO ? "professional" : "consumer",
204+
value & EMU_HANA_SPDIF_MODE_RX_NOCOPY ? ", no copy" : "");
197205
} else {
198206
snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS);
199207
snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS);

0 commit comments

Comments
 (0)