Changeset 3fec817 in mainline
- Timestamp:
- 2014-09-04T15:51:56Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- de16f89
- Parents:
- 149dd52d
- Location:
- uspace/drv/audio/hdaudio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/audio/hdaudio/codec.c
r149dd52d r3fec817 547 547 } 548 548 549 int hda_out_converter_setup(hda_codec_t *codec, uint8_t sid)549 int hda_out_converter_setup(hda_codec_t *codec, hda_stream_t *stream) 550 550 { 551 551 int rc; … … 556 556 out_aw = codec->out_aw_list[i]; 557 557 558 /* XXX Choose appropriate parameters */559 uint32_t fmt;560 /* 48 kHz, 16-bits, 1 channel */561 fmt = (fmt_base_44khz << fmt_base) | (fmt_bits_16 << fmt_bits_l) | 1;562 563 558 /* Configure converter */ 564 559 565 560 ddf_msg(LVL_NOTE, "Configure converter format"); 566 rc = hda_set_converter_fmt(codec, out_aw, fmt);561 rc = hda_set_converter_fmt(codec, out_aw, stream->fmt); 567 562 if (rc != EOK) 568 563 goto error; 569 564 570 565 ddf_msg(LVL_NOTE, "Configure converter stream, channel"); 571 rc = hda_set_converter_ctl(codec, out_aw, s id, 0);566 rc = hda_set_converter_ctl(codec, out_aw, stream->sid, 0); 572 567 if (rc != EOK) 573 568 goto error; -
uspace/drv/audio/hdaudio/codec.h
r149dd52d r3fec817 37 37 38 38 #include "hdaudio.h" 39 #include "stream.h" 39 40 40 41 #define MAX_OUT_AW 256 … … 50 51 extern hda_codec_t *hda_codec_init(hda_t *, uint8_t); 51 52 extern void hda_codec_fini(hda_codec_t *); 52 extern int hda_out_converter_setup(hda_codec_t *, uint8_t);53 extern int hda_out_converter_setup(hda_codec_t *, hda_stream_t *); 53 54 54 55 #endif -
uspace/drv/audio/hdaudio/pcm_iface.c
r149dd52d r3fec817 217 217 ddf_msg(LVL_NOTE, "hda_start_playback()"); 218 218 219 rc = hda_out_converter_setup(hda->ctl->codec, hda->pcm_stream ->sid);219 rc = hda_out_converter_setup(hda->ctl->codec, hda->pcm_stream); 220 220 if (rc != EOK) 221 221 return rc; -
uspace/drv/audio/hdaudio/stream.h
r149dd52d r3fec817 34 34 35 35 #ifndef STREAM_H 36 #define ST ERAM_H36 #define STREAM_H 37 37 38 38 #include "hdaudio.h"
Note:
See TracChangeset
for help on using the changeset viewer.