alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [[PATCH] snd-asihpi: 1/8] Control naming
@ 2011-04-05  8:55 linux
  2011-04-05  8:55 ` [[PATCH] snd-asihpi: 2/8] Debug printing linux
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: linux @ 2011-04-05  8:55 UTC (permalink / raw)
  To: patch; +Cc: tiwai, Eliot Blennerhassett, alsa-devel

From: Eliot Blennerhassett <eblennerhassett@audioscience.com>

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>
---
 pci/asihpi/asihpi.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/pci/asihpi/asihpi.c b/pci/asihpi/asihpi.c
index f53a31e..edcbe39 100644
--- a/pci/asihpi/asihpi.c
+++ b/pci/asihpi/asihpi.c
@@ -1413,14 +1413,16 @@ static void asihpi_ctl_init(struct snd_kcontrol_new *snd_control,
 				struct hpi_control *hpi_ctl,
 				char *name)
 {
-	char *dir = "";
+	char *dir;
 	memset(snd_control, 0, sizeof(*snd_control));
 	snd_control->name = hpi_ctl->name;
 	snd_control->private_value = hpi_ctl->h_control;
 	snd_control->iface = SNDRV_CTL_ELEM_IFACE_MIXER;
 	snd_control->index = 0;
 
-	if (hpi_ctl->dst_node_type + HPI_DESTNODE_NONE == HPI_DESTNODE_ISTREAM)
+	if (hpi_ctl->src_node_type + HPI_SOURCENODE_NONE == HPI_SOURCENODE_CLOCK_SOURCE)
+		dir = ""; /* clock is neither capture nor playback */
+	else if (hpi_ctl->dst_node_type + HPI_DESTNODE_NONE == HPI_DESTNODE_ISTREAM)
 		dir = "Capture ";  /* On or towards a PCM capture destination*/
 	else if ((hpi_ctl->src_node_type + HPI_SOURCENODE_NONE != HPI_SOURCENODE_OSTREAM) &&
 		(!hpi_ctl->dst_node_type))
@@ -1433,7 +1435,7 @@ static void asihpi_ctl_init(struct snd_kcontrol_new *snd_control,
 		dir = "Playback "; /* PCM Playback source, or  output node */
 
 	if (hpi_ctl->src_node_type && hpi_ctl->dst_node_type)
-		sprintf(hpi_ctl->name, "%s%d %s%d %s%s",
+		sprintf(hpi_ctl->name, "%s %d %s %d %s%s",
 			asihpi_src_names[hpi_ctl->src_node_type],
 			hpi_ctl->src_node_index,
 			asihpi_dst_names[hpi_ctl->dst_node_type],
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-05  8:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-05  8:55 [[PATCH] snd-asihpi: 1/8] Control naming linux
2011-04-05  8:55 ` [[PATCH] snd-asihpi: 2/8] Debug printing linux
2011-04-05  8:55 ` [[PATCH] snd-asihpi: 3/8] Handle playback drained status better linux
2011-04-05  8:55 ` [[PATCH] snd-asihpi: 4/8] MMAP for non-busmaster cards linux
2011-04-05  8:55 ` [[PATCH] snd-asihpi: 5/8] Remove 2 unused functions linux
2011-04-05  8:55 ` [[PATCH] snd-asihpi: 6/8] Standardise substream name generation linux
2011-04-05  8:55 ` [[PATCH] snd-asihpi: 7/8] Simplify driver unload cleanup linux
2011-04-05  8:55 ` [[PATCH] snd-asihpi: 8/8] Minor cleanups linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).