Changes in uspace/drv/audio/hdaudio/codec.c [0d59ea7e:cf78637] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/codec.c
r0d59ea7e rcf78637 1 1 /* 2 * Copyright (c) 20 22Jiri Svoboda2 * Copyright (c) 2014 Jiri Svoboda 3 3 * All rights reserved. 4 4 * … … 512 512 codec->address = address; 513 513 codec->in_aw = -1; 514 codec->out_aw = -1;515 514 516 515 rc = hda_get_subnc(codec, 0, &sfg, &nfg); … … 585 584 goto error; 586 585 } else if (awtype == awt_audio_output) { 586 codec->out_aw_list[codec->out_aw_num++] = aw; 587 587 588 rc = hda_get_supp_rates(codec, aw, &rates); 588 589 if (rc != EOK) … … 593 594 goto error; 594 595 595 if (rates != 0 && formats != 0 && 596 codec->out_aw < 0) { 597 ddf_msg(LVL_DEBUG, "Selected output " 598 "widget %d\n", aw); 599 codec->out_aw = aw; 600 } else { 601 ddf_msg(LVL_DEBUG, "Ignoring output " 602 "widget %d\n", aw); 603 } 604 605 ddf_msg(LVL_NOTE, "Output widget %d: rates=0x%x formats=0x%x", 596 ddf_msg(LVL_DEBUG, "Output widget %d: rates=0x%x formats=0x%x", 606 597 aw, rates, formats); 607 codec->out_aw_rates = rates;608 codec->out_aw_formats = formats;609 598 } else if (awtype == awt_audio_input) { 610 599 if (codec->in_aw < 0) { … … 627 616 ddf_msg(LVL_DEBUG, "Input widget %d: rates=0x%x formats=0x%x", 628 617 aw, rates, formats); 629 codec->in_aw_rates = rates;630 codec->in_aw_formats = formats;631 618 } 632 619 … … 657 644 { 658 645 errno_t rc; 659 660 /* Configure converter */ 661 ddf_msg(LVL_DEBUG, "Configure output converter format / %d", 662 codec->out_aw); 663 rc = hda_set_converter_fmt(codec, codec->out_aw, stream->fmt); 664 if (rc != EOK) 665 goto error; 666 667 ddf_msg(LVL_DEBUG, "Configure output converter stream, channel"); 668 rc = hda_set_converter_ctl(codec, codec->out_aw, stream->sid, 0); 669 if (rc != EOK) 670 goto error; 646 int out_aw; 647 int i; 648 649 for (i = 0; i < codec->out_aw_num; i++) { 650 out_aw = codec->out_aw_list[i]; 651 652 /* Configure converter */ 653 654 ddf_msg(LVL_DEBUG, "Configure output converter format"); 655 rc = hda_set_converter_fmt(codec, out_aw, stream->fmt); 656 if (rc != EOK) 657 goto error; 658 659 ddf_msg(LVL_DEBUG, "Configure output converter stream, channel"); 660 rc = hda_set_converter_ctl(codec, out_aw, stream->sid, 0); 661 if (rc != EOK) 662 goto error; 663 } 671 664 672 665 return EOK;
Note:
See TracChangeset
for help on using the changeset viewer.