hda-codec.c (958e3693607901f4c2bca607651382dc48689654) hda-codec.c (5eaa8e1e0f09ff08c9c683676eabb82ad1179647)
1/*
2 * Copyright (C) 2010 Red Hat, Inc.
3 *
4 * written by Gerd Hoffmann <kraxel@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 or

--- 506 unchanged lines hidden (view full) ---

515 hda_codec_parse_fmt(st->format, &st->as);
516 hda_audio_setup(st);
517 break;
518 }
519 }
520 return 0;
521}
522
1/*
2 * Copyright (C) 2010 Red Hat, Inc.
3 *
4 * written by Gerd Hoffmann <kraxel@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 or

--- 506 unchanged lines hidden (view full) ---

515 hda_codec_parse_fmt(st->format, &st->as);
516 hda_audio_setup(st);
517 break;
518 }
519 }
520 return 0;
521}
522
523static int hda_audio_exit(HDACodecDevice *hda)
523static void hda_audio_exit(HDACodecDevice *hda)
524{
525 HDAAudioState *a = HDA_AUDIO(hda);
526 HDAAudioStream *st;
527 int i;
528
529 dprint(a, 1, "%s\n", __FUNCTION__);
530 for (i = 0; i < ARRAY_SIZE(a->st); i++) {
531 st = a->st + i;
532 if (st->node == NULL) {
533 continue;
534 }
535 if (st->output) {
536 AUD_close_out(&a->card, st->voice.out);
537 } else {
538 AUD_close_in(&a->card, st->voice.in);
539 }
540 }
541 AUD_remove_card(&a->card);
524{
525 HDAAudioState *a = HDA_AUDIO(hda);
526 HDAAudioStream *st;
527 int i;
528
529 dprint(a, 1, "%s\n", __FUNCTION__);
530 for (i = 0; i < ARRAY_SIZE(a->st); i++) {
531 st = a->st + i;
532 if (st->node == NULL) {
533 continue;
534 }
535 if (st->output) {
536 AUD_close_out(&a->card, st->voice.out);
537 } else {
538 AUD_close_in(&a->card, st->voice.in);
539 }
540 }
541 AUD_remove_card(&a->card);
542 return 0;
543}
544
545static int hda_audio_post_load(void *opaque, int version)
546{
547 HDAAudioState *a = opaque;
548 HDAAudioStream *st;
549 int i;
550

--- 182 unchanged lines hidden ---
542}
543
544static int hda_audio_post_load(void *opaque, int version)
545{
546 HDAAudioState *a = opaque;
547 HDAAudioStream *st;
548 int i;
549

--- 182 unchanged lines hidden ---