diff options
Diffstat (limited to 'sysfs.c')
-rw-r--r-- | sysfs.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -115,15 +115,42 @@ static ssize_t version_show(struct snd_avirt_audiopath_obj *audiopath_obj, audiopath->version[1], audiopath->version[2]); } +static ssize_t route_from_ap_show(struct snd_avirt_audiopath_obj *audiopath_obj, + struct snd_avirt_audiopath_attribute *attr, + char *buf) +{ + struct snd_avirt_audiopath *audiopath = audiopath_obj->path; + + if (audiopath->route_from_ap) + return sprintf(buf, "%s\n", audiopath->route_from_ap->uid); + + return 0; +} + +static ssize_t route_to_ap_show(struct snd_avirt_audiopath_obj *audiopath_obj, + struct snd_avirt_audiopath_attribute *attr, + char *buf) +{ + struct snd_avirt_audiopath *audiopath = audiopath_obj->path; + + if (audiopath->route_to_ap) + return sprintf(buf, "%s\n", audiopath->route_to_ap->uid); + + return 0; +} static struct snd_avirt_audiopath_attribute snd_avirt_audiopath_attrs[] = { __ATTR_RO(name), __ATTR_RO(version), + __ATTR_RO(route_from_ap), + __ATTR_RO(route_to_ap), }; static struct attribute *snd_avirt_audiopath_def_attrs[] = { &snd_avirt_audiopath_attrs[0].attr, &snd_avirt_audiopath_attrs[1].attr, + &snd_avirt_audiopath_attrs[2].attr, + &snd_avirt_audiopath_attrs[3].attr, NULL, }; |