ALSA: hda - Move send_cmd / get_response to hdac_bus_ops

One less redirection.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2015-04-14 16:55:31 +02:00
parent fb3b07c289
commit 7e8be1b309
3 changed files with 23 additions and 34 deletions

View File

@@ -42,10 +42,6 @@ struct hda_pcm_stream;
/* bus operators */
struct hda_bus_ops {
/* send a single command */
int (*command)(struct hda_bus *bus, unsigned int cmd);
/* get a response from the last command */
int (*get_response)(struct hda_bus *bus, unsigned int addr, unsigned int *res);
/* free the private data */
void (*private_free)(struct hda_bus *);
/* attach a PCM stream */
@@ -99,6 +95,9 @@ struct hda_bus {
int primary_dig_out_type; /* primary digital out PCM type */
};
/* from hdac_bus to hda_bus */
#define to_hda_bus(bus) container_of(bus, struct hda_bus, core)
/*
* codec preset
*
@@ -327,7 +326,9 @@ struct hda_codec {
/*
* constructors
*/
int snd_hda_bus_new(struct snd_card *card, struct hda_bus **busp);
int snd_hda_bus_new(struct snd_card *card,
const struct hdac_bus_ops *ops,
struct hda_bus **busp);
int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
unsigned int codec_addr, struct hda_codec **codecp);
int snd_hda_codec_configure(struct hda_codec *codec);