Skip to content

Commit 3fcdb15

Browse files
authored
Merge pull request #492 from mmaka1/hda-header
dai: hda: added the header for the driver
2 parents fda4f1a + 802a287 commit 3fcdb15

3 files changed

Lines changed: 41 additions & 4 deletions

File tree

src/drivers/intel/cavs/hda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*/
3030

3131
#include <errno.h>
32-
#include <sof/dai.h>
32+
#include <sof/hda.h>
3333

3434
static int hda_trigger(struct dai *dai, int cmd, int direction)
3535
{

src/include/sof/hda.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2018, Intel Corporation
3+
* All rights reserved.
4+
*
5+
* Redistribution and use in source and binary forms, with or without
6+
* modification, are permitted provided that the following conditions are met:
7+
* * Redistributions of source code must retain the above copyright
8+
* notice, this list of conditions and the following disclaimer.
9+
* * Redistributions in binary form must reproduce the above copyright
10+
* notice, this list of conditions and the following disclaimer in the
11+
* documentation and/or other materials provided with the distribution.
12+
* * Neither the name of the Intel Corporation nor the
13+
* names of its contributors may be used to endorse or promote products
14+
* derived from this software without specific prior written permission.
15+
*
16+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17+
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18+
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19+
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20+
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21+
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22+
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23+
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24+
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25+
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26+
* POSSIBILITY OF SUCH DAMAGE.
27+
*
28+
* Author: Marcin Maka <marcin.maka@linux.intel.com>
29+
*/
30+
31+
#ifndef __INCLUDE_HDA__
32+
#define __INCLUDE_HDA__
33+
34+
#include <sof/dai.h>
35+
36+
extern const struct dai_ops hda_ops;
37+
38+
#endif /* __INCLUDE_HDA__ */
39+

src/platform/intel/cavs/dai.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <sof/dai.h>
3636
#include <sof/ssp.h>
3737
#include <sof/dmic.h>
38+
#include <sof/hda.h>
3839
#include <sof/stream.h>
3940
#include <sof/audio/component.h>
4041
#include <platform/platform.h>
@@ -46,9 +47,6 @@
4647
#include <string.h>
4748
#include <config.h>
4849

49-
/* TODO: ops should be declared by their respective dai headers */
50-
extern const struct dai_ops hda_ops;
51-
5250
static struct dai ssp[] = {
5351
{
5452
.type = SOF_DAI_INTEL_SSP,

0 commit comments

Comments
 (0)