Commit 8cdebf71 authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai

ALSA: dice: fix wrong offsets for Dice interface

For received packet stream, the offset of 'RX_SEQ_START' locates after
the offset of 'RX_NUMBER_MIDI', although current macro and proc output
includes wrong offsets.

Fortunately, this bug doesn't affect streaming functionality because
these macro is not used.

This commit fixes these wrong macro and outputs.
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f2b14c0b
...@@ -298,24 +298,24 @@ ...@@ -298,24 +298,24 @@
*/ */
#define RX_ISOCHRONOUS 0x008 #define RX_ISOCHRONOUS 0x008
/*
* Index of first quadlet to be interpreted; read/write. If > 0, that many
* quadlets at the beginning of each data block will be ignored, and all the
* audio and MIDI quadlets will follow.
*/
#define RX_SEQ_START 0x00c
/* /*
* The number of audio channels; read-only. There will be one quadlet per * The number of audio channels; read-only. There will be one quadlet per
* channel. * channel.
*/ */
#define RX_NUMBER_AUDIO 0x010 #define RX_NUMBER_AUDIO 0x00c
/* /*
* The number of MIDI ports, 0-8; read-only. If > 0, there will be one * The number of MIDI ports, 0-8; read-only. If > 0, there will be one
* additional quadlet in each data block, following the audio quadlets. * additional quadlet in each data block, following the audio quadlets.
*/ */
#define RX_NUMBER_MIDI 0x014 #define RX_NUMBER_MIDI 0x010
/*
* Index of first quadlet to be interpreted; read/write. If > 0, that many
* quadlets at the beginning of each data block will be ignored, and all the
* audio and MIDI quadlets will follow.
*/
#define RX_SEQ_START 0x014
/* /*
* Names of all audio channels; read-only. Quadlets are byte-swapped. Names * Names of all audio channels; read-only. Quadlets are byte-swapped. Names
......
...@@ -99,9 +99,9 @@ static void dice_proc_read(struct snd_info_entry *entry, ...@@ -99,9 +99,9 @@ static void dice_proc_read(struct snd_info_entry *entry,
} tx; } tx;
struct { struct {
u32 iso; u32 iso;
u32 seq_start;
u32 number_audio; u32 number_audio;
u32 number_midi; u32 number_midi;
u32 seq_start;
char names[RX_NAMES_SIZE]; char names[RX_NAMES_SIZE];
u32 ac3_caps; u32 ac3_caps;
u32 ac3_enable; u32 ac3_enable;
...@@ -204,10 +204,10 @@ static void dice_proc_read(struct snd_info_entry *entry, ...@@ -204,10 +204,10 @@ static void dice_proc_read(struct snd_info_entry *entry,
break; break;
snd_iprintf(buffer, "rx %u:\n", stream); snd_iprintf(buffer, "rx %u:\n", stream);
snd_iprintf(buffer, " iso channel: %d\n", (int)buf.rx.iso); snd_iprintf(buffer, " iso channel: %d\n", (int)buf.rx.iso);
snd_iprintf(buffer, " sequence start: %u\n", buf.rx.seq_start);
snd_iprintf(buffer, " audio channels: %u\n", snd_iprintf(buffer, " audio channels: %u\n",
buf.rx.number_audio); buf.rx.number_audio);
snd_iprintf(buffer, " midi ports: %u\n", buf.rx.number_midi); snd_iprintf(buffer, " midi ports: %u\n", buf.rx.number_midi);
snd_iprintf(buffer, " sequence start: %u\n", buf.rx.seq_start);
if (quadlets >= 68) { if (quadlets >= 68) {
dice_proc_fixup_string(buf.rx.names, RX_NAMES_SIZE); dice_proc_fixup_string(buf.rx.names, RX_NAMES_SIZE);
snd_iprintf(buffer, " names: %s\n", buf.rx.names); snd_iprintf(buffer, " names: %s\n", buf.rx.names);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment