init_MUTEX(&spec->bind_mutex); 
static int patch_alc880(struct hda_codec *codec){	struct alc_spec *spec;	int board_config;	spec = kcalloc(1, sizeof(*spec), GFP_KERNEL);	if (spec == NULL)		return -ENOMEM;	codec->spec = spec;	board_config = snd_hda_check_board_config(codec, alc880_cfg_tbl);	if (board_config < 0) {		snd_printd(KERN_INFO "hda_codec: Unknown model for ALC880\n");		board_config = ALC880_MINIMAL;	}	switch (board_config) {	case ALC880_W810:		spec->mixers[spec->num_mixers] = alc880_w810_base_mixer;		spec->num_mixers++;		break;	case ALC880_5ST:	case ALC880_5ST_DIG:		spec->mixers[spec->num_mixers] = alc880_five_stack_mixer;		spec->num_mixers++;		break;	case ALC880_Z71V:		spec->mixers[spec->num_mixers] = alc880_z71v_mixer;		spec->num_mixers++;		break;#ifdef CONFIG_SND_DEBUG	case ALC880_TEST:		spec->mixers[spec->num_mixers] = alc880_test_mixer;		spec->num_mixers++;		break;#endif	default:		spec->mixers[spec->num_mixers] = alc880_base_mixer;		spec->num_mixers++;		break;	}	switch (board_config) {	case ALC880_3ST_DIG:	case ALC880_5ST_DIG:	case ALC880_W810:	case ALC880_Z71V:	case ALC880_TEST:		spec->multiout.dig_out_nid = ALC880_DIGOUT_NID;		break;	default:		break;	}	switch (board_config) {	case ALC880_3ST:	case ALC880_3ST_DIG:	case ALC880_5ST:	case ALC880_5ST_DIG:	case ALC880_W810:		spec->front_panel = 1;		break;	default:		break;	}	switch (board_config) {	case ALC880_5ST:	case ALC880_5ST_DIG:		spec->init_verbs = alc880_init_verbs_five_stack;		spec->channel_mode = alc880_fivestack_modes;		spec->num_channel_mode = ARRAY_SIZE(alc880_fivestack_modes);		break;	case ALC880_W810:		spec->init_verbs = alc880_w810_init_verbs;		spec->channel_mode = alc880_w810_modes;		spec->num_channel_mode = ARRAY_SIZE(alc880_w810_modes);		break;	case ALC880_Z71V:		spec->init_verbs = alc880_z71v_init_verbs;		spec->channel_mode = alc880_z71v_modes;		spec->num_channel_mode = ARRAY_SIZE(alc880_z71v_modes);		break;#ifdef CONFIG_SND_DEBUG	case ALC880_TEST:		spec->init_verbs = alc880_test_init_verbs;		spec->channel_mode = alc880_test_modes;		spec->num_channel_mode = ARRAY_SIZE(alc880_test_modes);		break;#endif	default:		spec->init_verbs = alc880_init_verbs_three_stack;		spec->channel_mode = alc880_threestack_modes;		spec->num_channel_mode = ARRAY_SIZE(alc880_threestack_modes);		break;	}	spec->stream_name_analog = "ALC880 Analog";	spec->stream_analog_playback = &alc880_pcm_analog_playback;	spec->stream_analog_capture = &alc880_pcm_analog_capture;	spec->stream_name_digital = "ALC880 Digital";	spec->stream_digital_playback = &alc880_pcm_digital_playback;	spec->stream_digital_capture = &alc880_pcm_digital_capture;	spec->multiout.max_channels = spec->channel_mode[0].channels;	switch (board_config) {	case ALC880_W810:		spec->multiout.num_dacs = ARRAY_SIZE(alc880_w810_dac_nids);		spec->multiout.dac_nids = alc880_w810_dac_nids;		// No dedicated headphone socket - it's shared with built-in speakers.		break;	case ALC880_Z71V:		spec->multiout.num_dacs = ARRAY_SIZE(alc880_z71v_dac_nids);		spec->multiout.dac_nids = alc880_z71v_dac_nids;		spec->multiout.hp_nid = 0x03;		break;#ifdef CONFIG_SND_DEBUG	case ALC880_TEST:		spec->multiout.num_dacs = ARRAY_SIZE(alc880_test_dac_nids);		spec->multiout.dac_nids = alc880_test_dac_nids;		spec->input_mux = &alc880_test_capture_source;		break;#endif	default:		spec->multiout.num_dacs = ARRAY_SIZE(alc880_dac_nids);		spec->multiout.dac_nids = alc880_dac_nids;		spec->multiout.hp_nid = 0x03; /* rear-surround NID */		break;	}	if (! spec->input_mux)		spec->input_mux = &alc880_capture_source;	spec->num_adc_nids = ARRAY_SIZE(alc880_adc_nids);	spec->adc_nids = alc880_adc_nids;	codec->patch_ops = alc_patch_ops;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/41e41f1f3495c6a7443977d2842d6911e3dcf31c/patch_realtek.c/buggy/sound/pci/hda/patch_realtek.c