play
struct a10codec_chinfo play;
struct a10codec_chinfo *ch = dir == PCMDIR_PLAY ? &sc->play : &sc->rec;
int play, rec;
play = (hdsp_channel_play_ports(scp->hc)) ? 1 : 0;
if (play) {
int play, rec;
play = (hdspe_channel_play_ports(scp->hc)) ? 1 : 0;
if (play) {
int play = (dir == PCMDIR_PLAY)? 1 : 0;
sc->simplex_dir = play ? PCMDIR_PLAY : PCMDIR_REC ;
ess_write(sc, 0xb8, 0x04 | (play? 0x00 : 0x0a));
static void show(const char *), play(const char *), morse(char);
play(" ");
play(m->morse);
static int hda_codec_init(struct hda_codec_inst *hci, const char *play,
hda_codec_init(struct hda_codec_inst *hci, const char *play,
if (!(play || rec))
if (play && rec)
if (play)
if (play) {
st->aud = audio_init(play, 1);
struct hda_codec_class *codec, const char *play, const char *rec);
char *play;
play = NULL;
play = strdup(value);
DPRINTF("play: %s rec: %s", play, rec);
if (play != NULL || rec != NULL) {
err = hda_codec_constructor(sc, codec, play, rec);
free(play);
const char *play, const char *rec)
return (codec->init(hci, play, rec));
int (*init)(struct hda_codec_inst *hci, const char *play,
static int play(char *arg);
return play (arg);
} play, rec;
{ "play", F(play), GRP, NULL },
{ "play.format", F(play.format), STR, mod_play_format },
{ "play.rate", F(play.rate), NUM, mod_play_rate },
{ "play.vchans", F(play.vchans), NUM, mod_play_vchans },
{ "play.min_rate", F(play.min_rate), NUM, NULL },
{ "play.max_rate", F(play.max_rate), NUM, NULL },
{ "play.min_chans", F(play.min_chans), NUM, NULL },
{ "play.max_chans", F(play.max_chans), NUM, NULL },
{ "play.formats", F(play.formats), STR, NULL },
dp->play.pchans = NV(number, PCHAN);
if (dp->play.pchans && !nvlist_exists(di[i], SNDST_DSPS_INFO_PLAY))
if (dp->play.pchans) {
dp->play.min_rate = NV(number, PLAY, MIN_RATE);
dp->play.max_rate = NV(number, PLAY, MAX_RATE);
dp->play.min_chans = NV(number, PLAY, MIN_CHN);
dp->play.max_chans = NV(number, PLAY, MAX_CHN);
fmt2str(dp->play.formats, sizeof(dp->play.formats),
dp->play.vchans = NV(bool, PVCHAN);
dp->play.rate = NV(number, PVCHANRATE);
fmt2str(dp->play.format, sizeof(dp->play.format),
dp->autoconv = (dp->play.vchans || dp->rec.vchans) && !dp->bitperfect;
} else if (!dp->play.vchans && ch->direction == OUTPUT) {
strlcpy(dp->play.format, ch->hwbuf.format,
sizeof(dp->play.format));
dp->play.rate = ch->hwbuf.rate;
if (dp->play.pchans)
if (dp->play.pchans && dp->rec.pchans)
if (!dp->play.pchans)
return (sysctl_int(buf, arg, &dp->play.vchans));
if (!dp->play.vchans)
return (sysctl_int(buf, arg, &dp->play.rate));
if (!dp->play.vchans)
return (sysctl_str(buf, arg, dp->play.format, sizeof(dp->play.format)));