Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loopback mode kcontrol support #26

Closed
wants to merge 5 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/include/sof/dai.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct dai_ops {
int (*pm_context_store)(struct dai *dai);
int (*probe)(struct dai *dai);
int (*set_loopback_mode)(struct dai *dai, uint32_t lbm);
int (*get_loopback_mode)(struct dai *dai);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove set_loopback_mode and use an int (*ioctl)(*dai, int cmd, void *data) callback for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will refine DAI.

};

/* DAI slot map to audio channel */
Expand Down Expand Up @@ -129,6 +130,11 @@ static inline int dai_set_loopback_mode(struct dai *dai, uint32_t lbm)
return dai->ops->set_loopback_mode(dai, lbm);
}

static inline int dai_get_loopback_mode(struct dai *dai)
{
return dai->ops->get_loopback_mode(dai);
}

/* Digital Audio interface trigger */
static inline int dai_trigger(struct dai *dai, int cmd, int direction)
{
Expand Down