summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-06-02 14:27:56 +0200
committerTakashi Iwai <tiwai@suse.de>2009-06-02 15:54:46 +0200
commit8372d4980fbc2e403f0dc5457441c8c6b7c04915 (patch)
treedf725a6649b21bc698e9ee21349489967e026419
parent6585db943aade186d38eaab2720c18887b94c875 (diff)
downloadlinux-exynos-8372d4980fbc2e403f0dc5457441c8c6b7c04915.tar.gz
linux-exynos-8372d4980fbc2e403f0dc5457441c8c6b7c04915.tar.bz2
linux-exynos-8372d4980fbc2e403f0dc5457441c8c6b7c04915.zip
ALSA: ctxfi - Fix PCM device naming
PCM names for surround streams should be also fixed as well as the mixer element names. Also, a bit clean up for PCM name setup. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/ctxfi/ctatc.c8
-rw-r--r--sound/pci/ctxfi/ctatc.h4
-rw-r--r--sound/pci/ctxfi/ctpcm.c6
3 files changed, 8 insertions, 10 deletions
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index e14ed714721b..675dd4c8eaec 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -72,15 +72,15 @@ static struct {
[FRONT] = { .create = ct_alsa_pcm_create,
.destroy = NULL,
.public_name = "Front/WaveIn"},
- [REAR] = { .create = ct_alsa_pcm_create,
+ [SURROUND] = { .create = ct_alsa_pcm_create,
.destroy = NULL,
- .public_name = "Rear"},
+ .public_name = "Surround"},
[CLFE] = { .create = ct_alsa_pcm_create,
.destroy = NULL,
.public_name = "Center/LFE"},
- [SURROUND] = { .create = ct_alsa_pcm_create,
+ [SIDE] = { .create = ct_alsa_pcm_create,
.destroy = NULL,
- .public_name = "Surround"},
+ .public_name = "Side"},
[IEC958] = { .create = ct_alsa_pcm_create,
.destroy = NULL,
.public_name = "IEC958 Non-audio"},
diff --git a/sound/pci/ctxfi/ctatc.h b/sound/pci/ctxfi/ctatc.h
index a7b0ec24cd75..b86d12cd4a19 100644
--- a/sound/pci/ctxfi/ctatc.h
+++ b/sound/pci/ctxfi/ctatc.h
@@ -29,9 +29,9 @@
enum CTALSADEVS { /* Types of alsa devices */
FRONT,
- REAR,
- CLFE,
SURROUND,
+ CLFE,
+ SIDE,
IEC958,
MIXER,
NUM_CTALSADEVS /* This should always be the last */
diff --git a/sound/pci/ctxfi/ctpcm.c b/sound/pci/ctxfi/ctpcm.c
index a64cb0ed8759..756d8b2776b3 100644
--- a/sound/pci/ctxfi/ctpcm.c
+++ b/sound/pci/ctxfi/ctpcm.c
@@ -469,12 +469,10 @@ int ct_alsa_pcm_create(struct ct_atc *atc,
struct snd_pcm *pcm;
int err;
int playback_count, capture_count;
- char name[128];
- strncpy(name, device_name, sizeof(name));
playback_count = (IEC958 == device) ? 1 : 8;
capture_count = (FRONT == device) ? 1 : 0;
- err = snd_pcm_new(atc->card, name, device,
+ err = snd_pcm_new(atc->card, "ctxfi", device,
playback_count, capture_count, &pcm);
if (err < 0) {
printk(KERN_ERR "ctxfi: snd_pcm_new failed!! Err=%d\n", err);
@@ -484,7 +482,7 @@ int ct_alsa_pcm_create(struct ct_atc *atc,
pcm->private_data = atc;
pcm->info_flags = 0;
pcm->dev_subclass = SNDRV_PCM_SUBCLASS_GENERIC_MIX;
- strcpy(pcm->name, device_name);
+ strlcpy(pcm->name, device_name, sizeof(pcm->name));
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &ct_pcm_playback_ops);