[cdi-devel] [PATCH 9/9] hdaudio: Set the right format for the output stream
Kevin Wolf ·
So far we only set the format for the output widget. The stream must have the same format set. Signed-off-by: Kevin Wolf <kevin at tyndur.org> --- hdaudio/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hdaudio/main.c b/hdaudio/main.c index e198e01..0953fd6 100644 --- a/hdaudio/main.c +++ b/hdaudio/main.c @@ -191,10 +191,12 @@ static uint32_t codec_query(struct hda_device* hda, int codec, int nid, static void configure_output_widget(struct hda_device* hda) { /* Set sample format */ + uint16_t format = BITS_16 | hda->output.sample_rate | + (hda->output.num_channels - 1); + codec_query(hda, hda->output.codec, hda->output.nid, - VERB_SET_FORMAT | - BITS_16 | hda->output.sample_rate | - (hda->output.num_channels - 1)); + VERB_SET_FORMAT | format); + reg_outl(hda, REG_O0_FMT, format); } static void init_output_widget(struct hda_device* hda) -- 2.1.4