Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148361
b: refs/heads/master
c: 8372d49
h: refs/heads/master
i:
  148359: 0ff16ec
v: v3
  • Loading branch information
Takashi Iwai committed Jun 2, 2009
1 parent ff25a2e commit 7a8e8aa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6585db943aade186d38eaab2720c18887b94c875
refs/heads/master: 8372d4980fbc2e403f0dc5457441c8c6b7c04915
8 changes: 4 additions & 4 deletions trunk/sound/pci/ctxfi/ctatc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/pci/ctxfi/ctatc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
6 changes: 2 additions & 4 deletions trunk/sound/pci/ctxfi/ctpcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);

Expand Down

0 comments on commit 7a8e8aa

Please sign in to comment.