diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-07-27 10:52:19 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:58:09 -0400 |
commit | d01ce99fc53271cd8ef0ef6b9a2790177fd410a1 (patch) | |
tree | d6723036b6bd896c120cf49dd049ddf182ec703d /sound/pci/hda/hda_codec.h | |
parent | e2340465ec9587362a057524d3e2163377366771 (diff) |
[ALSA] hda-intel - Coding style fixes
Fix codes to follow more to the standard kernel coding style.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 56c26e7ccdf1..6809386109c8 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -199,7 +199,9 @@ enum { | |||
199 | #define AC_AMPCAP_OFFSET_SHIFT 0 | 199 | #define AC_AMPCAP_OFFSET_SHIFT 0 |
200 | #define AC_AMPCAP_NUM_STEPS (0x7f<<8) /* number of steps */ | 200 | #define AC_AMPCAP_NUM_STEPS (0x7f<<8) /* number of steps */ |
201 | #define AC_AMPCAP_NUM_STEPS_SHIFT 8 | 201 | #define AC_AMPCAP_NUM_STEPS_SHIFT 8 |
202 | #define AC_AMPCAP_STEP_SIZE (0x7f<<16) /* step size 0-32dB in 0.25dB */ | 202 | #define AC_AMPCAP_STEP_SIZE (0x7f<<16) /* step size 0-32dB |
203 | * in 0.25dB | ||
204 | */ | ||
203 | #define AC_AMPCAP_STEP_SIZE_SHIFT 16 | 205 | #define AC_AMPCAP_STEP_SIZE_SHIFT 16 |
204 | #define AC_AMPCAP_MUTE (1<<31) /* mute capable */ | 206 | #define AC_AMPCAP_MUTE (1<<31) /* mute capable */ |
205 | #define AC_AMPCAP_MUTE_SHIFT 31 | 207 | #define AC_AMPCAP_MUTE_SHIFT 31 |
@@ -436,7 +438,8 @@ struct hda_bus { | |||
436 | 438 | ||
437 | /* codec linked list */ | 439 | /* codec linked list */ |
438 | struct list_head codec_list; | 440 | struct list_head codec_list; |
439 | struct hda_codec *caddr_tbl[HDA_MAX_CODEC_ADDRESS + 1]; /* caddr -> codec */ | 441 | /* link caddr -> codec */ |
442 | struct hda_codec *caddr_tbl[HDA_MAX_CODEC_ADDRESS + 1]; | ||
440 | 443 | ||
441 | struct mutex cmd_mutex; | 444 | struct mutex cmd_mutex; |
442 | 445 | ||
@@ -499,7 +502,7 @@ struct hda_pcm_ops { | |||
499 | 502 | ||
500 | /* PCM information for each substream */ | 503 | /* PCM information for each substream */ |
501 | struct hda_pcm_stream { | 504 | struct hda_pcm_stream { |
502 | unsigned int substreams; /* number of substreams, 0 = not exist */ | 505 | unsigned int substreams; /* number of substreams, 0 = not exist*/ |
503 | unsigned int channels_min; /* min. number of channels */ | 506 | unsigned int channels_min; /* min. number of channels */ |
504 | unsigned int channels_max; /* max. number of channels */ | 507 | unsigned int channels_max; /* max. number of channels */ |
505 | hda_nid_t nid; /* default NID to query rates/formats/bps, or set up */ | 508 | hda_nid_t nid; /* default NID to query rates/formats/bps, or set up */ |
@@ -582,13 +585,17 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, | |||
582 | /* | 585 | /* |
583 | * low level functions | 586 | * low level functions |
584 | */ | 587 | */ |
585 | unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid, int direct, | 588 | unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid, |
589 | int direct, | ||
586 | unsigned int verb, unsigned int parm); | 590 | unsigned int verb, unsigned int parm); |
587 | int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int direct, | 591 | int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int direct, |
588 | unsigned int verb, unsigned int parm); | 592 | unsigned int verb, unsigned int parm); |
589 | #define snd_hda_param_read(codec, nid, param) snd_hda_codec_read(codec, nid, 0, AC_VERB_PARAMETERS, param) | 593 | #define snd_hda_param_read(codec, nid, param) \ |
590 | int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid, hda_nid_t *start_id); | 594 | snd_hda_codec_read(codec, nid, 0, AC_VERB_PARAMETERS, param) |
591 | int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid, hda_nid_t *conn_list, int max_conns); | 595 | int snd_hda_get_sub_nodes(struct hda_codec *codec, hda_nid_t nid, |
596 | hda_nid_t *start_id); | ||
597 | int snd_hda_get_connections(struct hda_codec *codec, hda_nid_t nid, | ||
598 | hda_nid_t *conn_list, int max_conns); | ||
592 | 599 | ||
593 | struct hda_verb { | 600 | struct hda_verb { |
594 | hda_nid_t nid; | 601 | hda_nid_t nid; |
@@ -596,7 +603,8 @@ struct hda_verb { | |||
596 | u32 param; | 603 | u32 param; |
597 | }; | 604 | }; |
598 | 605 | ||
599 | void snd_hda_sequence_write(struct hda_codec *codec, const struct hda_verb *seq); | 606 | void snd_hda_sequence_write(struct hda_codec *codec, |
607 | const struct hda_verb *seq); | ||
600 | 608 | ||
601 | /* unsolicited event */ | 609 | /* unsolicited event */ |
602 | int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex); | 610 | int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex); |
@@ -610,10 +618,13 @@ int snd_hda_build_controls(struct hda_bus *bus); | |||
610 | * PCM | 618 | * PCM |
611 | */ | 619 | */ |
612 | int snd_hda_build_pcms(struct hda_bus *bus); | 620 | int snd_hda_build_pcms(struct hda_bus *bus); |
613 | void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid, u32 stream_tag, | 621 | void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid, |
622 | u32 stream_tag, | ||
614 | int channel_id, int format); | 623 | int channel_id, int format); |
615 | unsigned int snd_hda_calc_stream_format(unsigned int rate, unsigned int channels, | 624 | unsigned int snd_hda_calc_stream_format(unsigned int rate, |
616 | unsigned int format, unsigned int maxbps); | 625 | unsigned int channels, |
626 | unsigned int format, | ||
627 | unsigned int maxbps); | ||
617 | int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid, | 628 | int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid, |
618 | u32 *ratesp, u64 *formatsp, unsigned int *bpsp); | 629 | u32 *ratesp, u64 *formatsp, unsigned int *bpsp); |
619 | int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid, | 630 | int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid, |