ALSA: fireworks: Add proc interface for debugging purpose
This commit adds proc interface to output infomation for debugging. - firmware information - sampling rate and clock source - physical metering (linear value) Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Takashi Iwai

parent
b84b1a27b4
commit
6a22683e89
@@ -150,6 +150,21 @@ get_hardware_info(struct snd_efw *efw)
|
||||
efw->pcm_playback_channels[0] = hwinfo->amdtp_rx_pcm_channels;
|
||||
efw->pcm_playback_channels[1] = hwinfo->amdtp_rx_pcm_channels_2x;
|
||||
efw->pcm_playback_channels[2] = hwinfo->amdtp_rx_pcm_channels_4x;
|
||||
|
||||
/* Hardware metering. */
|
||||
if (hwinfo->phys_in_grp_count > HWINFO_MAX_CAPS_GROUPS ||
|
||||
hwinfo->phys_out_grp_count > HWINFO_MAX_CAPS_GROUPS) {
|
||||
return -EIO;
|
||||
goto end;
|
||||
}
|
||||
efw->phys_in = hwinfo->phys_in;
|
||||
efw->phys_out = hwinfo->phys_out;
|
||||
efw->phys_in_grp_count = hwinfo->phys_in_grp_count;
|
||||
efw->phys_out_grp_count = hwinfo->phys_out_grp_count;
|
||||
memcpy(&efw->phys_in_grps, hwinfo->phys_in_grps,
|
||||
sizeof(struct snd_efw_phys_grp) * hwinfo->phys_in_grp_count);
|
||||
memcpy(&efw->phys_out_grps, hwinfo->phys_out_grps,
|
||||
sizeof(struct snd_efw_phys_grp) * hwinfo->phys_out_grp_count);
|
||||
end:
|
||||
kfree(hwinfo);
|
||||
return err;
|
||||
@@ -209,6 +224,8 @@ efw_probe(struct fw_unit *unit,
|
||||
if (entry->model_id == MODEL_ECHO_AUDIOFIRE_9)
|
||||
efw->is_af9 = true;
|
||||
|
||||
snd_efw_proc_init(efw);
|
||||
|
||||
err = snd_efw_stream_init_duplex(efw);
|
||||
if (err < 0)
|
||||
goto error;
|
||||
|
Reference in New Issue
Block a user