diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-04-14 16:55:31 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-04-16 07:31:41 +0200 |
commit | 7e8be1b309be28e4c92818fed1c55bdac919c7dd (patch) | |
tree | 82d650e884998af25dfed22dac530c47ef93655e /sound/pci/hda/hda_codec.h | |
parent | fb3b07c289fc972e1e2a7d7b7a809239b71f1f3c (diff) | |
download | linux-7e8be1b309be28e4c92818fed1c55bdac919c7dd.tar.bz2 |
ALSA: hda - Move send_cmd / get_response to hdac_bus_ops
One less redirection.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index fc4f76188a1d..b4261721d8f1 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -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); |