diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2014-04-25 17:45:08 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-05-26 16:27:47 +0400 |
commit | 6a22683e89e2c851f754ebbec0f2a53f2967bc07 (patch) | |
tree | ab1ee3b97ee3d5402371e2c1bc205283a100a79e /sound/firewire/fireworks/fireworks.c | |
parent | b84b1a27b48eb3aea13127f83ec291c614df2992 (diff) | |
download | linux-6a22683e89e2c851f754ebbec0f2a53f2967bc07.tar.xz |
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>
Diffstat (limited to 'sound/firewire/fireworks/fireworks.c')
-rw-r--r-- | sound/firewire/fireworks/fireworks.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/firewire/fireworks/fireworks.c b/sound/firewire/fireworks/fireworks.c index 25997f1ee300..311e4a6ef0a6 100644 --- a/sound/firewire/fireworks/fireworks.c +++ b/sound/firewire/fireworks/fireworks.c @@ -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; |