diff options
author | Eliot Blennerhassett <eblennerhassett@audioscience.com> | 2011-04-05 04:55:41 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-04-05 05:46:06 -0400 |
commit | 550ac6ba4ef0e57f6edbadf2b018d5125d2f7e98 (patch) | |
tree | 4569a7ef6110d1179b50c2568ab4a99935487fc5 | |
parent | d8e4f9aed82c68b60f81b2e7977c46868d51062f (diff) |
ALSA: snd-asihpi: Control naming
Clock source is neither capture nor playback,
so change 'Capture Clock' to 'Clock'.
Add spaces to control name string for consistency,
always 'PCM 0' , never 'PCM0'
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/asihpi/asihpi.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index f53a31e939c1..edcbe39d6033 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c | |||
@@ -1413,14 +1413,16 @@ static void asihpi_ctl_init(struct snd_kcontrol_new *snd_control, | |||
1413 | struct hpi_control *hpi_ctl, | 1413 | struct hpi_control *hpi_ctl, |
1414 | char *name) | 1414 | char *name) |
1415 | { | 1415 | { |
1416 | char *dir = ""; | 1416 | char *dir; |
1417 | memset(snd_control, 0, sizeof(*snd_control)); | 1417 | memset(snd_control, 0, sizeof(*snd_control)); |
1418 | snd_control->name = hpi_ctl->name; | 1418 | snd_control->name = hpi_ctl->name; |
1419 | snd_control->private_value = hpi_ctl->h_control; | 1419 | snd_control->private_value = hpi_ctl->h_control; |
1420 | snd_control->iface = SNDRV_CTL_ELEM_IFACE_MIXER; | 1420 | snd_control->iface = SNDRV_CTL_ELEM_IFACE_MIXER; |
1421 | snd_control->index = 0; | 1421 | snd_control->index = 0; |
1422 | 1422 | ||
1423 | if (hpi_ctl->dst_node_type + HPI_DESTNODE_NONE == HPI_DESTNODE_ISTREAM) | 1423 | if (hpi_ctl->src_node_type + HPI_SOURCENODE_NONE == HPI_SOURCENODE_CLOCK_SOURCE) |
1424 | dir = ""; /* clock is neither capture nor playback */ | ||
1425 | else if (hpi_ctl->dst_node_type + HPI_DESTNODE_NONE == HPI_DESTNODE_ISTREAM) | ||
1424 | dir = "Capture "; /* On or towards a PCM capture destination*/ | 1426 | dir = "Capture "; /* On or towards a PCM capture destination*/ |
1425 | else if ((hpi_ctl->src_node_type + HPI_SOURCENODE_NONE != HPI_SOURCENODE_OSTREAM) && | 1427 | else if ((hpi_ctl->src_node_type + HPI_SOURCENODE_NONE != HPI_SOURCENODE_OSTREAM) && |
1426 | (!hpi_ctl->dst_node_type)) | 1428 | (!hpi_ctl->dst_node_type)) |
@@ -1433,7 +1435,7 @@ static void asihpi_ctl_init(struct snd_kcontrol_new *snd_control, | |||
1433 | dir = "Playback "; /* PCM Playback source, or output node */ | 1435 | dir = "Playback "; /* PCM Playback source, or output node */ |
1434 | 1436 | ||
1435 | if (hpi_ctl->src_node_type && hpi_ctl->dst_node_type) | 1437 | if (hpi_ctl->src_node_type && hpi_ctl->dst_node_type) |
1436 | sprintf(hpi_ctl->name, "%s%d %s%d %s%s", | 1438 | sprintf(hpi_ctl->name, "%s %d %s %d %s%s", |
1437 | asihpi_src_names[hpi_ctl->src_node_type], | 1439 | asihpi_src_names[hpi_ctl->src_node_type], |
1438 | hpi_ctl->src_node_index, | 1440 | hpi_ctl->src_node_index, |
1439 | asihpi_dst_names[hpi_ctl->dst_node_type], | 1441 | asihpi_dst_names[hpi_ctl->dst_node_type], |