Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 148371
b: refs/heads/master
c: 2a36f67
h: refs/heads/master
i:
  148369: d784857
  148367: f33df81
v: v3
  • Loading branch information
Takashi Iwai committed Jun 5, 2009
1 parent 403d7a2 commit 7be54bb
Show file tree
Hide file tree
Showing 7 changed files with 244 additions and 249 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: 775ffa1d3e5a550dd2c9d947d773021c61531b36
refs/heads/master: 2a36f67f8c81f0babda0e811c760b7bfa971010b
82 changes: 39 additions & 43 deletions trunk/sound/pci/ctxfi/ctatc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ static int atc_dev_free(struct snd_device *dev)
return ct_atc_destroy(atc);
}

static int atc_identify_card(struct ct_atc *atc)
static int __devinit atc_identify_card(struct ct_atc *atc)
{
u16 subsys;
u8 revision;
Expand Down Expand Up @@ -1243,7 +1243,7 @@ static int atc_identify_card(struct ct_atc *atc)
return 0;
}

static int ct_create_alsa_devs(struct ct_atc *atc)
int __devinit ct_atc_create_alsa_devs(struct ct_atc *atc)
{
enum CTALSADEVS i;
struct hw *hw = atc->hw;
Expand Down Expand Up @@ -1277,7 +1277,7 @@ static int ct_create_alsa_devs(struct ct_atc *atc)
return 0;
}

static int atc_create_hw_devs(struct ct_atc *atc)
static int __devinit atc_create_hw_devs(struct ct_atc *atc)
{
struct hw *hw = NULL;
struct card_conf info = {0};
Expand Down Expand Up @@ -1313,7 +1313,7 @@ static int atc_create_hw_devs(struct ct_atc *atc)
return 0;
}

static int atc_get_resources(struct ct_atc *atc)
static int __devinit atc_get_resources(struct ct_atc *atc)
{
struct daio_desc da_desc = {0};
struct daio_mgr *daio_mgr = NULL;
Expand Down Expand Up @@ -1423,7 +1423,7 @@ static int atc_get_resources(struct ct_atc *atc)
return 0;
}

static void
static void __devinit
atc_connect_dai(struct src_mgr *src_mgr, struct dai *dai,
struct src **srcs, struct srcimp **srcimps)
{
Expand Down Expand Up @@ -1462,7 +1462,7 @@ atc_connect_dai(struct src_mgr *src_mgr, struct dai *dai,
src_mgr->commit_write(src_mgr); /* Synchronously enable SRCs */
}

static void atc_connect_resources(struct ct_atc *atc)
static void __devinit atc_connect_resources(struct ct_atc *atc)
{
struct dai *dai = NULL;
struct dao *dao = NULL;
Expand Down Expand Up @@ -1508,37 +1508,35 @@ static void atc_connect_resources(struct ct_atc *atc)
}
}

static void atc_set_ops(struct ct_atc *atc)
{
/* Set operations */
atc->map_audio_buffer = ct_map_audio_buffer;
atc->unmap_audio_buffer = ct_unmap_audio_buffer;
atc->pcm_playback_prepare = atc_pcm_playback_prepare;
atc->pcm_release_resources = atc_pcm_release_resources;
atc->pcm_playback_start = atc_pcm_playback_start;
atc->pcm_playback_stop = atc_pcm_stop;
atc->pcm_playback_position = atc_pcm_playback_position;
atc->pcm_capture_prepare = atc_pcm_capture_prepare;
atc->pcm_capture_start = atc_pcm_capture_start;
atc->pcm_capture_stop = atc_pcm_stop;
atc->pcm_capture_position = atc_pcm_capture_position;
atc->spdif_passthru_playback_prepare = spdif_passthru_playback_prepare;
atc->get_ptp_phys = atc_get_ptp_phys;
atc->select_line_in = atc_select_line_in;
atc->select_mic_in = atc_select_mic_in;
atc->select_digit_io = atc_select_digit_io;
atc->line_front_unmute = atc_line_front_unmute;
atc->line_surround_unmute = atc_line_surround_unmute;
atc->line_clfe_unmute = atc_line_clfe_unmute;
atc->line_rear_unmute = atc_line_rear_unmute;
atc->line_in_unmute = atc_line_in_unmute;
atc->spdif_out_unmute = atc_spdif_out_unmute;
atc->spdif_in_unmute = atc_spdif_in_unmute;
atc->spdif_out_get_status = atc_spdif_out_get_status;
atc->spdif_out_set_status = atc_spdif_out_set_status;
atc->spdif_out_passthru = atc_spdif_out_passthru;
atc->have_digit_io_switch = atc_have_digit_io_switch;
}
static struct ct_atc atc_preset __devinitdata = {
.map_audio_buffer = ct_map_audio_buffer,
.unmap_audio_buffer = ct_unmap_audio_buffer,
.pcm_playback_prepare = atc_pcm_playback_prepare,
.pcm_release_resources = atc_pcm_release_resources,
.pcm_playback_start = atc_pcm_playback_start,
.pcm_playback_stop = atc_pcm_stop,
.pcm_playback_position = atc_pcm_playback_position,
.pcm_capture_prepare = atc_pcm_capture_prepare,
.pcm_capture_start = atc_pcm_capture_start,
.pcm_capture_stop = atc_pcm_stop,
.pcm_capture_position = atc_pcm_capture_position,
.spdif_passthru_playback_prepare = spdif_passthru_playback_prepare,
.get_ptp_phys = atc_get_ptp_phys,
.select_line_in = atc_select_line_in,
.select_mic_in = atc_select_mic_in,
.select_digit_io = atc_select_digit_io,
.line_front_unmute = atc_line_front_unmute,
.line_surround_unmute = atc_line_surround_unmute,
.line_clfe_unmute = atc_line_clfe_unmute,
.line_rear_unmute = atc_line_rear_unmute,
.line_in_unmute = atc_line_in_unmute,
.spdif_out_unmute = atc_spdif_out_unmute,
.spdif_in_unmute = atc_spdif_in_unmute,
.spdif_out_get_status = atc_spdif_out_get_status,
.spdif_out_set_status = atc_spdif_out_set_status,
.spdif_out_passthru = atc_spdif_out_passthru,
.have_digit_io_switch = atc_have_digit_io_switch,
};

/**
* ct_atc_create - create and initialize a hardware manager
Expand All @@ -1552,7 +1550,7 @@ static void atc_set_ops(struct ct_atc *atc)
* Returns 0 if suceeds, or negative error code if fails.
*/

int ct_atc_create(struct snd_card *card, struct pci_dev *pci,
int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci,
unsigned int rsr, unsigned int msr, struct ct_atc **ratc)
{
struct ct_atc *atc = NULL;
Expand All @@ -1567,14 +1565,14 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,
if (NULL == atc)
return -ENOMEM;

/* Set operations */
*atc = atc_preset;

atc->card = card;
atc->pci = pci;
atc->rsr = rsr;
atc->msr = msr;

/* Set operations */
atc_set_ops(atc);

spin_lock_init(&atc->atc_lock);

/* Find card model */
Expand Down Expand Up @@ -1606,8 +1604,6 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci,
if (!atc->timer)
goto error1;

atc->create_alsa_devs = ct_create_alsa_devs;

err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, atc, &ops);
if (err < 0)
goto error1;
Expand Down
3 changes: 1 addition & 2 deletions trunk/sound/pci/ctxfi/ctatc.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ struct ct_atc {

const struct ct_atc_chip_details *chip_details;
enum CTCARDS model;
/* Create all alsa devices */
int (*create_alsa_devs)(struct ct_atc *atc);

struct ct_vm *vm; /* device virtual memory manager for this card */
int (*map_audio_buffer)(struct ct_atc *atc, struct ct_atc_pcm *apcm);
Expand Down Expand Up @@ -151,5 +149,6 @@ struct ct_atc {
int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci,
unsigned int rsr, unsigned int msr,
struct ct_atc **ratc);
int __devinit ct_atc_create_alsa_devs(struct ct_atc *atc);

#endif /* CTATC_H */
4 changes: 2 additions & 2 deletions trunk/sound/pci/ctxfi/cthardware.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "cthw20k2.h"
#include <linux/bug.h>

static enum CHIPTYP get_chip_type(struct hw *hw)
static enum CHIPTYP __devinitdata get_chip_type(struct hw *hw)
{
enum CHIPTYP type = ATCNONE;

Expand All @@ -39,7 +39,7 @@ static enum CHIPTYP get_chip_type(struct hw *hw)
return type;
}

int create_hw_obj(struct pci_dev *pci, struct hw **rhw)
int __devinit create_hw_obj(struct pci_dev *pci, struct hw **rhw)
{
int err = 0;

Expand Down
Loading

0 comments on commit 7be54bb

Please sign in to comment.